I'm trying to write an XML file that walks through specific oid and writes an output, nothing complicated.
My XML file looks like this:
<fields>
<DMM_Valovna>
<name>DMM_Valovna</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.4253.1.28.3.1.9.1.1</oid>
</DMM_Valovna>
<DMM_TX>
<name>TX_Power_6</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.4253.2.1.24.4.1.10.1.1</oid>
</DMM_TX>
<DMM_RX>
<name>RX_Power_6</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.4253.1.28.3.1.10.1.1</oid>
</DMM_RX>
</fields>
An OUTPUT is this:
+ Found item [DMM_Valovna='1470.00'] index: 1 [from value]
+ Found item [DMM_Valovna='1310.00'] index: 2 [from value]
+ Found item [DMM_Valovna='1310.00'] index: 3 [from value]
+ Found item [DMM_Valovna='1590.00'] index: 1 [from value]
+ Found item [DMM_Valovna='1310.00'] index: 2 [from value]
+ Found item [DMM_Valovna='850.00'] index: 3 [from value]
My problem is that index goes from 1-3 and cacti normally acts as index=1 for 1470 and index=1 for 1590 are same interfaces but actually these should all be different interfaces.
What should I modify if I want to get 6 rows to be drawn and not 3?
Index problem
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17061
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
You need to provide a walk of the table for anyone to provide any further assistance. My guess is that you will have to use OID parsing.
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?
-
- Posts: 4
- Joined: Fri Apr 04, 2008 11:31 am
Here is an output of walk. Hope it helps.TheWitness wrote:You need to provide a walk of the table for anyone to provide any further assistance. My guess is that you will have to use OID parsing.
TheWitness
http://users.volja.net/micko/snmp_walk_wdm.rar
I did try with this:
<interface>
<name>WDM Kartice</name>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.4.1.4253.2.1.24.4.1.10.1.1</oid_index>
<oid_index_parse>OID/REGEXP:^.*\.([0-9]+\.[0-9]+)$</oid_index_parse>
<fields>
<DMM_Valovna>
<name>DMM_Valovna</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.4253.1.28.3.1.9.1.1.6</oid>
</DMM_Valovna>
<DMM_TX>
<name>TX_Power</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.4253.2.1.24.4.1.10.1.1.6</oid>
</DMM_TX>
</fields>
</interface>
When i did a debug on this, i saw that index was set to last two oid numbers (example 6.1, 6.2) which looks good, but when I wanted to create a graph it did not create one.
- TheWitness
- Developer
- Posts: 17061
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Well, the index needs to be unique, and in your first example I saw a few "1"'s as indexes and then "2"'s and "3"'s. Not a good index for sure. You will figure it out I am sure.
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?
Who is online
Users browsing this forum: No registered users and 3 guests