HostResourceSwRunMonitor This monitor tests the running state of one or more processes. It does this via SNMP by inspecting the hrSWRunTable of the HOST-RESOURCES-MIB. A given service name is matched to a hrSWRunName value, then the monitor checks the run level of the matching hrSWRunState. Your OpenNMS instance must be able to successfully collect SNMP metrics from your node(s) for this monitor to work. Furthermore, the SNMP agent on the system must support the HOST-RESOURCES-MIB. Most modern SNMP agents, including most distributions of the Net-SNMP agent and the SNMP service that ships with Microsoft Windows, support this MIB. Out-of-box support for HOST-RESOURCES-MIB among commercial Unix operating systems may be somewhat spotty. Monitor Facts Class Name org.opennms.netmgt.poller.monitors.HostResourceSwRunMonitor Remote Enabled false Configuration and Use Table 1. Monitor specific parameters for the HostResourceSwRunMonitor Parameter Description Required Default value service-name The name of the process to be monitored. This parameter’s value is case-sensitive and is evaluated as an exact match. required - port The port of the SNMP agent of the server to test. optional from snmp-config.xml match-all If the process name appears multiple times in the hrSWRunTable, and this parameter is set to true, then all instances of the named process must match the value specified for run-level. optional false run-level The maximum allowable value of hrSWRunStatus among running(1), runnable(2) = waiting for resource notRunnable(3) = loaded but waiting for event invalid(4) = not loaded optional 2 service-name-oid The numeric object identifier (OID) from which process names are queried. Defaults to hrSWRunName and should not be changed under normal circumstances. However, changing it to hrSWRunParameters (.1.3.6.1.2.1.25.4.2.1.5) is helpful when dealing with processes running in Java Virtual Machines which all have the same process name java. optional .1.3.6.1.2.1.25.4.2.1.2 service-status-oid The numeric object identifier (OID) from which run status is queried. Defaults to hrSWRunStatus and should not be changed under normal circumstances. optional .1.3.6.1.2.1.25.4.2.1.7 This monitor implements the Common Configuration Parameters. Examples The following example shows how to monitor the process called httpd running on a server using this monitor. The configuration in poller-configuration.xml has to be defined as the following: <service name="Process-httpd" interval="300000" user-defined="false" status="on"> <parameter key="retry" value="3"/> <parameter key="timeout" value="3000"/> <parameter key="service-name" value="httpd"/>(1) <parameter key="run-level" value="3"/>(2) <parameter key="match-all" value="true"/>(3) </service> <monitor service="Process-httpd" class-name="org.opennms.netmgt.poller.monitors.HostResourceSwRunMonitor"/> 1 Name of the process on the system 2 Test the state if the process is in a valid state, i.e. have a run-level no higher than notRunnable(3) 3 If the httpd process runs multiple times the test is done for each instance of the process. FtpMonitor HttpMonitor