Templates and difficult instances - SNMP Informant
Moderators: Developers, Moderators
Templates and difficult instances - SNMP Informant
Hi all,
I've successfully managed to write templates for CPU, Memory, Terminal Services etc from the Informant Advanced package however I am struggling with the disk template using the logical disk counters.
The logical disk instance is not the last OID object returned in the instance and the last object is the ASCII equivalent for the colon after the drive letter. The bolded OID object is the actual instance.
.1.3.6.1.4.1.9600.1.2.44.1.1.2.67.58 is C:
.1.3.6.1.4.1.9600.1.2.44.1.1.2.68.58 is D:
.1.3.6.1.4.1.9600.1.2.44.1.1.2.69.58 is E:
When I run my data query, Cacti can see the drive letters however it states the instance index is .58 for each (except the total disk).
+ Running data query [17].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'D:\Websites\stats.boots.no-ip.org\Cacti/resource/snmp_queries/win32_disk.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9600.1.2.44.1.1'
+ Located input field 'diskinstance' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9600.1.2.44.1.1'
+ Found item [diskinstance='C:'] index: 58 [from value]
+ Found item [diskinstance='D:'] index: 58 [from value]
+ Found item [diskinstance='E:'] index: 58 [from value]
+ Found item [diskinstance='_Total'] index: 108 [from value]
+ Found data query XML file at 'D:\Websites\stats.boots.no-ip.org\Cacti/resource/snmp_queries/win32_disk.xml'
+ Found data query XML file at 'D:\Websites\stats.boots.no-ip.org\Cacti/resource/snmp_queries/win32_disk.xml'
+ Found data query XML file at 'D:\Websites\stats.boots.no-ip.org\Cacti/resource/snmp_queries/win32_disk.xml'
When I create the graphs for the host, and expect to select the C, D, E and total instances, the data query only presents the E: and total instances to select from. What the data query thinks is the index is the same for the C, D and E instances so for some reason Cacti only knows about the last one and presents that in the query.
My question to all is how can I write my data query to recognise the instance as the second last OID object and not the last? ie,
My snmp data query is
<interface>
<name>Win32 - Informant - Disk Stats</name>
<description>Using SNMP-Informant Queries a host for a list of Disk(s) and their stats</description>
<oid_index>.1.3.6.1.4.1.9600.1.2.44.1.1</oid_index>
<index_order_type>numeric</index_order_type>
<fields>
<diskinstance>
<name>Disk Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9600.1.2.44.1.1</oid>
</diskinstance>
<diskfreespace>
<name>Free Space</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.2.44.1.5</oid>
</diskfreespace>
</fields>
</interface>
Any advice would be greatly appreciated and I'll post my templates when I nail this one.
Thanks in advance
Steve
I've successfully managed to write templates for CPU, Memory, Terminal Services etc from the Informant Advanced package however I am struggling with the disk template using the logical disk counters.
The logical disk instance is not the last OID object returned in the instance and the last object is the ASCII equivalent for the colon after the drive letter. The bolded OID object is the actual instance.
.1.3.6.1.4.1.9600.1.2.44.1.1.2.67.58 is C:
.1.3.6.1.4.1.9600.1.2.44.1.1.2.68.58 is D:
.1.3.6.1.4.1.9600.1.2.44.1.1.2.69.58 is E:
When I run my data query, Cacti can see the drive letters however it states the instance index is .58 for each (except the total disk).
+ Running data query [17].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'D:\Websites\stats.boots.no-ip.org\Cacti/resource/snmp_queries/win32_disk.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9600.1.2.44.1.1'
+ Located input field 'diskinstance' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9600.1.2.44.1.1'
+ Found item [diskinstance='C:'] index: 58 [from value]
+ Found item [diskinstance='D:'] index: 58 [from value]
+ Found item [diskinstance='E:'] index: 58 [from value]
+ Found item [diskinstance='_Total'] index: 108 [from value]
+ Found data query XML file at 'D:\Websites\stats.boots.no-ip.org\Cacti/resource/snmp_queries/win32_disk.xml'
+ Found data query XML file at 'D:\Websites\stats.boots.no-ip.org\Cacti/resource/snmp_queries/win32_disk.xml'
+ Found data query XML file at 'D:\Websites\stats.boots.no-ip.org\Cacti/resource/snmp_queries/win32_disk.xml'
When I create the graphs for the host, and expect to select the C, D, E and total instances, the data query only presents the E: and total instances to select from. What the data query thinks is the index is the same for the C, D and E instances so for some reason Cacti only knows about the last one and presents that in the query.
My question to all is how can I write my data query to recognise the instance as the second last OID object and not the last? ie,
My snmp data query is
<interface>
<name>Win32 - Informant - Disk Stats</name>
<description>Using SNMP-Informant Queries a host for a list of Disk(s) and their stats</description>
<oid_index>.1.3.6.1.4.1.9600.1.2.44.1.1</oid_index>
<index_order_type>numeric</index_order_type>
<fields>
<diskinstance>
<name>Disk Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9600.1.2.44.1.1</oid>
</diskinstance>
<diskfreespace>
<name>Free Space</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.2.44.1.5</oid>
</diskfreespace>
</fields>
</interface>
Any advice would be greatly appreciated and I'll post my templates when I nail this one.
Thanks in advance
Steve
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Please Google for the following <oid_index_parse> and you will have found the rosetta stone.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Hi,
Could you be so kind to post your final xml result ?
I'm having kind of the same problem with 'processtable/processentry' (.1.3.6.1.4.1.9600.1.2.64.1) which returns variable length oid's which contain the entire process name in ascii. The indexes that cacti now returns (last posisiton of OID) contain doubles which result in only 23 out of the 43 processes running.
example: .1.3.6.1.4.1.9600.1.2.64.1.1.7.67.108.117.115.83.118.99
where the part 67.108.117.115.83.118.99 spells ClusSvc.
so index returned is [99] but i'd like it to be 7.67.108.117.115.83.118.99
Could you be so kind to post your final xml result ?
I'm having kind of the same problem with 'processtable/processentry' (.1.3.6.1.4.1.9600.1.2.64.1) which returns variable length oid's which contain the entire process name in ascii. The indexes that cacti now returns (last posisiton of OID) contain doubles which result in only 23 out of the 43 processes running.
example: .1.3.6.1.4.1.9600.1.2.64.1.1.7.67.108.117.115.83.118.99
where the part 67.108.117.115.83.118.99 spells ClusSvc.
so index returned is [99] but i'd like it to be 7.67.108.117.115.83.118.99
-
- Cacti User
- Posts: 63
- Joined: Mon Jul 04, 2005 10:12 am
- Location: Brazil
Hmm,
how about contributing this to the community? It would be really useful. Regards,
Georger
how about contributing this to the community? It would be really useful. Regards,
Georger
wally.nl wrote:Hi,
Could you be so kind to post your final xml result ?
I'm having kind of the same problem with 'processtable/processentry' (.1.3.6.1.4.1.9600.1.2.64.1) which returns variable length oid's which contain the entire process name in ascii. The indexes that cacti now returns (last posisiton of OID) contain doubles which result in only 23 out of the 43 processes running.
example: .1.3.6.1.4.1.9600.1.2.64.1.1.7.67.108.117.115.83.118.99
where the part 67.108.117.115.83.118.99 spells ClusSvc.
so index returned is [99] but i'd like it to be 7.67.108.117.115.83.118.99
Hi Georger,georger_br wrote:Hmm,
how about contributing this to the community? It would be really useful. Regards,
Georger
I don't understand this kind of reply. I had a sincere question (which did not get answered). But if everybody would wait posting answers until the person with a question 'contributed to the comunity' than we would have a serious deadlock and there would be no answers at all
Meanwhile I've found the answer myself so I'll post my findings in a few minutes. I'm under the impression that you think I am some lame-ass leecher that never contributes but this is not true. I'm just new to cacti and thus have not much to contribute. My expertise lies in other fields where I DO contribute.
Walter.
Never mind...found it myself
Here's the solution (this one works with SNMP Informand ADVANCED which I use). The trick is in the <oid_index_parse>
Code: Select all
WIN32_DISK.XML:
<query>
<name>Win32 Physical Disk Table - SNMP (Informant)</name>
<description>Using SNMP-Informant Queries for a list of logical disks and their stats</description>
<oid_index>.1.3.6.1.4.1.9600.1.2.61.1</oid_index>
<oid_index_parse>OID/REGEXP:.*\.9600\.1\.2\.61\.1\.1\.([0-9\.]*)$</oid_index_parse>
<index_order>informDiskInstance</index_order>
<index_order_type>alphabetic</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<informDiskInstance>
<name>Disk Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9600.1.2.61.1.1</oid>
</informDiskInstance>
<informAvgReadQueue>
<name>Avg Read Queue</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.2.61.1.10</oid>
</informAvgReadQueue>
<informAvgWriteQueue>
<name>Avg Write Queue</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.2.61.1.11</oid>
</informAvgWriteQueue>
<informCurrentQueue>
<name>Current Queue</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.2.61.1.15</oid>
</informCurrentQueue>
</fields>
</query>
-
- Cacti User
- Posts: 63
- Joined: Mon Jul 04, 2005 10:12 am
- Location: Brazil
Hey, don't get me wrong here!
I just wanted to know how you did it, that's all. Peace!
Georger
I just wanted to know how you did it, that's all. Peace!
Georger
wally.nl wrote:Hi Georger,georger_br wrote:Hmm,
how about contributing this to the community? It would be really useful. Regards,
Georger
I don't understand this kind of reply. I had a sincere question (which did not get answered). But if everybody would wait posting answers until the person with a question 'contributed to the comunity' than we would have a serious deadlock and there would be no answers at all
Meanwhile I've found the answer myself so I'll post my findings in a few minutes. I'm under the impression that you think I am some lame-ass leecher that never contributes but this is not true. I'm just new to cacti and thus have not much to contribute. My expertise lies in other fields where I DO contribute.
Walter.
-
- Cacti User
- Posts: 63
- Joined: Mon Jul 04, 2005 10:12 am
- Location: Brazil
Re: Never mind...found it myself
wally,
THANK YOU VERY MUCH! This helped me IMMENSELY in getting the data I wanted. Great job!
Georger
THANK YOU VERY MUCH! This helped me IMMENSELY in getting the data I wanted. Great job!
Georger
wally.nl wrote:Here's the solution (this one works with SNMP Informand ADVANCED which I use). The trick is in the <oid_index_parse>
...
-
- Posts: 8
- Joined: Wed Aug 10, 2005 10:05 pm
- Location: Montreal, Canada
same template but diffenrent OID
Thanks for the template XML for informand snmp tool. For my servers, the OID was different, the is my xml file :
Code: Select all
<query>
<name>Win32 Physical Disk Table - SNMP (Informant)</name>
<description>Using SNMP-Informant Queries for a list of logical disks and their stats</description>
<oid_index>.1.3.6.1.4.1.9600.1.1.1.1.1</oid_index>
<oid_index_parse>OID/REGEXP:.*\.9600\.1\.1\.1\.1\.1\.([0-9\.]*)$</oid_index_parse>
<index_order>informDiskInstance</index_order>
<index_order_type>alphabetic</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<informDiskInstance>
<name>Disk Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9600.1.1.1.1.1</oid>
</informDiskInstance>
<informAvgReadQueue>
<name>Avg Read Queue</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.1.1.8</oid>
</informAvgReadQueue>
<informAvgWriteQueue>
<name>Avg Write Queue</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.1.1.9</oid>
</informAvgWriteQueue>
<informCurrentQueue>
<name>Current Queue</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.1.1.13</oid>
</informCurrentQueue>
<informPctDiskTime>
<name>Pct Disk time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.1.1.3</oid>
</informPctDiskTime>
</fields>
</query>
RE: same template but diffenrent OID
Hi Piere-Luc
Your different OIDs have nothing to do with your servers but with the free version of SNMP informant you are using. The template I posted was for the payed 'professional' version. I think it kinda s*cks that you have to update all your templates as soon as you upgrade from the free to the payed version but hey, I'm no sales person.For my servers, the OID was different
As requested, listed below is my collection of Windows OS SNMP based templates.
I'm not the author of all of these, so many thanks to those who are and those who have helped me in the past....
Now looking into IIS and ISA 2004 templates....
I'm not the author of all of these, so many thanks to those who are and those who have helped me in the past....
Now looking into IIS and ISA 2004 templates....
Last edited by boots on Mon Sep 05, 2005 6:20 am, edited 1 time in total.
Here are the files for SNMP Informant Advanced CPU
- Attachments
-
- Informant-CPU.zip
- (8.42 KiB) Downloaded 453 times
-
- CPU.jpg (67.4 KiB) Viewed 8745 times
Here are the files for SNMP Informant Advanced Disk % Free
- Attachments
-
- DiskDrive.jpg (49.65 KiB) Viewed 8744 times
-
- Informant-Disk.zip
- (6.56 KiB) Downloaded 408 times
Who is online
Users browsing this forum: No registered users and 5 guests