snmp query problem

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

Moderators: Developers, Moderators

Post Reply
khm
Posts: 25
Joined: Fri Jul 14, 2006 3:57 am

snmp query problem

Post by khm »

because of my english is not very good and my problem is difficult to explain i tried with examples:

Part of snmp walk:

4.1.231.2.10.2.2.3.1.1.1.2.1.2 = 2
4.1.231.2.10.2.2.3.1.1.1.2.1.3 = 2
4.1.231.2.10.2.2.3.1.1.1.4.1.1 = 4
4.1.231.2.10.2.2.3.1.1.1.4.4.4 = 4
4.1.231.2.10.2.2.3.1.1.2.2.1.2 = 1
4.1.231.2.10.2.2.3.1.1.2.2.1.3 = 1
4.1.231.2.10.2.2.3.1.1.2.4.1.1 = 1
4.1.231.2.10.2.2.3.1.1.2.4.4.4 = 4
4.1.231.2.10.2.2.3.1.1.3.2.1.2 = 2
4.1.231.2.10.2.2.3.1.1.3.2.1.3 = 3
4.1.231.2.10.2.2.3.1.1.3.4.1.1 = 1
4.1.231.2.10.2.2.3.1.1.3.4.4.4 = 4
4.1.231.2.10.2.2.3.1.1.5.2.1.2 = 1
4.1.231.2.10.2.2.3.1.1.5.2.1.3 = 1
4.1.231.2.10.2.2.3.1.1.5.4.1.1 = 1
4.1.231.2.10.2.2.3.1.1.5.4.4.4 = 1
4.1.231.2.10.2.2.3.1.1.6.2.1.2 = 1
4.1.231.2.10.2.2.3.1.1.6.2.1.3 = 0
4.1.231.2.10.2.2.3.1.1.6.4.1.1 = 0
4.1.231.2.10.2.2.3.1.1.6.4.4.4 = 2
4.1.231.2.10.2.2.3.1.1.7.2.1.2 = atapi
4.1.231.2.10.2.2.3.1.1.7.2.1.3 = atapi
4.1.231.2.10.2.2.3.1.1.7.4.1.1 = pciide
4.1.231.2.10.2.2.3.1.1.7.4.4.4 = fasttx2k
4.1.231.2.10.2.2.3.1.1.8.2.1.2 = 1
4.1.231.2.10.2.2.3.1.1.8.2.1.3 = 0
4.1.231.2.10.2.2.3.1.1.8.4.1.1 = 0
4.1.231.2.10.2.2.3.1.1.8.4.4.4 = 2

There is a problem to get indexed SNMP-Data with snmp_query.
I tried several xml-files but no chance.
It seemed to be the changing oids within a variable.
Example (sniHDAdapterType 2=isa, 4=pci):
4.1.231.2.10.2.2.3.1.1.1.2.1.2 = 2
4.1.231.2.10.2.2.3.1.1.1.2.1.3 = 2
4.1.231.2.10.2.2.3.1.1.1.4.1.1 = 4
4.1.231.2.10.2.2.3.1.1.1.4.4.4 = 4
These Variables are now inserted in all other varaibles.

any ideas ?
Last edited by khm on Mon Aug 14, 2006 4:27 am, edited 1 time in total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

First, please name the device you're dealing with.
Second, see the last (or perhaps last two) link(s) of my signature for some HowTo. But it seems to me, that you're dealing with a three-dimensional index. Such things will require advanced OID/REGEXP magic as shown in
http://forums.cacti.net/viewtopic.php?t ... gexp+index
and
http://forums.cacti.net/viewtopic.php?t ... gexp+index
Reinhard
khm
Posts: 25
Joined: Fri Jul 14, 2006 3:57 am

Post by khm »

First: It is a Server (Fujitsu-Siemens RX100S2 or RX300S2)
Second: I cant solve this problem with this howtos without help.

4.1.231.2.10.2.2.3.1.1.5.2.1.2 = 1
4.1.231.2.10.2.2.3.1.1.5.2.1.3 = 1
4.1.231.2.10.2.2.3.1.1.5.4.1.1 = 1
4.1.231.2.10.2.2.3.1.1.5.4.4.4 = 1

I tried to get these Values but because of the different oid 5.2.1.2 and 5.4.1.1 i dont get it.
How can i get the part of oid "2.1" or "4.1" or "4.4" in these requests ?
Please see attached files below please.
iI tried REGEXP but dont work.
Attachments
HDMIB.txt
fujitsu Siemens MIB
(26.79 KiB) Downloaded 411 times
sniHDAdapterMIB.xml
my snmp_query
(1.47 KiB) Downloaded 103 times
data Query debug information.txt
(2.78 KiB) Downloaded 271 times
View Poller Cache.txt
(213 Bytes) Downloaded 79 times
Cactilog.txt
(284 Bytes) Downloaded 102 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Well, both DEBUG and XML look very well to me. The XML cathes the three-dim index and the DEBUG show all values for <direction>input</direction> as expected. There's actually only one "output" field in the XML that may be graphed. Is this on purpose? WOuld you please tell us, what output should be graphed (as all OIDs are given numerical, I can't figure out what they mean and I'm too lazy to read the whole MIB)
Reinhard
khm
Posts: 25
Joined: Fri Jul 14, 2006 3:57 am

Post by khm »

Thank you for answering.
Yes there is only ONE Output-Varable.
Its very simple i need the numeric value of following OIDs:

4.1.231.2.10.2.2.3.1.1.5.2.1.2 = 1
4.1.231.2.10.2.2.3.1.1.5.2.1.3 = 1
4.1.231.2.10.2.2.3.1.1.5.4.1.1 = 1
4.1.231.2.10.2.2.3.1.1.5.4.4.4 = 1
problems are these------^^ two digits!! because they are not identical
for each Device. Here is BusType and BusNumber implemented!!
I only need the numeric value here "1".
Look at the Pollers Cache only 4.1.231.2.10.2.2.3.1.1.5.2 or
4.1.231.2.10.2.2.3.1.1.5.3 or 4.1.231.2.10.2.2.3.1.1.5.1 or 4.1.231.2.10.2.2.3.1.1.5.4 are polled but not like above. "2.1", "2.1", "4.1" and "4.4" are left out.
This is a bit field discribed below in my attached file. This attached file is not the complete MIB. I have only the important part included.

[quote="lvm"]Well, both DEBUG and XML look very well to me. The XML cathes the three-dim index and the DEBUG show all values for [b]<direction>input</direction>[/b] as expected. There's actually only one "output" field in the XML that may be graphed. Is this on purpose? WOuld you please tell us, what output should be graphed (as all OIDs are given numerical, I can't figure out what they mean and I'm too lazy to read the whole MIB)
Reinhard[/quote]
Attachments
MIB.txt
(4.13 KiB) Downloaded 272 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please append another .1 to your oid_index to read

Code: Select all

<oid_index>.1.3.6.1.4.1.231.2.10.2.2.3.1.1.1</oid_index>
an retry.
Reinhard
Last edited by gandalf on Wed Aug 16, 2006 7:06 am, edited 1 time in total.
khm
Posts: 25
Joined: Fri Jul 14, 2006 3:57 am

Post by khm »

Thanks...
It works now.

lvm wrote:Pleae append another .1 to your oid_index to read

Code: Select all

<oid_index>.1.3.6.1.4.1.231.2.10.2.2.3.1.1.1</oid_index>
an retry.
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Fine. Would it be an option to publish your templates, perhaps along with some words and a nice screenshot, in the Scripts and Templates forum?

cheers
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests