PB => XML and SNMP data query

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
titou.tct
Posts: 3
Joined: Mon May 03, 2004 7:34 am

PB => XML and SNMP data query

Post by titou.tct »

Hi,
Excuse my english...
I try to get disk informations with SNMP.
Ucd/net-snmp disk uses uncorrect OIDs to scan my remote host.
My query seems to be OK (it's just an adaptation and there is no pb with debug) but it returns 0 rows and I don't know why.
I'm using Cacti-0.8.5

essai.xml
<query>
<name>Get Infos Partitions</name>
<oid_index>.1.3.6.1.2.1.25.2.3.1.1</oid_index>

<fields>
<dskIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.1</oid>
</dskIndex>
<dskType>
<name>Storage Type</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.2</oid>
</dskType>
<dskMount>
<name>Mount Point</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.2.1.25.2.3.1.3</oid>
</dskMount>
<dskUnits>
<name>Allocation Units</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>1.3.6.1.2.1.25.2.3.1.4</oid>
</dskUnits>
<dskTotal>
<name>Total Space</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>1.3.6.1.2.1.25.2.3.1.5</oid>
</dskTotal>
<dskUsed>
<name>Used Space</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>1.3.6.1.2.1.25.2.3.1.6</oid>
</dskUsed>
</fields>
</query>

I'm beginner and the board is my main help, please don't let me down.
Attachments
Host.jpg
Host.jpg (116.78 KiB) Viewed 1056 times
Debug.jpg
Debug.jpg (150.81 KiB) Viewed 1056 times
data_query.jpg
data_query.jpg (124.42 KiB) Viewed 1056 times
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Taking a look at your screenshots, the debug output does not look correct. The first line that catches my attention reads:

Code: Select all

Found item [dskIndex='hrStorageIndex.1 1'] index: hrStorageIndex.1 1 [from value]
I am pretty sure that the index is supposed to be "1" and not "hrStorageIndex.1 1". It is possible that Cacti is having parsing problems, but that is unlikely considering that the other data queries are working.

Can you show me the output that results if you walk .1.3.6.1.2.1.25.2.3.1.1 at the command line? It would help to turn on numeric OID output (-O n) when doing this.

-Ian
titou.tct
Posts: 3
Joined: Mon May 03, 2004 7:34 am

Post by titou.tct »

Thanks for the advice.
snmpwalk -c public 36.125.1.12 .1.3.6.1.2.1.25.2.3.1.1
hrStorageIndex.1 1
hrStorageIndex.2 2
hrStorageIndex.3 3
hrStorageIndex.4 4
hrStorageIndex.5 5
hrStorageIndex.6 6
hrStorageIndex.7 7
hrStorageIndex.101 101
hrStorageIndex.102 102
hrStorageIndex.103 103

and with -On
snmpwalk -On -c public 36.125.1.12 .1.3.6.1.2.1.25.2.3.1.1
hrStorageIndex.1 1
hrStorageIndex.2 2
hrStorageIndex.3 3
hrStorageIndex.4 4
hrStorageIndex.5 5
hrStorageIndex.6 6
hrStorageIndex.7 7
hrStorageIndex.101 101
hrStorageIndex.102 102
hrStorageIndex.103 103

No difference can be seen between the 2 outputs.
Do you have another idea, please ?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Try running:

Code: Select all

snmpwalk -O n -c public 36.125.1.12 .1.3.6.1.2.1.25.2.3.1.1
(notice the space between the -O and the 'n')

-Ian
titou.tct
Posts: 3
Joined: Mon May 03, 2004 7:34 am

Post by titou.tct »

I have the same result :
snmpwalk -O n -c public 36.125.1.12 .1.3.6.1.2.1.25.2.3.1.1
hrStorageIndex.1 1
hrStorageIndex.2 2
hrStorageIndex.3 3
hrStorageIndex.4 4
hrStorageIndex.5 5
hrStorageIndex.6 6
hrStorageIndex.7 7
hrStorageIndex.101 101
hrStorageIndex.102 102
hrStorageIndex.103 103
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Sorry for not noticing this earlier, but it looks like you are trying to gather disk information using the HOST MIB. Try adding the "SNMP - Get Mounted Partitions" data query to your host and see what happens. This data query is based on the host MIB and should work fine for this purpose.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests