What is the easiest way to query only one value/OID?
Moderators: Developers, Moderators
-
- Posts: 9
- Joined: Wed Nov 08, 2006 2:08 am
What is the easiest way to query only one value/OID?
Dear Community, I ve searched now a lot through the forum.
I seems very tricky to me, to query just one single Value out of a device. Maybe it is very easy to query (and graph) just one value and I haven t figured it out now.
What I want to do is:
./snmpwalk -v 1 -c public 10.4.4.104 .1.3.6.1.4.1.2800.2.2.5.7
SNMPv2-SMI::enterprises.2800.2.2.5.7.0 = INTEGER: 90
(It s a CBL Airlaser and a private MIB)
I just want to graph the integer value.
What would now be the easiest way for me to do this?
I seems very tricky to me, to query just one single Value out of a device. Maybe it is very easy to query (and graph) just one value and I haven t figured it out now.
What I want to do is:
./snmpwalk -v 1 -c public 10.4.4.104 .1.3.6.1.4.1.2800.2.2.5.7
SNMPv2-SMI::enterprises.2800.2.2.5.7.0 = INTEGER: 90
(It s a CBL Airlaser and a private MIB)
I just want to graph the integer value.
What would now be the easiest way for me to do this?
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Hi
you can use the "SNMP - Generic OID Template" data & graph templates.
you can use the "SNMP - Generic OID Template" data & graph templates.
[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]
-
- Posts: 9
- Joined: Wed Nov 08, 2006 2:08 am
Easiest way to query one snmp value?
Dear fmangeant,
could you explain me this a little bit more? What would you now do?
I
could you explain me this a little bit more? What would you now do?
I
-
- Posts: 9
- Joined: Wed Nov 08, 2006 2:08 am
Easiest way to query one snmp value?
Dear fmangeant,
you helped me a lot - firstly I didn't know what you were talking about but with a little bit googling I found the following link:
http://cacti.net/downloads/docs/html/how_to.html
Graph a Single SNMP OID - Chapter 13. How To
Best regards,
Peter
you helped me a lot - firstly I didn't know what you were talking about but with a little bit googling I found the following link:
http://cacti.net/downloads/docs/html/how_to.html
Graph a Single SNMP OID - Chapter 13. How To
Best regards,
Peter
I did that before, with no joy, thus the query about the quotes...
I think I missed/misunderstood the maximum value field however, and the data source type (now set to counter).
Max value - if set to 0 does this mean there is no max value? Or do I need to set a very high one for things like Uptime (I've set it to 99999999999999 for the moment).
I'll see if that works, thanks LVM.
OK... No it doesn't
Here is the SNMP OID I'm querying:
Here's the SNMPWALK command and output:
I think I missed/misunderstood the maximum value field however, and the data source type (now set to counter).
Max value - if set to 0 does this mean there is no max value? Or do I need to set a very high one for things like Uptime (I've set it to 99999999999999 for the moment).
I'll see if that works, thanks LVM.
OK... No it doesn't
Here is the SNMP OID I'm querying:
Here's the output from WSPingPRO:.1.3.6.1.2.1.1.3
sysUpTime.0 "39 days 09:50:35"
Here's the SNMPWALK command and output:
Any ideas?snmpwalk -v 1 -c read0nly 10.193.174.2 .1.3.6.1.2.1.1.3
SNMPv2-MIB::sysUpTime.0 = Timeticks: (340520301) 39 days, 9:53:23.01
No longer a n00by, probably, by now an 0ldby
Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Oh, here's some data from the debugs:
GRaph Debug:
Data Source Debug
/usr/bin/rrdtool create \
/var/www/html/rra/loncorea_snmp_oid_365.rrd \
--step 300 \
DS:snmp_oid:COUNTER:600:0:9223372036854775807 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \
GRaph Debug:
And outputs 0, not nan...RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Lon-CoreA - SNMP UPtime" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Uptime" \
--slope-mode \
DEF:a="/var/www/html/rra/loncorea_snmp_oid_365.rrd":snmp_oid:AVERAGE \
AREA:a#F5F800:"Uptime" \
GPRINTLAST:"Current\:%8.2lf%s" \
GPRINTAVERAGE:"Average\:%8.2lf%s" \
GPRINTMAX:"Maximum\:%8.2lf%s\n"
RRDTool Says:
OK
No longer a n00by, probably, by now an 0ldby
Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Perform an snmpget against that OID and check the output, e.gargon0 wrote:I think I missed/misunderstood the maximum value field however, and the data source type (now set to counter).
Code: Select all
IF-MIB::ifOutUcastPkts.1 = Counter32: 5993
0 is "no maximum"Max value - if set to 0 does this mean there is no max value? Or do I need to set a very high one for things like Uptime (I've set it to 99999999999999 for the moment).
There's an "uptime" script/template in the forum, that deals with this kind of data. And yes, there were some post that stated, pure numeric OIDs won't work were "string" OIDs are fine. I never was able to reproduce this on my systems. You may want to catch the SNMP packet with wireshark or the like to check what's going on. cacti uses some more SNMP options when polling, they may confuse the target systemsnmpwalk -v 1 -c read0nly 10.193.174.2 .1.3.6.1.2.1.1.3
SNMPv2-MIB::sysUpTime.0 = Timeticks: (340520301) 39 days, 9:53:23.01
Reinhard
I resolved the issue I was having by using this template:
http://forums.cacti.net/viewtopic.php?t ... me&start=0
Still wonder why I couldn't get it to work was querying same OID as this template is...
Actually its not, its lookinga t .1.3.6.1.2.1.25.1.1.0 instead.... Which returns:
"39 days 09:26:29" (for instance) which is (I guess) a string... Except that's WsPingPro's interpretation - Getif gives "39:10:20:47.65"...
Argon0
http://forums.cacti.net/viewtopic.php?t ... me&start=0
Still wonder why I couldn't get it to work was querying same OID as this template is...
Actually its not, its lookinga t .1.3.6.1.2.1.25.1.1.0 instead.... Which returns:
"39 days 09:26:29" (for instance) which is (I guess) a string... Except that's WsPingPro's interpretation - Getif gives "39:10:20:47.65"...
Argon0
No longer a n00by, probably, by now an 0ldby
Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
hi,
I did the above but theres one thing i dont understand.
When I hit "New Graph" at the top says
Create:[Select a graph type to create]
and from that drop down list I select Generic OID.
at the bottom of the page thoough says "select a graph type". What kind of selections can i do on that list?
Regards
I did the above but theres one thing i dont understand.
When I hit "New Graph" at the top says
Create:[Select a graph type to create]
and from that drop down list I select Generic OID.
at the bottom of the page thoough says "select a graph type". What kind of selections can i do on that list?
Regards
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Please try reading http://docs.cacti.net/node/80
There's more stuff there, please take a read
Reinhard
There's more stuff there, please take a read
Reinhard
OK.....
Revisiting this topic as I'm trying to monitor some Equallogic SANs and am getting virtually no data from the standard templates (none of the SNMP based queries return anything except the Interface Traffic grapsh).
So I decide to try to monitor uptime of the boxes, find the OID, .1.3.6.1.2.1.1.3.0 and try to graph it. From SNMPGET it returns a valid value (as above) which is
Looking in Cacti Log I get that it is putting the TimeTick count into an RRD.
But my graph is just showing 0 everytime. Now I would use the graph I mention above, but I have noticed that
1) It doesn't return the correct uptime on the OID mentioned (.1.3.6.1.2.1.25.1.1.0) (an exchange server which was rebooted last night shows uptime of 7+ days , whereas with the OID I'm trying to query here it gives 16+ hours, leading me to believe the 2nd OID is a better bet).
2) The Equallogic doesn't give any result on the OID mentioned (.1.3.6.1.2.1.25.1.1.0)
I've tried Counter, Guage, Absolute and Derive, but am getting no graph at all.
I followed your link Gandalf but there is nothing there any more...
Revisiting this topic as I'm trying to monitor some Equallogic SANs and am getting virtually no data from the standard templates (none of the SNMP based queries return anything except the Interface Traffic grapsh).
So I decide to try to monitor uptime of the boxes, find the OID, .1.3.6.1.2.1.1.3.0 and try to graph it. From SNMPGET it returns a valid value (as above) which is
Code: Select all
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (362974688) 42 days, 0:15:46.88
But my graph is just showing 0 everytime. Now I would use the graph I mention above, but I have noticed that
1) It doesn't return the correct uptime on the OID mentioned (.1.3.6.1.2.1.25.1.1.0) (an exchange server which was rebooted last night shows uptime of 7+ days , whereas with the OID I'm trying to query here it gives 16+ hours, leading me to believe the 2nd OID is a better bet).
2) The Equallogic doesn't give any result on the OID mentioned (.1.3.6.1.2.1.25.1.1.0)
I've tried Counter, Guage, Absolute and Derive, but am getting no graph at all.
I followed your link Gandalf but there is nothing there any more...
No longer a n00by, probably, by now an 0ldby
Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
OK, forget that, used the template mentioned above, it works fine against my Equallogic Boxes...
Won't use it against Windows Machines, as it seems pretty unreliable for the system itself. (i.e. when I run it against a windows 2k3 server, it reports it has been up for 7+ days (as mentioned) using the 2nd OID, but 16 for the first.
Now I have reminded myself I remember that 2nd OID reports system uptime (as in resource/device) and the other reports SNMP daemon or service uptime. But the former doesn't seem to be accurate, on the basis that I know we powered down the 2k3 Server (OK a restart) last night...
Think it would be better to monitor this via WMI...
Won't use it against Windows Machines, as it seems pretty unreliable for the system itself. (i.e. when I run it against a windows 2k3 server, it reports it has been up for 7+ days (as mentioned) using the 2nd OID, but 16 for the first.
Now I have reminded myself I remember that 2nd OID reports system uptime (as in resource/device) and the other reports SNMP daemon or service uptime. But the former doesn't seem to be accurate, on the basis that I know we powered down the 2k3 Server (OK a restart) last night...
Think it would be better to monitor this via WMI...
No longer a n00by, probably, by now an 0ldby
Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Who is online
Users browsing this forum: No registered users and 0 guests