[SOLVED] Monitor v1.3-1 plugin - last fail not working

General discussion about Plugins for Cacti

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
thomaslam
Posts: 40
Joined: Sat Feb 18, 2006 1:11 pm
Contact:

[SOLVED] Monitor v1.3-1 plugin - last fail not working

#1 Post by thomaslam » Tue Sep 18, 2012 10:41 pm

Hi,

Status: Down
IP Address: X.X.X.X
Ping: 218.32 ms
Last Fail: 0000-00-00 00:00:00
Availability: 71.82%

Status: Up
IP Address: X.X.X.X
Ping: 194.49 ms
Last Fail: 0000-00-00 00:00:00
Availability: 99.9%

recently found out that the Last Failed counter or field is not updated.

Anyway, to debug this and find out why?

many thanks!
1.3-1 Device Monitoring
Cacti Version 0.8.8a
Cacti OS unix
SNMP Version NET-SNMP version: 5.4.3
RRDTool Version RRDTool 1.4.x
Hosts 359
Graphs 4617
Last edited by thomaslam on Fri Oct 12, 2012 2:53 am, edited 1 time in total.
Quard Xeon 2.6 cpu 16GB memory, 1.2 tera bytes(raid5), ubuntu-64bit-12.04 LTS, cacti 8.8a-3, spine,

User avatar
thomaslam
Posts: 40
Joined: Sat Feb 18, 2006 1:11 pm
Contact:

Re: Monitor v1.3-1 plugin - last fail not working

#2 Post by thomaslam » Fri Oct 12, 2012 2:53 am

Found a fix http://bugs.cacti.net/view.php?id=2257

there was a bug filed.


The functions.php was adapted as follows (function update_host_status):

$hosts[$host_id]["status_fail_date"] = '0000-00-00 00:00:00';
$hosts[$host_id]["status_rec_date"] = '0000-00-00 00:00:00';

In order to overcome the issue I changed the code by adding a check:

if ($hosts[$host_id]["status_fail_date"] == ""){
$hosts[$host_id]["status_fail_date"] = '0000-00-00 00:00:00';}

if ($hosts[$host_id]["status_rec_date"] == ""){
$hosts[$host_id]["status_rec_date"] = '0000-00-00 00:00:00';}
Quard Xeon 2.6 cpu 16GB memory, 1.2 tera bytes(raid5), ubuntu-64bit-12.04 LTS, cacti 8.8a-3, spine,

Eol
Posts: 44
Joined: Mon Apr 13, 2015 5:53 pm

Re: [SOLVED] Monitor v1.3-1 plugin - last fail not working

#3 Post by Eol » Tue Jun 30, 2015 4:05 pm

There a way to fix this via the monitor plugin, i.e. modify something in monitor.php where it outputs?

Asking as even though this is "fixed" it's fixed in >=0.8.9 which means God knows when (for example this was tagged fix in 2012 and it's 2015 and 0.8.8d just came out). Hit this problem myself and it's bad form to simply expect everybody to google and hopefully stumble across this forum post.

Rno
Cacti User
Posts: 346
Joined: Wed Dec 07, 2011 9:19 am

Re: [SOLVED] Monitor v1.3-1 plugin - last fail not working

#4 Post by Rno » Wed Dec 14, 2016 8:06 am

pff bad bug fix
end 2016 function.php still not corrected


What a shame !!
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.45, Map 0.37

Test
Cacti 1.2.6
Spine 1.2.6
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.6
Map 1.2.6

Post Reply