DataQuery Problem with SNMP Informant - EDIT -> SOLVED

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
User avatar
joed
Posts: 29
Joined: Mon Sep 19, 2005 6:27 am
Location: Germany/Palatinate

DataQuery Problem with SNMP Informant - EDIT -> SOLVED

Post by joed »

I'm trying to write data queries for the free version from SNMP Informant .

My Data Query for "available harddisks" works fine, I made a Data Template for the free space in GB, a graph template and so one...

The querie tells me the available drive letters for the Win2000 Device and I'm able to create a graph for each harddisk.

In the cacti logfile I found the according entry:
09/26/2005 05:21:02 PM - CMDPHP: Poller[0] Host[31] DS[124] SNMP: v1: nwsh1-management.stadt-nw.de, dsname: snmpi_freemb, oid: .1.3.6.1.4.1.9600.1.1.1.1.20.2.68.58, output: 8025

Now i wanted to do the same for the CPU of this win machine. Doing the same steps I created the XML File:
<query>
<name>Win32 CPU Table - SNMP (Informant)</name>
<description>Using SNMP-Informant Queries for a list of cpus and their stats</description>
<oid_index>.1.3.6.1.4.1.9600.1.1.5.1.1</oid_index>
<oid_index_parse>OID/REGEXP:.*\.9600\.1\.1\.5\.1\.1\.([0-9\.]*)$</oid_index_parse>
<index_order>informCpuInstance</index_order>
<index_order_type>alphabetic</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<informCpuInstance>
<name>Cpu Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.1</oid>
</informCpuInstance>
<informPercentProcessorTime>
<name>Percent Processor Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.5</oid>
</informPercentProcessorTime>
</fields>
</query>
Created a Data Query, Data and Graph Template. And I'm also able to list the CPUs of my Device, they are named "0" and "1". I'm also able to create the graphs with the according Data Sources, but cacti ist not polling any data.
I can't find an entry in the logfile ?

The data Source debug says:
Data Source Debug

c:/rrdtool/rrdtool.exe create \
C:/cactid/rra/nwsh1management_snmpi_cputime_126.rrd \
--step 300 \
DS:snmpi_cputime:GAUGE:600:0:100 \
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: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 \
And here the data query debug (this is only a one cpu machine, but i tested it also on a 2 cpu machine)
Data Query Debug Information

+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'C:/cactid/resource/script_queries/win32_cpu.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9600.1.1.5.1.1'
+ Located input field 'informCpuInstance' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9600.1.1.5.1.1'
+ Found item [informCpuInstance='0'] index: 1.48 [from value]
+ Found item [informCpuInstance='_Total'] index: 6.95.84.111.116.97.108 [from value]
+ Found data query XML file at 'C:/cactid/resource/script_queries/win32_cpu.xml'
+ Found data query XML file at 'C:/cactid/resource/script_queries/win32_cpu.xml'
+ Found data query XML file at 'C:/cactid/resource/script_queries/win32_cpu.xml'
+ Found data query XML file at 'C:/cactid/resource/script_queries/win32_cpu.xml'
Last edited by joed on Wed Oct 12, 2005 7:24 am, edited 1 time in total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You realize there is already a template in cacti that does this exact same thing? It's called SNMP - Get Processor Information
johnny2can
Posts: 1
Joined: Mon Sep 26, 2005 11:43 pm

Post by johnny2can »

BSOD2600 wrote:You realize there is already a template in cacti that does this exact same thing? It's called SNMP - Get Processor Information
...however, that script uses the OID .1.3.6.1.2.1.25.3.3.1, which does not appear to exist, at least not in my win2k/winxp environment...

For "Processor Time" (in percent), SNMP Informant uses .1.3.6.1.4.1.9600.1.1.5.1.5.1 with the index starting at .48 (again, at least in my environment).

Joed, I think you may need to tweak your OID a bit... it looks like you need to go one deeper in the OID for the indices...

i.e. *\.9600\.1\.1\.5\.1\.1\.1\.([48-68\.]*) (yeah, I know my syntax is wrong... it's just for illustration).
snmpwalk -v1 -c public -One goods .1.3.6.1.4.1.9600.1.1.5.1

.1.3.6.1.4.1.9600.1.1.5.1.1.1.48 = STRING: "0"
.1.3.6.1.4.1.9600.1.1.5.1.1.1.49 = STRING: "1"
.1.3.6.1.4.1.9600.1.1.5.1.1.1.50 = STRING: "2"
.1.3.6.1.4.1.9600.1.1.5.1.1.1.51 = STRING: "3"
.1.3.6.1.4.1.9600.1.1.5.1.1.6.95.84.111.116.97.108 = STRING: "_Total"
.1.3.6.1.4.1.9600.1.1.5.1.2.1.48 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.2.1.49 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.2.1.50 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.2.1.51 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.2.6.95.84.111.116.97.108 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.3.1.48 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.3.1.49 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.3.1.50 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.3.1.51 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.3.6.95.84.111.116.97.108 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.4.1.48 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.4.1.49 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.4.1.50 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.4.1.51 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.4.6.95.84.111.116.97.108 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.5.1.48 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.5.1.49 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.5.1.50 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.5.1.51 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.5.6.95.84.111.116.97.108 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.6.1.48 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.6.1.49 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.6.1.50 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.6.1.51 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.6.6.95.84.111.116.97.108 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.7.1.48 = Gauge32: 1
.1.3.6.1.4.1.9600.1.1.5.1.7.1.49 = Gauge32: 1
.1.3.6.1.4.1.9600.1.1.5.1.7.1.50 = Gauge32: 2
.1.3.6.1.4.1.9600.1.1.5.1.7.1.51 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.7.6.95.84.111.116.97.108 = Gauge32: 5
.1.3.6.1.4.1.9600.1.1.5.1.8.1.48 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.8.1.49 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.8.1.50 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.8.1.51 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.8.6.95.84.111.116.97.108 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.9.1.48 = Gauge32: 3
.1.3.6.1.4.1.9600.1.1.5.1.9.1.49 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.9.1.50 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.9.1.51 = Gauge32: 0
.1.3.6.1.4.1.9600.1.1.5.1.9.6.95.84.111.116.97.108 = Gauge32: 3
.1.3.6.1.4.1.9600.1.1.5.1.10.1.48 = Gauge32: 8
.1.3.6.1.4.1.9600.1.1.5.1.10.1.49 = Gauge32: 9
.1.3.6.1.4.1.9600.1.1.5.1.10.1.50 = Gauge32: 11
.1.3.6.1.4.1.9600.1.1.5.1.10.1.51 = Gauge32: 9
.1.3.6.1.4.1.9600.1.1.5.1.10.6.95.84.111.116.97.108 = Gauge32: 39
.1.3.6.1.4.1.9600.1.1.5.1.11.1.48 = Gauge32: 71
.1.3.6.1.4.1.9600.1.1.5.1.11.1.49 = Gauge32: 64
.1.3.6.1.4.1.9600.1.1.5.1.11.1.50 = Gauge32: 63
.1.3.6.1.4.1.9600.1.1.5.1.11.1.51 = Gauge32: 64
.1.3.6.1.4.1.9600.1.1.5.1.11.6.95.84.111.116.97.108 = Gauge32: 263
That's my two cents...
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Unless there is something horribly wrong with your SNMP agent, .1.3.6.1.2.1.25.3.3.1 does exist on every Windows host. You need to walk it to find the last OID number(s) for your CPU(s).
User avatar
joed
Posts: 29
Joined: Mon Sep 19, 2005 6:27 am
Location: Germany/Palatinate

Post by joed »

@BSOD2600: I want to make templates for all that nice Informations for this SNMP extension and publish the whole stuff ;-)

@johnny2can: I'm out of office for the rest of this week and will have a look at the OID an Monday.

Thx for all comments.
User avatar
joed
Posts: 29
Joined: Mon Sep 19, 2005 6:27 am
Location: Germany/Palatinate

Post by joed »

ok, finally it works ;-)

watch my screenshots
Attachments
look at &amp;quot;Associated Graph Templates&amp;quot; and &amp;quot;Associated Data Queries&amp;quot;
look at &quot;Associated Graph Templates&quot; and &quot;Associated Data Queries&quot;
device1.jpg (252.74 KiB) Viewed 2645 times
2 CPUs (HT) and one harddisk is available
2 CPUs (HT) and one harddisk is available
device2.jpg (223.04 KiB) Viewed 2645 times
graphs.jpg
graphs.jpg (234.81 KiB) Viewed 2645 times
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests