Hello, I am trying to configure my nagios system (version 1.3) to monitor, via SNMP, that my systems are running the processes they need to.
I use the snmp_procname nagios command defined for snmp. It is defined as: define command{ command_name snmp_procname command_line /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.2.1.5.$ARG2$ -w $ARG3$:$ARG4$ -c $ARG5$: $ARG6$ } The problem I've got is that I need to know the order in which I have defined the proc entries in snmpd.conf at the servers. I think it could be better to define ARG2 not the number in the process list, but the name of the process. For example, in one server I want to monitor syslogd and slapd, so I put proc syslogd 0 0 proc slapd 0 0 in the snmpd.conf file at the server. If a get the snmp data from that server I get: atelerix:/usr/share/doc/nagios-plugins# snmpwalk -v 2c -c public myserver .1.3.6.1.4.1.2021.2.1 UCD-SNMP-MIB::prIndex.1 = INTEGER: 1 UCD-SNMP-MIB::prIndex.2 = INTEGER: 2 UCD-SNMP-MIB::prNames.1 = STRING: syslogd UCD-SNMP-MIB::prNames.2 = STRING: slapd UCD-SNMP-MIB::prMin.1 = INTEGER: 0 UCD-SNMP-MIB::prMin.2 = INTEGER: 0 UCD-SNMP-MIB::prMax.1 = INTEGER: 0 UCD-SNMP-MIB::prMax.2 = INTEGER: 0 UCD-SNMP-MIB::prCount.1 = INTEGER: 1 UCD-SNMP-MIB::prCount.2 = INTEGER: 1 UCD-SNMP-MIB::prErrorFlag.1 = INTEGER: 0 UCD-SNMP-MIB::prErrorFlag.2 = INTEGER: 0 UCD-SNMP-MIB::prErrMessage.1 = STRING: UCD-SNMP-MIB::prErrMessage.2 = STRING: UCD-SNMP-MIB::prErrFix.1 = INTEGER: 0 UCD-SNMP-MIB::prErrFix.2 = INTEGER: 0 UCD-SNMP-MIB::prErrFixCmd.1 = STRING: UCD-SNMP-MIB::prErrFixCmd.2 = STRING: so I prefer to define the service as: define service { name syslogd hostgroup_name syslogd_servers use servicio-generico service_description Proceso syslogd check_command snmp_procname!public!syslogd!1!!1! } the check plugin could see that the index for syslogd is .1 and then use .1 to get the .1.3.6.1.4.1.2021.2.1.5.1 value. If this posible? Or shall I have to rewrite the plugin to do it? -- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 968367590 Fax: 968398337 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null