MinaSshMonitor

The MinaSshMonitor tests the availability of an SSH service. During the poll, it attempts to connect on the specified port and then authenticate in. If the authentication is successful, then the service is considered up. Optionally, a remote command to execute can be provided and if that is successful, the service is considered up.

MinaSshMonitor vs. SshMonitor

The MinaSshMonitor tests connecting and authenticating to a node via SSH. The SshMonitor only tests that the SSH port is accepting connections.

Monitor facts

Class Name

org.opennms.netmgt.poller.monitors.MinaSshMonitor

Configuration and Use

Table 1. Optional monitor-specific parameters for the MinaSshMonitor
Parameter Description Default

username

A username to authenticate with on the node.

n/a

password

A password for username to authenticate with on the node.

n/a

identity-file

An identity-file to use for passwordless authenticatition.

n/a

remote-command

A command to execute after authentication is successful on the node. The output is ignored, and any execution errors will mark the service as down.

n/a

port

TCP port to which SSH connection is tried.

22

retry

Number of attempts to establish the SSH connection.

0

This monitor implements the Common Configuration Parameters.

Examples

Example uses CentOS/RHEL path name. For Debian/Ubuntu, use /var/lib/opennms/rrd/response.

Note that you must include the monitor section for each service in your definition.

<service name="MinaSSHClient" interval="300000" user-defined="false" status="on">
  <parameter key="retry" value="1"/>
  <parameter key="timeout" value="5000"/>
  <parameter key="rrd-repository" value="/opt/opennms/share/rrd/response"/>
  <parameter key="rrd-base-name" value="minassh"/>
  <parameter key="ds-name" value="minassh"/>
  <parameter key="username" value="admin"/>
  <parameter key="password" value="admin"/>
  <parameter key="identity-file" value="/opt/opennms/etc/sshclient_id_rsa"/>
</service>

<monitor service="MinaSSHClient" class-name="org.opennms.netmgt.poller.monitors.MinaSshMonitor"/>