-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spine should be able to process a value regex on output or input-output. #210
Comments
Increase your timeouts, I'm sure the QNAP is just not keeping up. This is a common error. Also, watch your MAX OID's at the Device level. Some SNMP Agents don't handle settings over 1 well. |
Upped timeouts to 100000. 1 OID was already set.
|
What do you see if you run this in debug mode manually? <path_to_spine>/spine -f <host_id> -l <host_id> -C <path to spine config>/spine.conf -R -V 5 |
|
Issue persists in 1.2.18 (cacti and spine) |
Yes, we are working towards a patch this weekend that will resolve the issues. |
The issue is that the snmpagent is returning a suffix of "TB", which means the response is likely a string. Can you run the folloiwng command: snmpget -c blah -v2c hostname .1.3.6.1.4.1.24681.2.2.19.1.4.1 Post the output. |
Spine itself does not process the regex to remove the numeric suffix. There has been a feature request for this in the very past, but no one delivered a pull request to adopt it. So, you should move your Data Query to a Script or Script server based one. |
@TheWitness if you can remind me which regex feature/code block this relates to in the core, I can make an attempt. I'll do it on it's own branch for testing, as I don't want to mess too much with the stability for 1.2.19 since we have now got things settled down again. |
The real issue is this in the XML file: What I would support, from a design perspective, would be the following:
The issue with not doing it in the poller_item table is that it will otherwise require a bunch of file open/close activities, and some caching algo for all the potentially millions of data sources that Cacti will need to process. Not pretty. |
My case may be similar, spine returns a On the other hand, with the This problem is present on my two Cacti environments. The XML used: <interface>
<name>Get SNMP Optical</name>
<description>Queries a host for optical</description>
<oid_index>.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.20</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]\.[0-9]\.[0-9]{1,3})</oid_index_parse>
<index_order>Index</index_order>
<index_order_type>alphabetic</index_order_type>
<fields>
<Index>
<name>Index</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
</Index>
<SlotCardPort>
<name>Slot/Card/Port</name>
<method>walk</method>
<source>OIDVALUE/REGEXP:.*([0-9]+)\.([0-9]+)\.([0-9]+):\1/\2/\3</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.20</oid>
</SlotCardPort>
<OpticalTx>
<name>Optical Power Tx</name>
<method>get</method>
<source>VALUE/REGEXP:(^[-]?[0-9]+\.[0-9]+) dBm$</source>
<direction>input-output</direction>
<oid>.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.20</oid>
</OpticalTx>
<OpticalRx>
<name>Optical Power Rx</name>
<method>get</method>
<source>VALUE/REGEXP:(^[-]?[0-9]+\.[0-9]+) dBm$</source>
<direction>input-output</direction>
<oid>.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.21</oid>
</OpticalRx>
</fields>
</interface> Spine v1.2.15 cli result:
Spine v1.2.17 cli result:
Snmpwalk cli result: root@cacti:/root#snmpwalk -v2c -c ***** xxx.xxx.xxx.xxx .1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.20
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.20.1.1.1 = STRING: "-3.49 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.20.1.1.2 = STRING: "-0.38 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.20.1.2.1 = STRING: "-5.79 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.20.1.2.2 = STRING: "-4.23 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.20.1.6.1 = STRING: "-5.05 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.20.1.6.2 = STRING: "-5.12 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.20.1.6.3 = STRING: "-0.01 dBm"
root@cacti:/root#snmpwalk -v2c -c ***** xxx.xxx.xxx.xxx .1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.21
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.21.1.1.1 = STRING: "-2.49 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.21.1.1.2 = STRING: "-6.61 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.21.1.2.1 = STRING: "-5.75 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.21.1.2.2 = STRING: "-5.51 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.21.1.6.1 = STRING: "-5.75 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.21.1.6.2 = STRING: "-4.61 dBm"
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.21.1.6.3 = STRING: "-14.5 dBm" |
You may have to reduce your max_oid's a bit. What is it set to? |
It's set to 1 |
What do you have that set at? |
The configured value for the Just for curiosity, I increased this value to 30 and now Spine returns all expected values.
|
That's quite off. Sounds like maybe an agent bug. Can you do a tcpdump with boat setup. You can setup filters to limit the downstream ip address and try to not use a community string that you are okay sharing. The you can email the to [email protected]. Once I review them I can get more information on what happening. Can you mention the make and model of the downstream device? |
Okay QNAS. Second best in the SOHO NAS space. Let me know if it's still under support. |
From a verbose query:
The XML used:
The results received from cacti.log using spine:
The results received from cacti.log using cmd.php:
Cacti and spine version: 1.2.17
The text was updated successfully, but these errors were encountered: