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
snmp index centos
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)
Regards
Alex
You need to use SSH or Shell Script test methods and "service" command
(service snmpd status)
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.Name/OID: hrSWRunName.1315; Value (OctetString): snmpd
Regards
Alex
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
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