Hello all.
I have created an snmp oid on remote site that gives me information about Memory usage.
# snmpget -c public -v 1 192.168.1.11 .1.3.6.1.4.1.2021.51.101.1
UCD-SNMP-MIB::ucdavis.51.101.1 = STRING: "Total:4086512 Used:3887820"
Notice I want to have 2 values in 1 (like Load Averages work output: 1min:0.09 5min:0.09 10min:0.08 )
After this I created a Data Input Method with 2 output fields (almost like Load Averages).
Then I want to create Data Template for this, but i don't see Output Field drop down menu in Data Source Item Section.
but in Load Averages all ok.
How can i combine 2 values via SNMP into 1 graph? Plz help! I'm stuck.
--mazaj
How to parse SNMP output fields?
Moderators: Developers, Moderators
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Hi
it would be easier to have a script which returns 2 values on 2 lines, like this :
Then you can get the first value with the OID .1.3.6.1.4.1.2021.51.101.1, and the second value with .1.3.6.1.4.1.2021.51.101.2
it would be easier to have a script which returns 2 values on 2 lines, like this :
Code: Select all
$ snmpget -c public -v 1 192.168.1.11 .1.3.6.1.4.1.2021.51.101
4086512
3887820
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Take a look at the "Interface - Traffic" data template, it polls 2 OIDs.mazaj wrote:1) ok... but how do I create a graph for these 2 oids?? how will data template look ??
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
My SNMP oids are not indexed
Although I didn't managed to parse multiple values in SNMP, i created a script that pulls those two values via SNMP. For Cacti this is Script query.
Output looks like
So I managed two use 1 SNMP query for multiple values via script.
Although I didn't managed to parse multiple values in SNMP, i created a script that pulls those two values via SNMP. For Cacti this is Script query.
Output looks like
Code: Select all
# /bin/sh /usr/hosting/belly/html/cacti/scripts/custom_linux_memory.sh 1 public 192.168.1.11
Total:4086512 Used:1782464
Who is online
Users browsing this forum: No registered users and 1 guest