snmp index centos

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Tschili
Posts: 2
Joined: Tue Dec 10, 2013 6:10 am

snmp index centos

Post by Tschili »

Hello,

i have a problem with CentOS and SNMP Get.

I would like to check if a Service Running or not.
But the problem is, that CentOS will give always after reboot a new index for the Service.

At the hrSWRunName i need the Nummer.

Name/OID: hrSWRunName.1315; Value (OctetString): snmpd

hrSWRunStatus

Name/OID: hrSWRunStatus.1315; Value (Integer): running (1)

Can you help me.

Thanks
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I dont think you can use SNMP Get test in this case.
You need to use SSH or Shell Script test methods and "service" command
(service snmpd status)
Name/OID: hrSWRunName.1315; Value (OctetString): snmpd
Do you want to check status of SNMP daemon? Then you can reauest any SNMP counter (e.g. 1.3.6.1.2.1.1.3.0). If SNMP agent responds, this means it works.

Regards
Alex
Tschili
Posts: 2
Joined: Tue Dec 10, 2013 6:10 am

Post by Tschili »

Hello,

thanks. But its not possible to get a indexof table ?

Like:

SNMP Table:
Name/OID: hrSWRunName.1242; Value (OctetString): rpcbind
Name/OID: hrSWRunName.1260; Value (OctetString): rpc.statd
Name/OID: hrSWRunName.1281; Value (OctetString): dbus-daemon
Name/OID: hrSWRunName.1315; Value (OctetString): snmpd
Name/OID: hrSWRunName.1327; Value (OctetString): sshd
Name/OID: hrSWRunName.1335; Value (OctetString): ntpd
Name/OID: hrSWRunName.1342; Value (OctetString): haveged

Now search this table for "ntpd" and get the index "1335" back ?

Thanks
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

There is no such function

Regards
Alex
Post Reply