DeviceConfigMonitor

This monitor tries to retrieve configuration from the network device and shows the status of that retrieval (success, failed, and so on).

Monitor Facts

Class Name

org.opennms.features.deviceconfig.monitors.DeviceConfigMonitor

Configuration and Use

Table 1. Monitor-specific parameters for the DeviceConfigMonitor

Parameter

Description

Default value

Required

script-file

Script file to use to retrieve configuration. Place script files in the etc/device-config folder. Find example script files in etc/examples/device-config folder with .dcb extension. Overwrite script file name in metadata as dcb:script-file. Don’t include .dcb extension when specifying the file name in metadata.

default.dcb

username

Username for SSH login. Overwrite in metadata as dcb:username.

admin

password

Password for SSH login. Overwrite in metadata as dcb:password.

admin

Optional

config-type

If device has multiple configurations, specify the config-type with each service. Overwrite in metadata as dcb:config-type.

default

ssh-port

SSH port for the target device. Overwrite in meatadata as dcb:ssh-port.

22

ssh-timeout

SSH maximum timeout after which SSH session will be closed. Overwrite in metadata as dcb:ssh-timeout.

60000

schedule

Schedule to fetch configuration, in the form of cron expression. Defaults to never run; overwrite this in metadata with proper cron expression. Overwrite in metadata as dcb:schedule.

never

retention-period

Maximum retention period after which configs without any updates will be deleted from database. Overwrite in metadata as dcb:retention-period. Specified in ISO-8601 period format PnYnMnD and PnW. Defaults to P1Y (1 Year). Example: P20Y2M25D means 20 years, 2 months, and 25 days.

P1Y

host-key

SSH fingerprint of the remote host key. If this is specified, the provided fingerprint will be used to verify the host key of the remote host. The key must be encoded as HASH:BASE64. One can use ssh-keygen -l -f <(ssh-keyscan $TARGET) to find the fingerprints of a remote system.

unchecked

Schedule and interval

The service uses an interval of 300 seconds and a cron expression for the schedule. The monitor checks every 300 seconds (interval) for the next trigger time in the cron schedule. It retrieves the configuration only when the next trigger time matches the current time (current time must be greater than the trigger time). For example, if the monitor checks at 11:59 p.m., but the trigger time is 12:00 a.m., the monitor will retrieve the configuration at the next check interval at 12:04 a.m.