Event Troubleshooting
This section describes how to troubleshoot events in Meridian.
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 further action needed.
At the DEBUG
level, 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
.
Manually send events
You can manually create and send an event to trigger processes inside of Meridian through the UI or using the send-event.pl
utility.
In most cases, you would do this to reload daemon configuration without having to restart Meridian.
To manually send an event in the web UI, follow these steps:
-
Click the gear symbol in the top-right corner of the screen.
-
Under Event Management, select Manually Send an Event.
-
Select an event from the Event list, and specify additional information (UUID, node ID, parameters, severity, and so on).
-
Click Send Event.
-
To view the event, click
in the top menu bar, and click All Events. The event that you created is shown at the top of the list.
send-event.pl utility
In addition to manually adding events, you can also use the send-event.pl
utility as an automation tool to trigger events as part of continuous integration scripts or other automated processes.
For example, you can use the utility to do the following:
-
Create a new suspect event every time you add a new resource.
-
Clear out alarms.
-
Open a ticket in your integrated ticketing system.
-
Send a notification reminder to order new ink cartridges when your printer is out of toner.
Commands for the utility should follow the ${OPENNMS_HOME}/bin/send-event.pl <uei> [host:port] [options]
format.
The host:port
defines the hostname and port to send the event; by default, it points to the local host.
You can find UEIs and their associated parameters in ${OPENNMS_HOME}/etc/eventd-configuration.xml
(see Event Daemon Configuration).
Name/Alias | Description |
---|---|
Required |
|
uei |
Unique event identifier (UEI) indicating the type of event.
You can view UEIs in |
Optional |
|
-d (--description) |
Description for the event browser. |
-f (--ifindex) |
|
-h (--help) |
Help message for the script (the content from this table). |
-i (--interface) |
IP address of associated interface. |
-l (--logmsg) |
A short log message for the event browser (secure field by default). |
-n (--nodeid) |
Database ID of associated node (or use |
-p (-parameter) |
Parameter in |
-s (--service) |
Name of the associated service. |
-x (--severity) |
Severity of the event: |
-t (--timezone) |
Your time zone. |
-v (--verbose) |
Print the raw XML that is generated. |
-V (--version) |
Print version and exit successfully. |
Note that parameter descriptions use the percentage sign (%
) as a delimiter to mark a replacement variable (see Replacement Tokens).
If a literal percent sign appears in your description, you must escape it with a %
(for example, 'testUrl https://www.opennms.org/ReportSection?filter=FOO_BAR_BAZ%%20eq%%20%%27101%%27'
).
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 to display event definitions that may not be easily accessible on disk, or to verify that particular events were actually loaded:
opennms:show-event-config -u uei.opennms.org/alarms