SNMP-Informant-STD Memory Usage (Windows)
Moderators: Developers, Moderators
SNMP-Informant-STD Memory Usage (Windows)
This uses the SNMP-Informants Standard MIB Add-On to graph Memory stats on Windows.
You must have SNMP-Informant Standard MIB Add-On install on the Windows host you are polling in order for this to work. If you are not familiar with SNMP-Informant, it is a free download, and is extremely stable, since it does not add any services to the machine.
I have tested this on windows 2000 and windows 2003 systems and seems to be accurate.
Note
-----
There is a custom CDEF included in this that requiers the order remain the same in the graph template, if you change it it will break.
What it Graphs
--------------------
* Installed Memory (Static)
* Available Memory (Current and Average)
* Used Memory (Current and Average)
* Cache Resident Memory (Current and Average)
* Page Faults (Current and Average)
You must have SNMP-Informant Standard MIB Add-On install on the Windows host you are polling in order for this to work. If you are not familiar with SNMP-Informant, it is a free download, and is extremely stable, since it does not add any services to the machine.
I have tested this on windows 2000 and windows 2003 systems and seems to be accurate.
Note
-----
There is a custom CDEF included in this that requiers the order remain the same in the graph template, if you change it it will break.
What it Graphs
--------------------
* Installed Memory (Static)
* Available Memory (Current and Average)
* Used Memory (Current and Average)
* Cache Resident Memory (Current and Average)
* Page Faults (Current and Average)
- Attachments
-
- SNMP-Informant-Memory.JPG (41.72 KiB) Viewed 32903 times
-
- cacti_graph_template_snmp_informantstd_memory.xml
- (25.92 KiB) Downloaded 4424 times
- Aaron Jeskey
Thank you for the snmp-informant templates! I was having trouble getting these parameters with the default Windows templates.
I'm having some trouble with this graph though. The installed memory is nan, as is used memory. I'm guessing the used memory parameter is simply installed memory - available memory, so it also becomes nan.
I can see the OID for installed mem from snmp:
# snmpwalk -v 1 -c public x.x.x.x .1.3.6.1.2.1.25.2.2.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 1048112 KBytes
The polled machine is Windows 2000.
Any idea why this isn't working?
I'm having some trouble with this graph though. The installed memory is nan, as is used memory. I'm guessing the used memory parameter is simply installed memory - available memory, so it also becomes nan.
I can see the OID for installed mem from snmp:
# snmpwalk -v 1 -c public x.x.x.x .1.3.6.1.2.1.25.2.2.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 1048112 KBytes
The polled machine is Windows 2000.
Any idea why this isn't working?
- Attachments
-
- untitled.gif (7.2 KiB) Viewed 32838 times
What happens when you poll .1.3.6.1.2.1.25.2.2.0 with SNMPv2? I am getting the correct info from Host-Resourves-V2, I never tested with v1
If you want to force this graph use V1 go to the Data Template "SNMP - Informant-STD - Memory Installed", at the bottom you'll see "SNMP Version (1, 2, or 3)" but a 1 in there and see if it works.
You may end up with a crazy number, if that is the case try turning the applied CDEF for the Installed memory GPRINT to "None" (its set to "Multiply by 1024" now)
You are correct about the Used Memory; it is derived from Installed - Available.
Let me know if any of that helps
If you want to force this graph use V1 go to the Data Template "SNMP - Informant-STD - Memory Installed", at the bottom you'll see "SNMP Version (1, 2, or 3)" but a 1 in there and see if it works.
You may end up with a crazy number, if that is the case try turning the applied CDEF for the Installed memory GPRINT to "None" (its set to "Multiply by 1024" now)
You are correct about the Used Memory; it is derived from Installed - Available.
Let me know if any of that helps
- Aaron Jeskey
I don't think changing the snmp version helps:
# snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.2.1.25.2.2.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 1048112 KBytes
# snmpwalk -v 1 -c public x.x.x.x .1.3.6.1.2.1.25.2.2.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 1048112 KBytes
Could the problem be the "KBytes" that the snmpwalk returns? It's not a number.
If I dump the rra file with rrdtool dump, all of the records have NaN.
# snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.2.1.25.2.2.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 1048112 KBytes
# snmpwalk -v 1 -c public x.x.x.x .1.3.6.1.2.1.25.2.2.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 1048112 KBytes
Could the problem be the "KBytes" that the snmpwalk returns? It's not a number.
If I dump the rra file with rrdtool dump, all of the records have NaN.
no since its a returned integer, your snmpwalk tool is just transforming it to kbytes.
First try turning off the CDEF for the Installed memory under the graph template. If that doesnt help, try pulling all the data sources data templates and graph referances out, reimport it.
Are you using the default SNMPD that comes with windows?
First try turning off the CDEF for the Installed memory under the graph template. If that doesnt help, try pulling all the data sources data templates and graph referances out, reimport it.
Are you using the default SNMPD that comes with windows?
- Aaron Jeskey
I turned the CDEFs off and it didn't make a difference. Yes, the windows servers are using the default snmpd. I'm running cacti on Redhat ES 3.
I think the problem is with getting the data into the rra file. I see only NaN in my rrdtool dumps.
I'm using rrdtool 1.0.49. Should I try a 1.2 release? I'm also using cactid 0.8.6d on cacti-0.8.6e.
I think the problem is with getting the data into the rra file. I see only NaN in my rrdtool dumps.
I'm using rrdtool 1.0.49. Should I try a 1.2 release? I'm also using cactid 0.8.6d on cacti-0.8.6e.
I am on "c" and runing 1.0.49
I would tend to belive versions mis match is your problem, since both things that don't show up have CDEFs applied to them; and CDEFs are an RRDtool function. try getting your RRD. I know that when I tried to get "d" working with my current version of RRDtool nothing workd.
I am fairly sure that you should be runnign 1.2 if you are on "d"
I would tend to belive versions mis match is your problem, since both things that don't show up have CDEFs applied to them; and CDEFs are an RRDtool function. try getting your RRD. I know that when I tried to get "d" working with my current version of RRDtool nothing workd.
I am fairly sure that you should be runnign 1.2 if you are on "d"
- Aaron Jeskey
try turnign off the CDEF now for installed memory just to see what happens. its a good sign that used shows up as a negitive number now, it means that the CDEF is actuayl working now. So its an issue with the installed memory being read from the machine (or how cacti is handeling that)
- Aaron Jeskey
I turned the CDEF off, it made no difference. Here's some output from my .rra:
Here's the memAvailable file, it has many updates:
Chad
Notice that it only updated the RRD once, when it was created, and it was updated with a 0.00000.# rrdtool dump xxx_meminforminstalled_2147.rrd | grep row | grep -v NaN
<pdp_per_row> 1 </pdp_per_row> <!-- 300 seconds -->
<!-- 2005-06-23 13:20:00 NDT / 1119541800 --> <row><v> 0.0000000000e+00 </v></row>
<pdp_per_row> 6 </pdp_per_row> <!-- 1800 seconds -->
Here's the memAvailable file, it has many updates:
If I get the value via snmpwalk, I get a response that's not zero:# rrdtool dump xxx_meminformavailable_2145.rrd | grep row | grep -v NaN
<pdp_per_row> 1 </pdp_per_row> <!-- 300 seconds -->
<!-- 2005-06-23 13:20:00 NDT / 1119541800 --> <row><v> 7.5015140818e+08 </v></row>
<!-- 2005-06-23 13:25:00 NDT / 1119542100 --> <row><v> 7.5792793600e+08 </v></row>
<!-- 2005-06-23 13:30:00 NDT / 1119542400 --> <row><v> 7.5661721600e+08 </v></row>
<!-- 2005-06-23 13:35:00 NDT / 1119542700 --> <row><v> 7.5102617600e+08 </v></row>
<!-- 2005-06-23 13:40:00 NDT / 1119543000 --> <row><v> 7.5650468523e+08 </v></row>
<!-- 2005-06-23 13:45:00 NDT / 1119543300 --> <row><v> 7.5680877227e+08 </v></row>
<!-- 2005-06-23 13:50:00 NDT / 1119543600 --> <row><v> 7.5575909035e+08 </v></row>
<!-- 2005-06-23 13:55:00 NDT / 1119543900 --> <row><v> 7.5739136000e+08 </v></row>
<pdp_per_row> 6 </pdp_per_row> <!-- 1800 seconds -->
Thanks,# snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.2.1.25.2.2.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 1179120 KBytes
Chad
Here's the cacti.log section where it puts the value into poller_output:
Here's the output from cacti.log when the .rra gets created:06/23/2005 02:30:25 PM - CACTID: Poller[0] Host[136] SNMP: v2: x.x.x.x, dsname: meminformInstalled, oid: .1.3.6.1.2.1.25.2.2.0, value: 1048112 KBytes
06/23/2005 02:30:25 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (2176,'meminformInstalled','2005-06-23 14:30:18','1048112 KBytes')
Somewhere between the poll and updating poller_output, the value gets changed from 1048112 to U.06/23/2005 02:31:23 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /usr/local/cacti-0.8.6e/rra/nltechsupport_meminforminstalled_2176.rrd --step 300 DS:meminformInstalled:GAUGE: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
06/23/2005 02:31:23 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/local/cacti-0.8.6e/rra/nltechsupport_meminforminstalled_2176.rrd --template meminformInstalled N:U
Upon further checking, it looks like the problem is this line:
I manually inserted a record into poller_output while it was populating from cactid without the "KBytes" string and the .rra file updated correctly:06/23/2005 02:30:25 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (2176,'meminformInstalled','2005-06-23 14:30:18','1048112 KBytes')
Now, how do I prevent it from happening?insert into poller_output (local_data_id,rrd_name,time,output) values (2176,'meminformInstalled','2005-06-23 14:30:18','1048112')
you've got me on this one. You may want to start a thread in the general help forums and point them this way.
Glad to see that its working. Does it look good / what you wanted?
I think the next thing I should do with this is get it to report in bytes... but I've got a few others under my belts ATM, we'll see.
Glad to see that its working. Does it look good / what you wanted?
I think the next thing I should do with this is get it to report in bytes... but I've got a few others under my belts ATM, we'll see.
- Aaron Jeskey
Who is online
Users browsing this forum: No registered users and 4 guests