# Event Configuration

The back-end configuration surrounding events is broken into two areas: the configuration of `Eventd` itself, and the configuration of all types of events known to Horizon.

## The eventd-configuration.xml file

The overall behavior of `Eventd` is configured in the file `${OPENNMS_HOME}/etc/eventd-configuration.xml`. This file does not need to be changed in most installations. The configurable items include: TCPAddress The IP address to which the `Eventd` XML/TCP listener will bind. Defaults to `127.0.0.1`. TCPPort The TCP port number on `TCPAddress` to which the `Eventd` XML/TCP listener will bind. Defaults to `5817`. UDPAddress The IP address to which the `Eventd` XML/UDP listener will bind. Defaults to `127.0.0.1`. UDPPort The UDP port number on `TCPAddress` to which the `Eventd` XML/UDP listener will bind. Defaults to `5817`. receivers The number of threads allocated to service the event intake work done by `Eventd`. queueLength The maximum number of events that may be queued for processing. Additional events will be dropped. Defaults to unlimited. getNextEventID An SQL query statement used to retrieve the ID of the next new event. Changing this setting is not recommended. socketSoTimeoutRequired Whether to set a timeout value on the `Eventd` receiver socket. socketSoTimeoutPeriod The socket timeout, in milliseconds, to set if `socketSoTimeoutRequired` is set to `yes`. logEventSummaries Whether to log a simple (terse) summary of every event at level `INFO`. Useful when troubleshooting event processing on busy systems where `DEBUG` logging is not practical. The set of known events is configured in `${OPENNMS_HOME}/etc/eventconf.xml`. This file opens with a `<global>` element, whose `<security>` child element defines which event fields may not be overridden in the body of an event submitted via any `Eventd` listener. This mechanism stops a malicious actor from, for instance, sending an event whose `operator-action` field amounts to a phishing attack.

``$\{OPENNMS_HOME}/bin/send-event.pl uei.opennms.org/internal/reloadDaemonConfig -p 'daemonName Eventd'`` ### Debugging When debugging events, it may be helpful to lower the minimum severity at which `Eventd` will log from the default level of `WARN`. To change this setting, edit `${OPENNMS_HOME}/etc/log4j2.xml` and locate the following line:

``<KeyValuePair key="eventd"               value="WARN" />``

Changes to `log42.xml` will take effect within 60 seconds with no extra action needed. At level `DEBUG`, `Eventd` will log a verbose description of every event it handles to `${OPENNMS_HOME}/logs/eventd.log`. On busy systems, this setting may create so much noise as to be impractical. In these cases, you can get terse event summaries by setting `Eventd` to log at level `INFO` and setting `logEventSummaries="yes"` in `${OPENNMS_HOME}/etc/eventd-configuration.xml`. Note that changes to `eventd-configuration.xml` require a full restart of Horizon.

### Karaf Shell

Use the `opennms:show-event-config` command to render the event definition for one or more event UEIs (matching a substring) to XML. This command is useful for displaying event definitions that may not be easily accessible on disk, or verifying that particular events were actually loaded.

``````\$ ssh -p 8101 admin@localhost
...