Download Administrators Guide PDF

TitleAdministrators Guide
LanguageEnglish
File Size13.3 MB
Total Pages384
Table of Contents
                            Administrators Guide
Table of Contents
Chapter 1. Data Choices
Chapter 2. User Management
	2.1. Users
	2.2. Security Roles
	2.3. Web UI Pre-Authentication
		2.3.1. Enabling Pre-Authentication
		2.3.2. Configuring Pre-Authentication
Chapter 3. Administrative Webinterface
	3.1. Grafana Dashboard Box
	3.2. Operator Board
		3.2.1. Configuration
		3.2.2. Dashlets
		3.2.3. Boosting Dashlet
		3.2.4. Criteria Builder
	3.3. JMX Configuration Generator
		3.3.1. Web based utility
		3.3.2. CLI based utility
	3.4. Heatmap
	3.5. Trend
Chapter 4. Service Assurance
	4.1. Pollerd Configuration
	4.2. Critical Service
	4.3. Downtime Model
	4.4. Path Outages
	4.5. Poller Packages
		4.5.1. Response Time Configuration
		4.5.2. Overlapping Services
		4.5.3. Test Services on manually
	4.6. Service monitors
		4.6.1. Common Configuration Parameters
		4.6.2. AvailabilityMonitor
		4.6.3. BgpSessionMonitor
		4.6.4. BSFMonitor
		4.6.5. CiscoIpSlaMonitor
		4.6.6. CiscoPingMibMonitor
		4.6.7. CitrixMonitor
		4.6.8. DhcpMonitor
		4.6.9. DiskUsageMonitor
		4.6.10. DnsMonitor
		4.6.11. DNSResolutionMonitor
		4.6.12. FtpMonitor
		4.6.13. HostResourceSwRunMonitor
		4.6.14. HttpMonitor
		4.6.15. HttpPostMonitor
		4.6.16. HttpsMonitor
		4.6.17. IcmpMonitor
		4.6.18. ImapMonitor
		4.6.19. ImapsMonitor
		4.6.20. JCifsMonitor
		4.6.21. JDBCMonitor
		4.6.22. JDBCStoredProcedureMonitor
		4.6.23. JDBCQueryMonitor
		4.6.24. JmxMonitor
		4.6.25. JolokiaBeanMonitor
		4.6.26. LdapMonitor
		4.6.27. LdapsMonitor
		4.6.28. MemcachedMonitor
		4.6.29. NetScalerGroupHealthMonitor
		4.6.30. NrpeMonitor
		4.6.31. NtpMonitor
		4.6.32. OmsaStorageMonitor
		4.6.33. OpenManageChassisMonitor
		4.6.34. PageSequenceMonitor
		4.6.35. PercMonitor
		4.6.36. Pop3Monitor
		4.6.37. PrTableMonitor
		4.6.38. RadiusAuthMonitor
		4.6.39. SmbMonitor
		4.6.40. SnmpMonitor
		4.6.41. SshMonitor
		4.6.42. SSLCertMonitor
		4.6.43. StrafePingMonitor
		4.6.44. TcpMonitor
		4.6.45. SystemExecuteMonitor
		4.6.46. VmwareCimMonitor
		4.6.47. VmwareMonitor
		4.6.48. Win32ServiceMonitor
		4.6.49. WsManMonitor
		4.6.50. XmpMonitor
Chapter 5. Performance Management
	5.1. Collectd Configuration
		5.1.1. Resource Types
	5.2. Collection Packages
		5.2.1. Service Configurations
	5.3. Collectors
		5.3.1. JmxCollector
		5.3.2. SnmpCollector
		5.3.3. HttpCollector
		5.3.4. JdbcCollector
		5.3.5. JmxCollector
		5.3.6. NSClientCollector
		5.3.7. TcaCollector
		5.3.8. VmwareCimCollector
		5.3.9. VmwareCollector
		5.3.10. WmiCollector
		5.3.11. WsManCollector
		5.3.12. XmlCollector
		5.3.13. XmpCollector
	5.4. Shell Commands
		5.4.1. Ad-hoc collection
		5.4.2. Interpreting the output
		5.4.3. Stress Testing
		5.4.4. Interpreting the output
Chapter 6. Events
	6.1. Anatomy of an Event
	6.2. Sources of Events
		6.2.1. SNMP Traps
		6.2.2. Syslog Messages
		6.2.3. ReST
		6.2.4. XML-TCP
		6.2.5. Receiving IBM Tivoli Event Integration Facility Events
		6.2.6. TL1 Autonomous Messages
	6.3. The Event Bus
		6.3.1. Associate an Event to a given node
	6.4. Event Configuration
		6.4.1. The eventd-configuration.xml file
		6.4.2. The eventconf.xml file and its tributaries
		6.4.3. Reloading the event configuration
	6.5. Debugging
Chapter 7. Alarms
	7.1. Alarm Sounds
	7.2. Flashing Unacknowledged Alarms
	7.3. Configuring Alarm Sounds and Flashing
Chapter 8. Notifications
	8.1. Introduction
	8.2. Getting Started
		8.2.1. Enabling Notifications
		8.2.2. Configuring Destination Paths
		8.2.3. Configuring Event Notifications
	8.3. Concepts
		8.3.1. Events and UEIs
		8.3.2. Users, Groups, and On-Call Roles
		8.3.3. Duty Schedules
		8.3.4. Destination Paths
		8.3.5. Notification Commands
	8.4. Bonus Notification Methods
		8.4.1. Mattermost
		8.4.2. Slack Notifications
Chapter 9. Provisioning
	9.1. Introduction
	9.2. Concepts
		9.2.1. Terminology
		9.2.2. Addressing Scalability
	9.3. Getting Started
		9.3.1. Provisioning the SNMP Configuration
		9.3.2. Automatic Discovery
		9.3.3. Enhanced Directed Discovery
	9.4. Import Handlers
		9.4.1. Generic Handler
		9.4.2. File Handler
		9.4.3. HTTP Handler
		9.4.4. DNS Handler
	9.5. Provisioning Examples
		9.5.1. Basic Provisioning
		9.5.2. Advanced Provisioning Example
	9.6. Adapters
		9.6.1. DDNS Adapter
		9.6.2. RANCID Adapter
	9.7. Integrating with Provisiond
		9.7.1. Provisioning Groups of Nodes
		9.7.2. Example
	9.8. Provisioning Single Nodes (Quick Add Node)
	9.9. Fine Grained Provisioning Using provision.pl
		9.9.1. Create a new requisition
	9.10. Yet Other API Examples
	9.11. Service Detectors
		9.11.1. SNMP Detector
		9.11.2. WS-Man Detector
Chapter 10. Business Service Monitoring
	10.1. Business Service Definition
	10.2. Edges
		10.2.1. Child Services
		10.2.2. IP Services
		10.2.3. Custom Reduction Key
	10.3. Map Functions
	10.4. Reduce Functions
	10.5. Business Service Daemon
Chapter 11. Topology Map
	11.1. Properties
	11.2. Icons
		11.2.1. Icon resolution
		11.2.2. Change existing icon mappings
		11.2.3. Add new icons
Chapter 12. Asset Topology Provider
	12.1. Overview
	12.2. Asset layers
	12.3. Node filtering
	12.4. Configuration
	12.5. Creating Asset Based Topologies From Karaf Consol
	12.6. Creating Asset Based Topologies Using OpenNMS Horizon events
	12.7. Viewing the topology
	12.8. additional notes
Chapter 13. Database Reports
	13.1. Overview
	13.2. Modify existing reports
	13.3. Add a custom report
	13.4. Usage of Jaspersoft Studio
		13.4.1. Connect to the OpenNMS Horizon Database
		13.4.2. Use Measurements Datasource and Helpers
	13.5. Accessing Performance Data
		13.5.1. Fields
		13.5.2. Parameters
	13.6. Helper methods
		13.6.1. Usage of the interface descriptor
		13.6.2. Usage of the node source descriptor
		13.6.3. Usage of the interface descriptor
		13.6.4. Use HTTPS
	13.7. Limitations
Chapter 14. Enhanced Linkd
	14.1. Enlinkd Daemon
	14.2. Layer 2 Link Discovery
		14.2.1. LLDP Discovery
		14.2.2. CDP Discovery
		14.2.3. Transparent Bridge Discovery
	14.3. Layer 3 Link Discovery
		14.3.1. OSPF Discovery
		14.3.2. IS-IS Discovery
Chapter 15. Operation
	15.1. HTTPS / SSL
		15.1.1. Standalone HTTPS with Jetty
		15.1.2. OpenNMS Horizon as HTTPS client
		15.1.3. Differences between Java Trust Store and Java Key Store
		15.1.4. Debugging / Properties
	15.2. Request Logging
	15.3. Geocoder Service
	15.4. resourcecli: simple resource management tool
		15.4.1. Usage
		15.4.2. Sub-command: list
		15.4.3. Sub-command: show
		15.4.4. Sub-command: delete
	15.5. newts-repository-converter: Rrd/Jrb to Newts migration utility
		15.5.1. Migration
		15.5.2. Usage
		15.5.3. Example 1: convert Rrd-based data with storeByGroup enabled
		15.5.4. Example 2: convert JRobin-based data with storeByGroup disabled
	15.6. Newts
		15.6.1. Configuration
		15.6.2. Cassandra Monitoring
		15.6.3. Newts Monitoring
	15.7. Daemon Configuration Files
		15.7.1. Eventd
		15.7.2. Notifd
		15.7.3. Pollerd
Chapter 16. System Properties
Chapter 17. Ticketing
	17.1. JIRA Ticketing Plugin
		17.1.1. Setup
		17.1.2. Jira Commands
		17.1.3. Custom fields
		17.1.4. Troubleshooting
	17.2. Remedy Ticketing Plugin
		17.2.1. Remedy Product Overview
		17.2.2. Supported Remedy Product Versions
		17.2.3. Setup
	17.3. TSRM Ticketing Plugin
		17.3.1. Setup
		17.3.2. Mapping OpenNMS Ticket with TSRM Incident
Chapter 18. Enabling RMI
	18.1. Enabling RMI
	18.2. Enabling SSL
	18.3. Connecting to RMI over SSL
Chapter 19. Minion
	19.1. Using Kafka
		19.1.1. Consumer Configuration
		19.1.2. Producer Configuration
	19.2. Using AWS SQS
		19.2.1. OpenNMS Horizon Configuration
		19.2.2. Minion Configuration
		19.2.3. SQS Configuration Settings
		19.2.4. Managing Multiple Environments
		19.2.5. AWS Credentials
		19.2.6. Limitations
Chapter 20. Plugin Manager
	20.1. Plugin Manager UI panel
	20.2. Setting Karaf Instance Data
	20.3. Manually adding a managed Karaf instance
	20.4. Installed Plugins
	20.5. Available Plugins Server
	20.6. Installing Available Plugins
	20.7. Plugins Manifest
	20.8. Installed Licences Panel
	20.9. Adding a New Licence
	20.10. Installing Internal Plugins
Chapter 21. Internal Plugins
	21.1. Internal Plugins supplied with OpenNMS Horizon
	21.2. Installing Plugins with the Karaf Consol
	21.3. Alarm Change Notifier Plugin
	21.4. Elasticsearch ReST plugin
		21.4.1. Configuration
		21.4.2. Loading Historical Events
		21.4.3. Index Definitions
		21.4.4. Viewing events using Kibana Sense
		21.4.5. Mapping of Alarms and Events to Elasticsearch
Chapter 22. Special Cases and Workarounds
	22.1. Overriding SNMP Client Behavior
Chapter 23. IFTTT Integration
	23.1. IFTTT Configuration
	23.2. OpenNMS Configuration
	23.3. Example
Chapter 24. Telemetry Daemon
	24.1. What is a Listener
	24.2. What is an Adapter
	24.3. What are Protocols
	24.4. Push Sensor Data through Minion
	24.5. Protocol Reference
		24.5.1. Junos Telemetry Interface
	24.6. Listener Reference
		24.6.1. UDP Listener
Chapter 25. Kafka Producer
	25.1. Overview
		25.1.1. Events
		25.1.2. Alarms
		25.1.3. Nodes
	25.2. Enabling the Kafka Producer
	25.3. Configuring the Kafka Producer
		25.3.1. Configuring Filtering
		25.3.2. Configuring Topic Names
	25.4. Shell Commands
		25.4.1. kafka-producer:list-alarms
		25.4.2. kafka-producer:sync-alarms
		25.4.3. kafka-producer:evaluate-filter
                        
Document Text Contents
Page 1

Administrators Guide
Copyright (c) 2015-2018 The OpenNMS Group, Inc.

OpenNMS Horizon 21.1.0, Last updated 2018-04-19 10:49:56 EDT

Page 2

Table of Contents
1. Data Choices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  1

2. User Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2

2.1. Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2

2.2. Security Roles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3

2.3. Web UI Pre-Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  5

2.3.1. Enabling Pre-Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  6

2.3.2. Configuring Pre-Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  6

3. Administrative Webinterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7

3.1. Grafana Dashboard Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7

3.2. Operator Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8

3.2.1. Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  9

3.2.2. Dashlets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  11

3.2.3. Boosting Dashlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  15

3.2.4. Criteria Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  15

3.3. JMX Configuration Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  16

3.3.1. Web based utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  16

3.3.2. CLI based utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  20

3.4. Heatmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  25

3.5. Trend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  27

4. Service Assurance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  30

4.1. Pollerd Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  30

4.2. Critical Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  32

4.3. Downtime Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  32

4.4. Path Outages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  33

4.5. Poller Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  34

4.5.1. Response Time Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  35

4.5.2. Overlapping Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  36

4.5.3. Test Services on manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  38

4.6. Service monitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  40

4.6.1. Common Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  40

4.6.2. AvailabilityMonitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  41

4.6.3. BgpSessionMonitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  42

4.6.4. BSFMonitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  44

4.6.5. CiscoIpSlaMonitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  52

4.6.6. CiscoPingMibMonitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  54

4.6.7. CitrixMonitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  59

4.6.8. DhcpMonitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  60

4.6.9. DiskUsageMonitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  64

Page 192

%version%

The SNMP version of the trap.

%snmp%

The SNMP information associated with the event.

%operinstruct%

The operator instructions for the event.

%mouseovertext%

The mouse over text for the event.

Parameter tokens

Many events carry additional information in parameters (see Anatomy of an Event). These
parameters may start life as SNMP trap variable bindings , or varbinds for short. You can access
event parameters using the parm replacement token, which takes several forms:

%parm[all]%

Space-separated list of all parameter values in the form parmName1="parmValue1"
parmName2="parmValue2" and so on.

%parm[values-all]%

Space-separated list of all parameter values (without their names) associated with the event.

%parm[names-all]%

Space-separated list of all parameter names (without their values) associated with the event.

%parm[<name>]%

Will return the value of the parameter named <name> if it exists.

%parm[##]%

Will return the total number of parameters as an integer.

%parm[#<num>]%

Will return the value of parameter number <num> (one-indexed).

%parm[name-#<num>]%

Will return the name of parameter number <num> (one-indexed).

The structure of the eventconf.xml tributary files

The ordering of event definitions is very important, as an incoming event is matched against them
in order. It is possible and often useful to have several event definitions which could match variant
forms of a given event, for example based on the values of SNMP trap variable bindings.

The tributary files included via the <event-file> tag have been broken up by vendor. When
OpenNMS Horizon starts, each tributary file is loaded in order. The ordering of events inside each
tributary file is also preserved.

The tributary files listed at the very end of eventconf.xml contain catch-all event definitions. When
slotting your own event definitions, take care not to place them below these catch-all files;
otherwise your definitions will be effectively unreachable.

183

Page 193

A few tips

• To save memory and shorten startup times, you may wish to remove event definition files that
you know you do not need.

• If you need to customize some events in one of the default tributary files, you may wish to make
a copy of the file containing only the customized events, and slot the copy above the original;
this practice will make it easier to maintain your customizations in case the default file changes
in a future release of OpenNMS Horizon.

6.4.3. Reloading the event configuration

After making manual changes to OPENNMS_HOME/etc/eventconf.xml or any of its tributary files, you
can trigger a reload of the event configuration by issuing the following command on the OpenNMS
Horizon server:

OPENNMS_HOME/bin/send-event.pl uei.opennms.org/internal/reloadDaemonConfig -p
'daemonName Eventd'

6.5. 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 be 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 OpenNMS Horizon.

184

Page 383

distribution for a complete list of available properties.

25.3.2. Configuring Topic Names

By default three topics are created i.e. events, alarms, nodes. To change these, you can use:

$ ssh -p 8101 [email protected]
...
[email protected]()> config:edit org.opennms.features.kafka.producer
[email protected]()> config:property-set eventTopic ""
[email protected]()> config:property-set nodeTopic "opennms-nodes"
[email protected]()> config:update

In the example above, we disable event forwarding by setting an empty topic name and change the
node topic name to opennms-nodes.

25.4. Shell Commands
The Kafka Producer also provides a series of shell commands to help administering and debugging
the service.

25.4.1. kafka-producer:list-alarms

The list-alarms command can be used to enumerate the reduction keys and show the associated
event labels for the alarms that are present in the topic. This command leverages functionality used
by the alarm synchronization process, and as a result this must be enabled in for this command to
function.

$ ssh -p 8101 [email protected]
...
[email protected]> kafka-producer:list-alarms
uei.opennms.org/alarms/trigger:n33:0.0.0.0:HTTPS_POOLs
  Alarm: Generic Trigger

25.4.2. kafka-producer:sync-alarms

The sync-alarms command can be used to manually trigger the alarm synchronization process.

374

Page 384

$ ssh -p 8101 [email protected]
...
[email protected]> kafka-producer:sync-alarms
Performing synchronization of alarms from the database with those in the ktable.
Executed 1 updates in 47ms.

Number of reduction keys in ktable: 4
Number of reduction keys in the db: 4 (4 alarms total)
Reduction keys added to the ktable: (None)
Reduction keys deleted from the ktable: (None)
Reduction keys updated in the ktable:
  uei.opennms.org/nodes/nodeLostService::1:127.0.0.1:Minion-RPC

25.4.3. kafka-producer:evaluate-filter

The evaluate-filter command can be used to test arbitrary SpEL filtering expressions against
alarms or events.

Evaluating filters against alarms

To test a filter against an alarm, specify the database id of the alarm and the expression to test:

[email protected]> kafka-producer:evaluate-filter --alarm-id 57
"getReductionKey().contains('n33')"
SPEL Expression: getReductionKey().contains('n33')
Alarm with ID 57 has reduction key:
uei.opennms.org/alarms/trigger:n33:0.0.0.0:HTTPS_POOLs
Result: true

Evaluating filters against events

To test a filter against an event, specify the UEI of the event and the expression to test:

[email protected]> kafka-producer:evaluate-filter --event-uei
uei.opennms.org/alarms/trigger "getUei().contains('alarm')"
SPEL Expression: getUei().contains('alarm')
Event has UEI: uei.opennms.org/alarms/trigger
Result: true

In this case, a new event will be created with the given UEI, and the filter will be evaluated against
this new event object. At this time, existing events cannot be referenced by this tool, so this
functionality only serves to help make sure the expressions are syntactically valid.

375

Similer Documents