Hello all,
I'm having a problem with a custom query that I've created. In the XML-file I have specified an input that will show up as the name in the graph later on.
The query is a snmp index type. I did a normal snmpwalk of the index (like this: snmpwalk -c public -v 2c IPADRESS .1.3.6.1.4.1.13732.1.1.1.1.7) which gives the following result:
SNMPv2-SMI::enterprises.13732.1.1.1.1.7.5051091 = STRING: "GNÖ - 70355 SD"
SNMPv2-SMI::enterprises.13732.1.1.1.1.7.5051092 = STRING: "NRA - 70356 SD"
The index here, of course, is 5051091; 5051092 and so on... The name i wish to have on the graph is the string value.
When I do a "verbose query" however all strings with characters "åäö" in them gets converted to a hex-string and for example show up like this in Cacti:
47:4E:D6:20:2D:
All other strings without 'åäö' is shown correctly...
Clues any one??
/Marcus
Support for swedish characters 'åäö' when doing a snmp query
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
First verify that your net-snmp paths are correct in Console->Settings->Paths
Then, edit the include/global.php and set the following line to "false"
in other words:
Then rerun the data query, what do you get?
TheWitness
Then, edit the include/global.php and set the following line to "false"
Code: Select all
$config["php_snmp_support"] = function_exists("snmpget");
Code: Select all
$config["php_snmp_support"] = false
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Typically, this happens when the MIB file for the vendor does not know what type of string it is. It's interesting that you are experiencing the same behavior even with PHP_SNMP disabled.
Can you goto the console, click on the Cactus and then post the About page. I am interested in the bottom of the page. Also, post the results of the "Verbose Query" when editing the device.
TheWitness
Can you goto the console, click on the Cactus and then post the About page. I am interested in the bottom of the page. Also, post the results of the "Verbose Query" when editing the device.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
The About page tells me this:
About Cacti
Version 0.8.7b
--- SNIP ---
Cacti Variables
Operating System: unix
PHP SNMP Support: yes
The results from the query:
Data Query Debug Information
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/opt/statistics/resource/snmp_queries/idirect_remotes.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.13732.1.4.1.1.1'
+ Located input field 'ifIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.13732.1.4.1.1.1'
+ Found item [ifIndex='4999957'] index: 4999957 [from value]
+ Found item [ifIndex='5000144'] index: 5000144 [from value]
+ Found item [ifIndex='5037758'] index: 5037758 [from value]
+ Found item [ifIndex='5037972'] index: 5037972 [from value]
+ Found item [ifIndex='5038009'] index: 5038009 [from value]
+ Found item [ifIndex='5038098'] index: 5038098 [from value]
+ Found item [ifIndex='5038129'] index: 5038129 [from value]
+ Found item [ifIndex='5038162'] index: 5038162 [from value]
+ Found item [ifIndex='5038289'] index: 5038289 [from value]
+ Found item [ifIndex='5038359'] index: 5038359 [from value]
+ Found item [ifIndex='5038467'] index: 5038467 [from value]
--- SNIP ---
+ Located input field 'remoteName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.13732.1.1.1.1.7'
+ Found item [remoteName='BSE-19221 SD'] index: 4999957 [from value]
+ Found item [remoteName='UMN - 19408 SD'] index: 5000144 [from value]
+ Found item [remoteName='KAEK-57022 SD'] index: 5037758 [from value]
+ Found item [remoteName='HLN-57236 SD'] index: 5037972 [from value]
+ Found item [remoteName='Stockholm NOC - 57273'] index: 5038009 [from value]
+ Found item [remoteName='BFS- 57362 SD'] index: 5038098 [from value]
+ Found item [remoteName='LED-57393 SD'] index: 5038129 [from value]
+ Found item [remoteName='HBYK - 57426 SD'] index: 5038162 [from value]
+ Found item [remoteName='HTA-57553 SD'] index: 5038289 [from value]
+ Found item [remoteName='SFF - 57623 SD'] index: 5038359 [from value]
+ Found item [remoteName='48:4F:D6:4B:2D:35:37:37:33:31:20:53:44'] index: 5038467 [from value]
As you can see the last line is the first "remoteName" with 'åäö' and it produces the HEX-string... And yes, I turned PHP-SNMP support on again when I did this query. I've also removed all non-interesting lines with my --- SNIPS ---
/Marcus
About Cacti
Version 0.8.7b
--- SNIP ---
Cacti Variables
Operating System: unix
PHP SNMP Support: yes
The results from the query:
Data Query Debug Information
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/opt/statistics/resource/snmp_queries/idirect_remotes.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.13732.1.4.1.1.1'
+ Located input field 'ifIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.13732.1.4.1.1.1'
+ Found item [ifIndex='4999957'] index: 4999957 [from value]
+ Found item [ifIndex='5000144'] index: 5000144 [from value]
+ Found item [ifIndex='5037758'] index: 5037758 [from value]
+ Found item [ifIndex='5037972'] index: 5037972 [from value]
+ Found item [ifIndex='5038009'] index: 5038009 [from value]
+ Found item [ifIndex='5038098'] index: 5038098 [from value]
+ Found item [ifIndex='5038129'] index: 5038129 [from value]
+ Found item [ifIndex='5038162'] index: 5038162 [from value]
+ Found item [ifIndex='5038289'] index: 5038289 [from value]
+ Found item [ifIndex='5038359'] index: 5038359 [from value]
+ Found item [ifIndex='5038467'] index: 5038467 [from value]
--- SNIP ---
+ Located input field 'remoteName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.13732.1.1.1.1.7'
+ Found item [remoteName='BSE-19221 SD'] index: 4999957 [from value]
+ Found item [remoteName='UMN - 19408 SD'] index: 5000144 [from value]
+ Found item [remoteName='KAEK-57022 SD'] index: 5037758 [from value]
+ Found item [remoteName='HLN-57236 SD'] index: 5037972 [from value]
+ Found item [remoteName='Stockholm NOC - 57273'] index: 5038009 [from value]
+ Found item [remoteName='BFS- 57362 SD'] index: 5038098 [from value]
+ Found item [remoteName='LED-57393 SD'] index: 5038129 [from value]
+ Found item [remoteName='HBYK - 57426 SD'] index: 5038162 [from value]
+ Found item [remoteName='HTA-57553 SD'] index: 5038289 [from value]
+ Found item [remoteName='SFF - 57623 SD'] index: 5038359 [from value]
+ Found item [remoteName='48:4F:D6:4B:2D:35:37:37:33:31:20:53:44'] index: 5038467 [from value]
As you can see the last line is the first "remoteName" with 'åäö' and it produces the HEX-string... And yes, I turned PHP-SNMP support on again when I did this query. I've also removed all non-interesting lines with my --- SNIPS ---
/Marcus
Who is online
Users browsing this forum: No registered users and 1 guest