Monitor plugin displays incorrect downtimes

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
dexx
Posts: 28
Joined: Thu Jan 13, 2011 12:45 am

Monitor plugin displays incorrect downtimes

Post by dexx »

The monitor plugin under Cacti 0.8.8.a on our Centos 6 system works fine except for one thing. When a monitored device goes down, Monitor reports the downtime as over 700,000 days. I expect its a setting with clock/timezone/etc. Any ideas?

EDIT: Saw from another thread that its being tracked in a bug report. http://bugs.cacti.net/bug_view_advanced ... ug_id=2257
Unfortunately the bug report (last updated 2012) says it will be fixed in version 0.8.9. :cry:
Anarhyst266
Posts: 2
Joined: Thu Feb 20, 2014 7:55 am

Re: Monitor plugin displays incorrect downtimes

Post by Anarhyst266 »

dexx wrote: Unfortunately the bug report (last updated 2012) says it will be fixed in version 0.8.9. :cry:
The man who has reported this bug proposed solution. I reccomend you to use it. Everything is working fine for me.
This is quote from http://bugs.cacti.net/bug_view_advanced ... ug_id=2257 :
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';}
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests