I get this alert email:
Code: Select all
Host is DOWN
Manage global status : down (uptime 2048305139 -> 2048305139)
Cacti host id : 72
Which php file must I change to remove this alert? (making a ">" from a "=" )
Torsten
Moderators: Developers, Moderators
Code: Select all
Host is DOWN
Manage global status : down (uptime 2048305139 -> 2048305139)
Cacti host id : 72
Code: Select all
Host : ip-address (hostname), old uptime was : 4294935195 (497.1d), new is : 9528 (0d)
Host : ip-address (hostname), Old uptime was : 4294953448 (497.1d) New is : 16238 (0d) Reason:
Code: Select all
if (($old_uptime<4294937286) || ($old_uptime>4294967295))
{
if ($new_uptime < $old_uptime) {
cacti_log("Reboot detected of host : " . $q_row["hostname"] , true, "UPTIME");
$today = getdate();
$reboot_date = $today['year']."-".$today['mon']."-".$today['mday']." ".$today['hours'].":".$today['minutes'].":".$today['seconds'];
db_execute("insert into uptime_data ( id , datetime, extra ) values ( '" . $q_row["id"] . "' , '" . $reboot_date . "' , '' ) ");
thold_mail($global_alert_address, '', 'Reboot detected at ' . $reboot_date . ' of host : ' . $q_row["hostname"], 'Host : ' . $q_row["hostname"] . ' (' . $q_row["description"] . '), old uptime was : ' . $old_uptime . ' (' . round(($old_uptime)/8640000, 1) . 'd), new is : ' . $new_uptime . ' (' . round(($new_uptime)/8640000, 1) . 'd)', '');
}
else {$new_uptime = $new_uptime ;}
}
else
{cacti_log("Near on SNMP-overflow of host : " . $q_row["hostname"] , true, "UPTIME"); }
}
}
?>
the host was down, this is why you receive a down messagetorstentfk wrote:Hello,
I get this alert email:
As you can see the uptimes are the same.Code: Select all
Host is DOWN Manage global status : down (uptime 2048305139 -> 2048305139) Cacti host id : 72
Which php file must I change to remove this alert? (making a ">" from a "=" )
Torsten
i don't understandlankienen wrote:Hi torsten,
I know this is not an answer for your question but
i need to contact you anyway because i have a similar wierd uptime problem with my devices.
The 497.1d uptime bug:
i used your code in check-uptime.php but yesterday i received the error again :-/
error alert messages:Code: Select all
Host : ip-address (hostname), old uptime was : 4294935195 (497.1d), new is : 9528 (0d) Host : ip-address (hostname), Old uptime was : 4294953448 (497.1d) New is : 16238 (0d) Reason:
Can you help me out with to fix this issue please?Code: Select all
if (($old_uptime<4294937286) || ($old_uptime>4294967295)) { if ($new_uptime < $old_uptime) { cacti_log("Reboot detected of host : " . $q_row["hostname"] , true, "UPTIME"); $today = getdate(); $reboot_date = $today['year']."-".$today['mon']."-".$today['mday']." ".$today['hours'].":".$today['minutes'].":".$today['seconds']; db_execute("insert into uptime_data ( id , datetime, extra ) values ( '" . $q_row["id"] . "' , '" . $reboot_date . "' , '' ) "); thold_mail($global_alert_address, '', 'Reboot detected at ' . $reboot_date . ' of host : ' . $q_row["hostname"], 'Host : ' . $q_row["hostname"] . ' (' . $q_row["description"] . '), old uptime was : ' . $old_uptime . ' (' . round(($old_uptime)/8640000, 1) . 'd), new is : ' . $new_uptime . ' (' . round(($new_uptime)/8640000, 1) . 'd)', ''); } else {$new_uptime = $new_uptime ;} } else {cacti_log("Near on SNMP-overflow of host : " . $q_row["hostname"] , true, "UPTIME"); } } } ?>
btw. i think this
Manage global status : down (uptime 2048305139 -> 2048305139)
depends also only from check-uptime.php.
Mybe the developer can give us a clue?
Thanks
lankienen
I use monitor and uptime plugingilles wrote:i don't understandlankienen wrote:Hi torsten,
I know this is not an answer for your question but
i need to contact you anyway because i have a similar wierd uptime problem with my devices.
The 497.1d uptime bug:
i used your code in check-uptime.php but yesterday i received the error again :-/
error alert messages:Code: Select all
Host : ip-address (hostname), old uptime was : 4294935195 (497.1d), new is : 9528 (0d) Host : ip-address (hostname), Old uptime was : 4294953448 (497.1d) New is : 16238 (0d) Reason:
Can you help me out with to fix this issue please?Code: Select all
if (($old_uptime<4294937286) || ($old_uptime>4294967295)) { if ($new_uptime < $old_uptime) { cacti_log("Reboot detected of host : " . $q_row["hostname"] , true, "UPTIME"); $today = getdate(); $reboot_date = $today['year']."-".$today['mon']."-".$today['mday']." ".$today['hours'].":".$today['minutes'].":".$today['seconds']; db_execute("insert into uptime_data ( id , datetime, extra ) values ( '" . $q_row["id"] . "' , '" . $reboot_date . "' , '' ) "); thold_mail($global_alert_address, '', 'Reboot detected at ' . $reboot_date . ' of host : ' . $q_row["hostname"], 'Host : ' . $q_row["hostname"] . ' (' . $q_row["description"] . '), old uptime was : ' . $old_uptime . ' (' . round(($old_uptime)/8640000, 1) . 'd), new is : ' . $new_uptime . ' (' . round(($new_uptime)/8640000, 1) . 'd)', ''); } else {$new_uptime = $new_uptime ;} } else {cacti_log("Near on SNMP-overflow of host : " . $q_row["hostname"] , true, "UPTIME"); } } } ?>
btw. i think this
Manage global status : down (uptime 2048305139 -> 2048305139)
depends also only from check-uptime.php.
Mybe the developer can give us a clue?
Thanks
lankienen
are you using uptime AND manage plugin ?
Yes i noticed that the last 4 digits change.and:
Code:
if (($old_uptime<4294937286) || ($old_uptime>4294967295))
This are only 10 ticks. could be a little bit too small
lankienen wrote:Hi torsten,Code: Select all
if (($old_uptime<4294937286) || ($old_uptime>4294967295)) lankienen[/quote] The calculation: ticks/sec 0,01 1sec = 100 1min = 6 000 1h = 360 000 1day = 8 640 000 497 days 4294080000 --------------------------- + 2 hour 4294800000 + 27min 4294962000 +53sec 4294967300 >>> now we have an overflow ------------------ rest -4 ticks so best would be to subtract from 2^32 = 4294967296 5 minutes minus some ticks: 30 000 ticks : set it to 4294937296 Torsten
I don't think so. All of the devices I have under manage show valid uptimes via SNMP, but the uptime shown inside manage is either zero, or a static, unchanging number.gilles wrote:if you use manage plugin, go to settings and check "Check system uptime"
this will try to use system uptime and then snmp agent uptime if system uptime is unavailable
if your counter don't change, your device have a snmp problem
Users browsing this forum: No registered users and 0 guests