-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Enhance Cacti's SNMP functions and Data Query XML syntax #470
Comments
There is another ticket open on this subject. We are going to add it to the SNMP functions. However, neither the php-snmp library function calls or the class object are supporting output formats. So, we are going to call the native snmp* commands to execute it. Should only take a few days to complete. We will additionally look at enhancing php-snmp moving forward. |
I'm going to modify the title of this one. Going to make it adopt the following requirements.
After which, I don't want to be touching this function again. |
Additionally:
|
Enhance Cacti's SNMP function and Data Query XML syntax. Add <output_format>hex|string|guess</output_format> tag
Okay resolved now. Not only do the SNMP functions support the $value_output_format variable now, the Data Query XML tags do as well. You need to test this right away. Your HEX2DEC code remained unchanged though. |
Enhance Cacti's SNMP function and Data Query XML syntax. Add <output_format>hex|string|guess</output_format> tag
I need to add the -Ox option to some snmp_get query, is there a way of doing it ?
otherwise net_snmp is interpreting the output of any snmp_get and it will give a bad value
Here is 2 queries, first with the option -Ox,
[root@lslcact01:/usr/share/cacti/plugins/linkdiscovery] # snmpwalk -v2c -ctelvlsn se-sve-225 -Ox .1.3.6.1.4.1.9.9.23.1.2.1.1.4
SNMPv2-SMI::enterprises.9.9.23.1.2.1.1.4.10108.3 = Hex-STRING: 0A 55 79 43
SNMPv2-SMI::enterprises.9.9.23.1.2.1.1.4.10109.2 = Hex-STRING: 0A 55 00 E0
SNMPv2-SMI::enterprises.9.9.23.1.2.1.1.4.10110.5 = Hex-STRING: 0A 55 00 01
[root@lslcact01:/usr/share/cacti/plugins/linkdiscovery] # snmpwalk -v2c -ctelvlsn se-sve-225 .1.3.6.1.4.1.9.9.23.1.2.1.1.4
SNMPv2-SMI::enterprises.9.9.23.1.2.1.1.4.10108.3 = STRING: "
UyC"
SNMPv2-SMI::enterprises.9.9.23.1.2.1.1.4.10109.2 = Hex-STRING: 0A 55 00 E0
SNMPv2-SMI::enterprises.9.9.23.1.2.1.1.4.10110.5 = Hex-STRING: 0A 55 00 01
from an email I get on the net-snmp mailing list if snmpwalk receive character higher than 0x20 it will interpret it, no if it's under 0x20.
So since the record I pull is IP address, when I receive 0x79 (the third number) all string is higher than 0x20, so snmpwalk is interpreting it, and give a CR (0x0a), so Cacti is taking this CR and return false result, actually it will give me 4 records from this snmpwalk instead of 3.
The only option is to tel snmpwalk to do print all field in ex format, option -Ox.
You can look into github closed issue #288 but the snmp_get_raw dosen't fix the issue, since it's from the way snmpget (walk) handle the value it read from the snmp queries, and not from cacti
The text was updated successfully, but these errors were encountered: