Please help ! Need to graph custom SNMP OID
Moderators: Developers, Moderators
-
- Posts: 9
- Joined: Fri Jan 04, 2008 12:48 pm
Please help ! Need to graph custom SNMP OID
Hello,
I have been struggling for MONTHS trying to get Cacti 0.8.6j to graph a custom SNMP OID. I have tried Cisco and Lucent devices and I have not been successful once.
Please help !!! What am I doing wrong??
Right now my primary goal is to be able to graph something simple such as # of modems on a Lucent NAS (TNT/APX).
SNMP OID I am trying to graph:
.1.3.6.1.2.1.38.1.1.0
I have done the following:
- Added new device
- Added new graph using "Generic SNMP Generic OID Template"
On the next screen for configuration of the Generic SNMP OID Template I setup the following:
Data Source: Max Value 0
Data Source Type: COUNTER
OID: .1.3.6.1.2.1.38.1.1.0
When I go to Graph Management and drill into my device and graph I just created, it appears and shows the graph (value is NAN until poller gets the data), however then it changes from NAN > "0". (Current/Maximum/Average are all 0).
I have read just about every walkthru on this site, and nowhere is a step by step walkthru on how successfully add a custom SNMP OID (gives examples of adding Unix server SNMP stuff, then explains on how to make a custom data query, but I just havent been able to find 1 walkthru that puts it all together...)
Please anyone with any thoughts let me know, and please do not point me to the walkthrus on this site, as they are all over the place and have not helped me achieve adding something which should be very simple.
Graph Management Debug:
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="DEVICE - MODEMS" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/DEVICE_snmp_oid_2711.rrd":snmp_oid:AVERAGE \
AREA:a#F5F800:"legend text" \
GPRINTLAST:"Current\:%8.2lf%s" \
GPRINTAVERAGE:"Average\:%8.2lf%s" \
GPRINTMAX:"Maximum\:%8.2lf%s\n"
Data Source Debug:
/usr/bin/rrdtool create \
/var/www/html/cacti/rra/DEVICE_snmp_oid_2711.rrd \
--step 300 \
DS:snmp_oid:COUNTER:600:0:U \
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 \
Also one other note - when I do a snmpwalk on the OID i'm trying to graph, I do indeed get the correct value:
[root@server root]# snmpwalk -v 1 -c public 200.200.200.1 .1.3.6.1.2.1.38.1.1.0
SNMPv2-SMI::mib-2.38.1.1.0 = INTEGER: 576
Sorry to state walkthrus have not helped me but I'm just being honest (and frustrated...).
Once I can get ANY custom SNMP graphs to work, I also will be wanting to have multiple items on a graph (such as # of available modems, # of modems in use ... basically group valuable info together on a single graph not necessarily modems but this will prob be my 1st test). Any good info on how to add multiple items to a graph would also be very helpful.
Thanks for any input!
Rainman
I have been struggling for MONTHS trying to get Cacti 0.8.6j to graph a custom SNMP OID. I have tried Cisco and Lucent devices and I have not been successful once.
Please help !!! What am I doing wrong??
Right now my primary goal is to be able to graph something simple such as # of modems on a Lucent NAS (TNT/APX).
SNMP OID I am trying to graph:
.1.3.6.1.2.1.38.1.1.0
I have done the following:
- Added new device
- Added new graph using "Generic SNMP Generic OID Template"
On the next screen for configuration of the Generic SNMP OID Template I setup the following:
Data Source: Max Value 0
Data Source Type: COUNTER
OID: .1.3.6.1.2.1.38.1.1.0
When I go to Graph Management and drill into my device and graph I just created, it appears and shows the graph (value is NAN until poller gets the data), however then it changes from NAN > "0". (Current/Maximum/Average are all 0).
I have read just about every walkthru on this site, and nowhere is a step by step walkthru on how successfully add a custom SNMP OID (gives examples of adding Unix server SNMP stuff, then explains on how to make a custom data query, but I just havent been able to find 1 walkthru that puts it all together...)
Please anyone with any thoughts let me know, and please do not point me to the walkthrus on this site, as they are all over the place and have not helped me achieve adding something which should be very simple.
Graph Management Debug:
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="DEVICE - MODEMS" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/DEVICE_snmp_oid_2711.rrd":snmp_oid:AVERAGE \
AREA:a#F5F800:"legend text" \
GPRINTLAST:"Current\:%8.2lf%s" \
GPRINTAVERAGE:"Average\:%8.2lf%s" \
GPRINTMAX:"Maximum\:%8.2lf%s\n"
Data Source Debug:
/usr/bin/rrdtool create \
/var/www/html/cacti/rra/DEVICE_snmp_oid_2711.rrd \
--step 300 \
DS:snmp_oid:COUNTER:600:0:U \
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 \
Also one other note - when I do a snmpwalk on the OID i'm trying to graph, I do indeed get the correct value:
[root@server root]# snmpwalk -v 1 -c public 200.200.200.1 .1.3.6.1.2.1.38.1.1.0
SNMPv2-SMI::mib-2.38.1.1.0 = INTEGER: 576
Sorry to state walkthrus have not helped me but I'm just being honest (and frustrated...).
Once I can get ANY custom SNMP graphs to work, I also will be wanting to have multiple items on a graph (such as # of available modems, # of modems in use ... basically group valuable info together on a single graph not necessarily modems but this will prob be my 1st test). Any good info on how to add multiple items to a graph would also be very helpful.
Thanks for any input!
Rainman
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Sorry to again point you to a walkthrough: please see 2nd link of my sig for debugging.
There's an exact SNMP generic OID walkthrough at http://docs.cacti.net/?q=node/80. Did you came across this one?
Reinhard
There's an exact SNMP generic OID walkthrough at http://docs.cacti.net/?q=node/80. Did you came across this one?
Reinhard
-
- Posts: 9
- Joined: Fri Jan 04, 2008 12:48 pm
Thanks
Gandolf,
Thanks for your reply. My only issue w/ that walkthru is the provided example is setting up graphing for "udpInDatagrams", using a Data Source Item of "udpInDatagrams" (assuming it's already defined and we are just calling it now).
I would think this example is good for graphing UDP packets that are passed across a device's interface, but I am trying to graph # of modems for my 1st test (dont think I can use the udpInDatagrams Data Source for this). Also think about it this way - what if I was trying to graph something such as UPS uptime remaining this is also a good example because it doesnt use any of the existing Data Sources as far as I know.
If what I need to do is create a custom Data Source before attempting to create the Data Template then that is where I am getting stuck (example only shows how to use an existing Data Source and for someone graphing custom SNMP data i dont know if this helps maybe it does maybe I'm just thinking about it incorrectly).
Thanks again for any help.
Rainman
Thanks for your reply. My only issue w/ that walkthru is the provided example is setting up graphing for "udpInDatagrams", using a Data Source Item of "udpInDatagrams" (assuming it's already defined and we are just calling it now).
I would think this example is good for graphing UDP packets that are passed across a device's interface, but I am trying to graph # of modems for my 1st test (dont think I can use the udpInDatagrams Data Source for this). Also think about it this way - what if I was trying to graph something such as UPS uptime remaining this is also a good example because it doesnt use any of the existing Data Sources as far as I know.
If what I need to do is create a custom Data Source before attempting to create the Data Template then that is where I am getting stuck (example only shows how to use an existing Data Source and for someone graphing custom SNMP data i dont know if this helps maybe it does maybe I'm just thinking about it incorrectly).
Thanks again for any help.
Rainman
-
- Posts: 9
- Joined: Fri Jan 04, 2008 12:48 pm
Ok
I will give it another try ... I notice your AIM ID is on here would you mind if I added you in case I have a Q?
Thanks so much -
Rainman
Thanks so much -
Rainman
Re: Please help ! Need to graph custom SNMP OID
I'm not familiar with the OID in question, but I'll try a shot in the dark here, since I believe I see a generic mistake.rainman1976 wrote:What am I doing wrong??
Assuming the number of modems has never changed between polls, that's correct: you are currently graphing variation in the number of modems, not number of modems itself.rainman1976 wrote:then it changes from NAN > "0". (Current/Maximum/Average are all 0).
Try gauge instead of counter.rainman1976 wrote:Data Source Type: COUNTER
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Ok
Sure. That's why I published it here. But do not expect to find me online too often ...rainman1976 wrote:I will give it another try ... I notice your AIM ID is on here would you mind if I added you in case I have a Q?
Thanks so much -
Rainman
Reinhard
-
- Posts: 9
- Joined: Fri Jan 04, 2008 12:48 pm
ok got a bit further....
I followed the link you gave me above and went through the example provided (step by step). This indeed does work for graphing UDP statistics on an interface.
I took what I learned from this and tried to reapply it to graph a custom OID:
MIB: ASCEND-ADVANCED-AGENT-MIB
OID: .1.3.6.1.4.1.529.4.26.0
OBJECT: wanAvailableModemChannels.0
I created my Data Template for this, and named it "Channels in Use". Data source item i left set to "snmp_oid". Rest of the options for Data Template I kept from your example (changed OID obviously...)
Built my Graph Template and added in 1 graph item for the above Data Template i made (picked a color, graph item type = area, text format = "channels". Also added in the "legend" to provide min/avg/max stats on the graph.
Here's where I think i'm getting stuck now. I built the Host Template called it "Lucent/Ascend NAS". Under Associated Graph Templates i added my Graph Template I built in previous step. For the Associated Data Queries, I did NOT select "SNMP Interface Statistics" since this data I am pulling is NOT on an interface (it's on the device itself... modems in use not tied to an interface...)
Now that I have a Host Template built, I went to add a new host, selected my Host Template and it auto added the Graph Template as I expected. Saved the host then went to check graphs for the host and there are none.
Any suggestions for next step? I believe I have everything built correctly but again did not select SNMP Interface Statistics since this is not an interface I am polling...
Thanks again so much you have been very helpful and yes the walkthru is helpful i just needed to perform your example before trying to apply it to something..... almost there!
Rainman
I took what I learned from this and tried to reapply it to graph a custom OID:
MIB: ASCEND-ADVANCED-AGENT-MIB
OID: .1.3.6.1.4.1.529.4.26.0
OBJECT: wanAvailableModemChannels.0
I created my Data Template for this, and named it "Channels in Use". Data source item i left set to "snmp_oid". Rest of the options for Data Template I kept from your example (changed OID obviously...)
Built my Graph Template and added in 1 graph item for the above Data Template i made (picked a color, graph item type = area, text format = "channels". Also added in the "legend" to provide min/avg/max stats on the graph.
Here's where I think i'm getting stuck now. I built the Host Template called it "Lucent/Ascend NAS". Under Associated Graph Templates i added my Graph Template I built in previous step. For the Associated Data Queries, I did NOT select "SNMP Interface Statistics" since this data I am pulling is NOT on an interface (it's on the device itself... modems in use not tied to an interface...)
Now that I have a Host Template built, I went to add a new host, selected my Host Template and it auto added the Graph Template as I expected. Saved the host then went to check graphs for the host and there are none.
Any suggestions for next step? I believe I have everything built correctly but again did not select SNMP Interface Statistics since this is not an interface I am polling...
Thanks again so much you have been very helpful and yes the walkthru is helpful i just needed to perform your example before trying to apply it to something..... almost there!
Rainman
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: ok got a bit further....
You did "Create Graphs for this Host", did you? Graphs with cacti are NOT autocreated!rainman1976 wrote:Now that I have a Host Template built, I went to add a new host, selected my Host Template and it auto added the Graph Template as I expected. Saved the host then went to check graphs for the host and there are none.
Reinhard
-
- Posts: 9
- Joined: Fri Jan 04, 2008 12:48 pm
Progress !!
Thank you both so much for your suggestions. Reinhard you were right I did have to manually make the graph (i thought making the graph template would do this but my understanding of graph templates was off a bit...). Made a graph and did a test call to the dialup shelf to see if graphing works and sure enough it did but it did not give me a "1" like I expected to represent 1 call. Instead it is showing on the left side "0.0 through 3.0 m" and on the legend it showed the current value as "3.32m" but snmpget is returning a value of 1 to represent 1 call.
Sorry to be a pain guys but again thank you for your assistance I used MRTG many years ago and also Concord eHealth ($$$$$), and I think Cacti is the by far a much better application.
Thank you again!!
-Rainman
Sorry to be a pain guys but again thank you for your assistance I used MRTG many years ago and also Concord eHealth ($$$$$), and I think Cacti is the by far a much better application.
Thank you again!!
-Rainman
-
- Posts: 9
- Joined: Fri Jan 04, 2008 12:48 pm
Need a bit more help
Hello,
Not sure if anyone completely read through my last post, but I was still having issues with Cacti graphing my custom OID correctly. SNMPGET returns a value of "1" to represent 1 call on the dialup shelf I am testing, however Cacti is graphing this as something such as 1.35 or so. Not sure how Cacti is mis-interpreting this value is there something I can change to fix this? I think I am almost there, just have to iron out this value being displayed incorrectly.
Thanks again for your diligence!!
-Rainman
Not sure if anyone completely read through my last post, but I was still having issues with Cacti graphing my custom OID correctly. SNMPGET returns a value of "1" to represent 1 call on the dialup shelf I am testing, however Cacti is graphing this as something such as 1.35 or so. Not sure how Cacti is mis-interpreting this value is there something I can change to fix this? I think I am almost there, just have to iron out this value being displayed incorrectly.
Thanks again for your diligence!!
-Rainman
Are you wanting it to graph whole numbers only? I think this is what you are asking. If this is the case, I went through this very thing and by searching the internet and trial and error, I came up with a solution.
Basically, the problem is that the default rra's in Cacti all use the average function as a consolidation function. What I did is basically copy all the rra's to my own and add the "Last" function as a consolidation function. That way when the graph displays the data, it correctly show the last polled number. Also, you will want to set the "GPRINT type" to "Exact Numbers." This is how I got it to work. I don't claim to be an expert, but I can sympathize with you and am just offering some suggestions based on what I have figured out on my own.
I'm work for an ISP and am tasked with creating/maintaining a new monitoring server. I am the only one in the company that has any programming background. There is no one else here that knows anything about Linux OS's. I am truly on my own and am forced to do the research/experimentation to accomplish the goals that I want. I hope this information is helpful to you and anyone else in the same situation.
Scott
Basically, the problem is that the default rra's in Cacti all use the average function as a consolidation function. What I did is basically copy all the rra's to my own and add the "Last" function as a consolidation function. That way when the graph displays the data, it correctly show the last polled number. Also, you will want to set the "GPRINT type" to "Exact Numbers." This is how I got it to work. I don't claim to be an expert, but I can sympathize with you and am just offering some suggestions based on what I have figured out on my own.
I'm work for an ISP and am tasked with creating/maintaining a new monitoring server. I am the only one in the company that has any programming background. There is no one else here that knows anything about Linux OS's. I am truly on my own and am forced to do the research/experimentation to accomplish the goals that I want. I hope this information is helpful to you and anyone else in the same situation.
Scott
- Attachments
-
- CMTSModemsOnline.png (22.26 KiB) Viewed 7352 times
-
- Posts: 9
- Joined: Fri Jan 04, 2008 12:48 pm
I will check it out
thanks for your input i will check it out. Here is a copy of what my graph currently looks like (should have registered as 1 on the graph...):
I will let you know if I make any progress thanks again.
Rainman
I will let you know if I make any progress thanks again.
Rainman
This is what I did (in pictures):
- Attachments
-
- For your GPRINT's, consolidation funtion = LAST and GPRINT type = Exact numbers.
- GraphTemplate2.JPG (81.34 KiB) Viewed 7321 times
-
- In the graph template, in the "Consolidation Function" field, select "Last" as the type.
- GraphTemplate1.JPG (73.07 KiB) Viewed 7321 times
-
- In the data template, select your newly created rra's.
- DataTemplate.JPG (77.08 KiB) Viewed 7321 times
-
- Added the "Last" consolidation function.
- RRA2.JPG (62.12 KiB) Viewed 7321 times
-
- The red dotted lines are the rra's I added.
- RRA1.JPG (60.12 KiB) Viewed 7321 times
Who is online
Users browsing this forum: No registered users and 4 guests