[Nagiosplug-devel] Re: R: [Netsaintplug-help] Check_snmp .....modify how to....

Subhendu Ghosh sghosh at sghosh.org
Fri Jun 21 00:35:03 CEST 2002


If you look through the output of snmpwalk, how will note that the last 
"oid" when sorted in lexicographic (dictionary) order starts with 
"Client DNS"

So a getnext with svSvcOperatingState.10  looks for the lexicographic next 
for the ASCII code 10 which would be "C" in this case - the exact entry 
being "Client DNS"

This is part of the reason we had a discussion a couple of months ago 
about supporting getnext or "getcolumn" functionality in check_snmp
on nagiosplug-* lists.

Some design work has to be acomplished to support it effectively because 
of the existence on sparse tables in some mibs. Specially because we don't 
want to implement a MIB reader to figure out the column vs index oid 
values.

As a different solution have you tried NSClient to see if a particular 
process is running ?

-sg



On Fri, 21 Jun 2002, Pietro Bandera wrote:

> 
> Well.....
> 
> Thanks to your tips i get this:
> 
> snmpgetnext 192.168.0.9 public
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState.10
> 
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Client DNS" = active(1)
> 
> As you can see i used the snmpgetnext command and at the end of the mib
> call "a number"
> 
> I say a number because there isn't, as i can see, a valid
> "correspondece" between the number tha i wrote 10 and the list taht i
> got with snmpwalk command
> 
> (i thought the number 10 would be "FAXCOM Queue" and not "Client DNS"
> that is in 3 position in the following list)
> 
> root at LanIt25 ~# snmpwalk 192.168.0.9 public
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Server" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Messenger" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Telefonia" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Client DNS" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Server DNS" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."VNC Server" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Client DHCP" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."RPC Locator" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Workstation" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Accesso rete" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."FAXCOM Queue" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Replica file" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Plug and Play" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Servizio SNMP" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Servizio RunAs" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Registro eventi" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Microsoft Search" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Servizi terminal" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."NetSaint NT agent" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Spooler di stampa" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Servizio Trap SNMP" = active(1)
> enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperat
> ingState."Browser di computer" = active(1)
> 
> Anyway now i can get the state value of each service but without any
> true correspondece!!!!!!!!!!!
> 
> M$ i hate you!
> 
> Because this is far away of what i would!...in fact i need to write ONLY
> the name of the service as value of a snmp_check service that would
> check if a NT service is running or not using SNMP instead of netsaint
> agent.
> 
> By using this solution i have to write a numbre instead of the name of
> the service and also I DON'T KNOW IF THE NUMBER WOULD BE CORRECT BECAUSE
> THERE ISN'T ANY CORRESPONDENCE BETWEEN NUMBERS AND SERVICE
> LIST....ARRRGGGGG!! :(
> 
> Please if any of you have an idea let me know!
> 
> Thanks
> 
> Pietro
> 
> 
> 
> Message: 2
> Date: Thu, 20 Jun 2002 11:20:08 -0400 (EDT)
> From: Subhendu Ghosh <sghosh at sghosh.org>
> To: netsaint-users at lists.sourceforge.net
> Subject: [netsaint] Re: R: [Netsaintplug-help] Check_snmp .....modify
> how to....
> 
> do an snmpwalk and see what gets returned..
> 
> MS snmp agent has known bugs regarding not responding to get but
> returning 
> the value via getnext..
> 
> -sg
> 
> 
> 

-- 






More information about the Devel mailing list