Hi good people!
Don't know if this is the best place to ask this.
I'm monitoring some hosts and when some of them goes down I receive a message with the info and in the field "Host Previously DOWN for" I get a completly wrong value like 7234234234234234234 days.
Does anyone know how to fix this?
Thanks and merry xmas!
Wrong "Host Previously DOWN for"
Moderators: Developers, Moderators
Re: Wrong "Host Previously DOWN for"
Cacti and MySQL version?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 2
- Joined: Thu Feb 05, 2015 6:39 am
Re: Wrong "Host Previously DOWN for"
Hello.
Excuse me for bringing up this old topic again, but in my search for a solution I've found this unresolved question. Now I'm having the exact same problem, I've installed Cacti 0.8.8b with MySQL 14.14 and thold 0.5 plugin and while everything is working fine, I'm receiving host notification with incorrect last dates:
Last Date Checked UP: 0000-00-00 00:00:00 Host Previously DOWN for: 736031d 12h 59m 51s
or
Last Date Checked DOWN : 0000-00-00 00:00:00 Host Previously UP for: 736031d 12h 44m 52s
I've spent some time trying to figure out where the problem is, but now it seems I'm stuck and I'll appreciate any help.
Thanks!
Excuse me for bringing up this old topic again, but in my search for a solution I've found this unresolved question. Now I'm having the exact same problem, I've installed Cacti 0.8.8b with MySQL 14.14 and thold 0.5 plugin and while everything is working fine, I'm receiving host notification with incorrect last dates:
Last Date Checked UP: 0000-00-00 00:00:00 Host Previously DOWN for: 736031d 12h 59m 51s
or
Last Date Checked DOWN : 0000-00-00 00:00:00 Host Previously UP for: 736031d 12h 44m 52s
I've spent some time trying to figure out where the problem is, but now it seems I'm stuck and I'll appreciate any help.
Thanks!
-
- Posts: 2
- Joined: Thu Feb 05, 2015 6:39 am
Re: Wrong "Host Previously DOWN for"
Hello all,
Exactly in which place it's necessary to add a:
I try to put this under:
However it doesn't work for me at all, i show monitor message with strange values:
Exactly in which place it's necessary to add a:
Code: Select all
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';}
Code: Select all
$hosts[$host_id]["status_fail_date"] = '0000-00-00 00:00:00';
$hosts[$host_id]["status_rec_date"] = '0000-00-00 00:00:00';
Last Date Checked UP: 0000-00-00 00:00:00
Host Previously DOWN for: 736565d 11h 12m 28s
Re: Wrong "Host Previously DOWN for"
Hello all,
Finally to solve this problem i let a code in state below in file /usr/share/cacti/lib/functions.php. I use "$: locate functions.php" to lacte this files, because a location can be different.
Finally to solve this problem i let a code in state below in file /usr/share/cacti/lib/functions.php. I use "$: locate functions.php" to lacte this files, because a location can be different.
Now a last fail seems good from a monitor cacti web page and also when i receive a notification by email is also seems good.function update_host_status($status, $host_id, &$hosts, &$ping, $ping_availability, $print_data_to_stdout) {
$issue_log_message = false;
$ping_failure_count = read_config_option("ping_failure_count");
$ping_recovery_count = read_config_option("ping_recovery_count");
/*$hosts[$host_id]["status_fail_date"] = '0000-00-00 00:00:00';*/
/*$hosts[$host_id]["status_rec_date"] = '0000-00-00 00:00:00';*/
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';}
......
.....
...
Who is online
Users browsing this forum: No registered users and 2 guests