---
I recently upgraded to 1.2.9, after working out a few other issues such as https://github.com/Cacti/cacti/issues/3350 I thought I was done. Cacti was running great and all the graphs were updating. Well that was up until a colleuge came to me and said "why aren't these two graphs working"?
So I started digging into this one. Basic debugging showed pretty quickly that spine was coming back with "U" aka Undefined for the OIDs in question. These graphs and the data query in general worked fine in the previous version of cacti 1.1.39. The only thing that changed was the upgrade
Code: Select all
2020/03/27 23:50:24 - SPINE: Poller[1] PID[28173] Device[808] HT[1] DS[12339] SNMP: v2: <redacted>, dsname: upcAtten, oid: .1.3.6.1.4.1.31637.1.1.9.12.0, value: U
2020/03/27 23:50:24 - SPINE: Poller[1] PID[28173] Device[808] HT[1] DS[12338] SNMP: v2: <redacted>, dsname: peakBeaconSample, oid: .1.3.6.1.4.1.31637.1.1.9.6.0, value: U
2020/03/27 23:50:24 - SPINE: Poller[1] PID[28173] Device[808] HT[1] DS[12338] SNMP: v2: <redacted>, dsname: peakBeaconClearSky, oid: .1.3.6.1.4.1.31637.1.1.9.5.0, value: U
2020/03/27 23:50:24 - SPINE: Poller[1] PID[28173] Device[808] HT[1] Total Time: 5.8 Seconds
Code: Select all
snmpget -v2c -c <redacted> -On <redacted> .1.3.6.1.4.1.31637.1.1.9.6.0
.1.3.6.1.4.1.31637.1.1.9.6.0 = STRING: " -68.5 dB"
Code: Select all
<upcSampledBeaconLevel>
<name>Sampled Beacon Level</name>
<method>walk</method>
<source>VALUE/REGEXP:\s*([+-]?[0-9]*\.[0-9]) dB</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.31637.1.1.9.6</oid>
</upcSampledBeaconLevel>
Code: Select all
if (!validate_result(snmp_oids[j].result)) {
if (set.spine_log_level == 2) {
SPINE_LOG(("WARNING: Invalid Response, Device[%i] HT[%i] DS[%i] SNMP: v%i: %s, dsname: %s, oid: %s, value: %s",
host_id, host_thread, poller_items[snmp_oids[j].array_position].local_data_id, host->snmp_version,
host->hostname, poller_items[snmp_oids[j].array_position].rrd_name,
poller_items[snmp_oids[j].array_position].arg1, snmp_oids[j].result));
} else if (set.spine_log_level == 1) {
errors++;
buffer_output_errors(error_string, buf_size, buf_errors, host_id, host_thread, poller_items[snmp_oids[j].array_position].local_data_id, false);
}
SET_UNDEFINED(snmp_oids[j].result);
}
}
Suffice to say then due to both checks failing validate_result() returns false which causes spine to call the SET_UNDEFINED macro which overwrites the otherwise good result with "U' and you get what we have above in the log.
So my questions are:
1. Was regex support just removed from spine intentionally? I can't see how regexes in snmp data queries could possibly work with these sort of validation checks in spine before the regex is actually applied to the polled value
2. If the answer to 1 is yes, then was it done with the intent that I should now write a script to perform such queries?
Thanks,
Erik