Daemon Configuration Files
This section explains how to implement changes to daemon configuration files, and which daemons require you to restart Meridian to load configuration updates.
Check the daemon reference section for an overview of all daemons, their related configuration files, and which ones you can reload without restarting OpenNMS. |
Reload daemons with the Karaf CLI
You can prompt some daemons to load configuration changes by running a Karaf command. To use the reload commands in the CLI, follow these steps:
-
Log in to the Karaf shell on your system:
ssh -p 8101 admin@localhost
-
Use the
reload-daemon
command to load any configuration changes:opennms:reload-daemon NAME
To see a list of reloadable daemons, press Tab after the reload-daemon command.
|
Reload daemons with a reload event
You can prompt some daemons to load configuration changes by sending a daemon reload event. This can be done either in a command shell or a Docker container.
cd ${OPENNMS_HOME}/bin
./send-event.pl uei.opennms.org/internal/reloadDaemonConfig --parm 'daemonName NAME'
docker exec -it horizon /opt/opennms/bin/send-event.pl uei.opennms.org/internal/reloadDaemonConfig --parm 'daemonName NAME'
Reload daemons with a REST event
You can prompt some daemons to load configuration changes by sending a REST event.
curl -u admin:admin \ (1)
-X POST 'http://HOSTNAME:8980/opennms/rest/events' \ (2)
--header 'Content-Type: application/xml' \
--data-raw '<event>
<parms>
<parm>
<parmName>daemonName</parmName>
<value>trapd</value> (3)
</parm>
</parms>
<uei>uei.opennms.org/internal/reloadDaemonConfig</uei>
</event>'
1 | Replace admin:admin with credentials for accessing the Meridian instance. |
2 | Replace HOSTNAME with the hostname of the Meridian instance. |
3 | Replace trapd with the name of the daemon that you want to reload. |
Check results
A daemon reload generates one or more of the following events:
-
uei.opennms.org/internal/reloadDaemonConfig
: Indicates that the reload process began. -
uei.opennms.org/internal/reloadDaemonConfigSuccessful
: Indicates positive feedback from the reload process. -
uei.opennms.org/internal/reloadDaemonConfigFailed
: Indicates negative feedback from the reload process (for example, Meridian could not load the daemon). In these cases, the event description also includes a reason for the negative feedback.