Now returning to my original post starting this thread, and what i think caused these problems to all crop up at once, is improperly detecting the uptimes of the devices causing them all to be re-indexed/re-cached.
eg: 2019/01/22 19:05:06 - POLLER: Poller[1] Device[650] DQ[11] RECACHE ASSERT FAILED '95:9:56:33.05<95:10:01:33.34 2019/01/22 19:05:09 - POLLER: Poller[1] Device[508] DQ[11] RECACHE ASSERT FAILED '145:9:56:39.18<145:10:01:39.82 2019/01/22 19:05:20 - POLLER: Poller[1] Device[589] DQ[11] RECACHE ASSERT FAILED '405:9:59:02.71<405:10:04:02.73 2019/01/22 19:05:26 - POLLER: Poller[1] Device[1208] DQ[11] RECACHE ASSERT FAILED '17:9:59:31.24<17:10:04:31.50
These snmp uptime values obviously can't be used this way. php seems to do a string compare though and I noticed they do result TRUE often, with say '405:9:58:02.71<405:9:59:02.71' but once that 9:59 rolls over to 10:00 ie '405:9:58:02.71<405:10:00:02.71' php string compare returns FALSE and causes a recache.
I have found 2 different types of devices where when I query the uptime with snmpget, they both reply with format: "Timeticks: (1058017655) 122 days, 10:56:16.55" but when debugging this, through the cmd.php poller and lib/snmp.php , before calling the "fucntion format_snmp_string", 1 of the devices shows output recieved was format: "Timeticks: (1058017655) 122 days, 10:56:16.55" while the other would only show this format: "10:56:16.55"
so when passing this through the lib/snmp.php "fucntion format_snmp_string", the first with "^Timeticks" format would pass through the appropriate checks and have "1058017655" returned. the other device, no so! It doesn't make it to the ^Timeticks check and ends up just returning format "10:56:16.55"
I've made these changes to revert back to what it was in v1.1.35:
--- /opt/src/cacti/cacti-1.2.0/cmd.php 2019-01-02 21:14:27.000000000 -0500 +++ www/cmd.php 2019-01-22 22:06:36.874424980 -0500 @@ -537,8 +537,8 @@ if ((cacti_sizeof($polling_items) > 0) & if (isset($sessions[$host_id . '_' . $item['snmp_version'] . '_' . $item['snmp_port']])) { - $sessions[$host_id . '_' . $item['snmp_version'] . '_' . $item['snmp_port']]->quick_print = true; - $output = cacti_snmp_session_get($sessions[$host_id . '_' . $item['snmp_version'] . '_' . $item['snmp_port']], $index_item['arg1'], true); + $sessions[$host_id . '_' . $item['snmp_version'] . '_' . $item['snmp_port']]; + $output = cacti_snmp_session_get($sessions[$host_id . '_' . $item['snmp_version'] . '_' . $item['snmp_port']], $index_item['arg1']); } else { $output = 'U'; }
after that, my whole poller_reindex table is showing just the digits only timeticks and properly doing the recache assert check.
EDIT: i just noticed I put my diff files backwards so the (-) and (+) changes showed backwards. I've corrected that.
|