
= Daemon Configuration Files
:description: Learn how to change daemon configuration files in {page-component-title} and which daemons require you to restart to load configuration updates.

This section explains how to implement changes to daemon configuration files, and which daemons require you to restart {page-component-title} to load configuration updates.

NOTE: Check the xref:reference:daemons/introduction#ga-daemons[daemon reference section] for an overview of all daemons, their related configuration files, and which ones you can reload without restarting OpenNMS.

[[daemon-reload]]
== 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:
+
[source, console]
ssh -p 8101 admin@localhost

. Use the `reload-daemon` command to load any configuration changes:
+
[source, karaf]
opennms:reload-daemon NAME

NOTE: To see a list of reloadable daemons, press kbd:[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.

.Example: Send a daemon reload event in a command shell
[source, console]
----
cd ${OPENNMS_HOME}/bin
./send-event.pl uei.opennms.org/internal/reloadDaemonConfig --parm 'daemonName NAME'
----

.Example: Send a daemon reload event in a Docker container
[source, console]
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.

.Example: Send a REST event to prompt daemon reload
[source, console]
----
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 {page-component-title} instance.
<2> Replace `HOSTNAME` with the hostname of the {page-component-title} 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, {page-component-title} could not load the daemon).
In these cases, the event description also includes a reason for the negative feedback.
