v1.2.0: RECACHE ASSERT FAILED, poller Invalid Response(s)
Moderators: Developers, Moderators
Re: v1.2.0: RECACHE ASSERT FAILED, poller Invalid Response(s
ok thanks. That points me in a good direction. I can't manually modify though. I'm using 1 device just to pinpoint the problem. To modify 1 device is fine, but i have 600+ devices and 7000+ devices. I can't manually fix this.
Re: v1.2.0: RECACHE ASSERT FAILED, poller Invalid Response(s
--- cacti-1.1.35/resource/snmp_queries/interface.xml 2018-02-11 20:40:52.000000000 -0500
+++ cacti-1.2.0/resource/snmp_queries/interface.xml 2019-01-02 21:14:26.000000000 -0500
@@ -3,7 +3,7 @@
<description>Queries a host for a list of monitorable interfaces</description>
<oid_index>.1.3.6.1.2.1.2.2.1.1</oid_index>
<oid_num_indexes>.1.3.6.1.2.1.2.1.0</oid_num_indexes>
- <index_order>ifDescr:ifName:ifHwAddr:ifIndex</index_order>
+ <index_order>ifName:ifDescr:ifHwAddr:ifIndex</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
So, due to this change, cacti is trying to re-map using ifDescr values to ifName values? and, in the process, a lot of my ifDescr values are showing as non-existant because of their format? I think i'm going to try parsing the whole table and remove all the postfix's in that column, then re-enable what i have disabled, and see how she goes.
Thanks.
+++ cacti-1.2.0/resource/snmp_queries/interface.xml 2019-01-02 21:14:26.000000000 -0500
@@ -3,7 +3,7 @@
<description>Queries a host for a list of monitorable interfaces</description>
<oid_index>.1.3.6.1.2.1.2.2.1.1</oid_index>
<oid_num_indexes>.1.3.6.1.2.1.2.1.0</oid_num_indexes>
- <index_order>ifDescr:ifName:ifHwAddr:ifIndex</index_order>
+ <index_order>ifName:ifDescr:ifHwAddr:ifIndex</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
So, due to this change, cacti is trying to re-map using ifDescr values to ifName values? and, in the process, a lot of my ifDescr values are showing as non-existant because of their format? I think i'm going to try parsing the whole table and remove all the postfix's in that column, then re-enable what i have disabled, and see how she goes.
Thanks.
Re: v1.2.0: RECACHE ASSERT FAILED, poller Invalid Response(s
Yes, we changed the field being used because it was causing issues on devices that were updating the ifDescr constantly. This resulted in lots of indexing problems. ifName seems to be the consistent field across all devices.
If you map your ifDescr to ifName manually, that will have the same effect as what the code is trying to do, but obviously it's failing because the descriptions are wrong.
If you map your ifDescr to ifName manually, that will have the same effect as what the code is trying to do, but obviously it's failing because the descriptions are wrong.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: v1.2.0: RECACHE ASSERT FAILED, poller Invalid Response(s
ok. Thanks.
Manual is no good for my large config. Check this one out:
mysql cacti -u root -p -e "select * from data_input_data where data_input_field_id=13 and value regexp 'Port' and value regexp ' - '" | tr '\t' ',' |sed "s/^\(.*\),\(.*\),,\(Port [[:digit:]]\+\) - .*$/UPDATE data_input_data set value='\3' WHERE data_input_field_id=\1 AND data_template_data_id=\2;/"
This outputs sql commands to be copy-pasted, and updates the "Port # - description" to "Port #". After that, the index removal check is now satisfied and does NOT remove. Looking good now.
Looking at this data in the data_input_data table sorted by data_template_data_id, it looks like all the "Port # - description" format is all together with older/smaller id numbers. Newer/higher numbers are formated properly with just "Port #". So, maybe in the past something was populating this table with "Port # - description" but it is NOT doing so now. Hopefully this means i'm good to go ahead with no problems.
Manual is no good for my large config. Check this one out:
mysql cacti -u root -p -e "select * from data_input_data where data_input_field_id=13 and value regexp 'Port' and value regexp ' - '" | tr '\t' ',' |sed "s/^\(.*\),\(.*\),,\(Port [[:digit:]]\+\) - .*$/UPDATE data_input_data set value='\3' WHERE data_input_field_id=\1 AND data_template_data_id=\2;/"
This outputs sql commands to be copy-pasted, and updates the "Port # - description" to "Port #". After that, the index removal check is now satisfied and does NOT remove. Looking good now.
Looking at this data in the data_input_data table sorted by data_template_data_id, it looks like all the "Port # - description" format is all together with older/smaller id numbers. Newer/higher numbers are formated properly with just "Port #". So, maybe in the past something was populating this table with "Port # - description" but it is NOT doing so now. Hopefully this means i'm good to go ahead with no problems.
Re: v1.2.0: RECACHE ASSERT FAILED, poller Invalid Response(s
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.
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.
Who is online
Users browsing this forum: No registered users and 0 guests