Xmlrpcd
From OpenNMS
Sends events to a remote XML-RPC daemon.
One of the integration points with OpenNMS is xmlrpcd. This allows for events to be sent from OpenNMS to a remote system via XML-RPC.
The configuration file is xmlrpcd-configuration.xml and looks like this:
<xmlrpcd-configuration max-event-queue-size="5000">
<external-servers retries="3" elapse-time="15000">
<xmlrpc-server url="http://10.1.8.10:8000" />
</external-servers>
<subscription>
<subscribed-event uei="uei.opennms.org/nodes/nodeLostService"/>
<subscribed-event uei="uei.opennms.org/nodes/nodeRegainedService"/>
<subscribed-event uei="uei.opennms.org/nodes/nodeUp"/>
<subscribed-event uei="uei.opennms.org/nodes/nodeDown"/>
<subscribed-event uei="uei.opennms.org/nodes/interfaceUp"/>
<subscribed-event uei="uei.opennms.org/nodes/interfaceDown"/>
<subscribed-event uei="uei.opennms.org/internal/capsd/updateServer"/>
<subscribed-event uei="uei.opennms.org/internal/capsd/updateService"/>
<subscribed-event uei="uei.opennms.org/internal/capsd/xmlrpcNotification"/>
</subscription>
</xmlrpcd-configuration>
OpenNMS will try each server in the external-servers block, and if none are reachable it will cache up to 5000 events before it starts to discard them. The events that should be forwarded to the remote systems are then listed. Each time a event with a listed UEI is received by OpenNMS, it will be sent on.
Contents |
Enabling xmlrpcd
To enable xmlrpcd, edit the configuration file to point to valid servers, and then edit service-configuration.xml and uncomment the xmlrpcd daemon.
The xmlrpcNotification Event
This was originally designed for an MSP that wanted to integrate their internal customer management system with OpenNMS. They would send in updateServer and updateService events to modify what OpenNMS monitored, but they wanted some confirmation that the event was processed.
By setting xmlrpc="true" in the poller-configuration.xml and capsd-configuration.xml files, this will cause xmlrpcNotification events to be sent that can be used to verify that those update events were successfully received and processed. Note that setting those two values to true is not required just to send events via XML-RPC.
Using SSL connections to a remote XMLRPC server
If an SSL connection for the xmlrpcd connection is required, java needs to know where the certificate can be found. To do so, perform the following steps:
1) Obtain the .crt or .pem file from the remote server. Most browsers have an option to examine and download certificates just by browsing to the server's SSL URL.
2) Use the keytool program that ships with Sun's Java:
$ keytool -import -alias website.example.com -keystore /etc/java/keystore -file sitecert.crt Enter keystore password: changeit
this will display the information in the file sitecert.crt. Verify that it is valid, and be sure to confirm that the CN value in the certificate matches "website.example.com" or else Java will think that the site is being spoofed.
3) Trust the certificate:
Trust this certificate? [no]: yes Certificate was added to keystore
4) Tell Java where the keystore is located.
Edit /opt/opennms/etc/opennms.conf (create it if it doesn't exist) and add:
ADDITIONAL_MANAGER_OPTIONS="-Djavax.net.ssl.trustStore=/etc/java/keystore"
This should prevent exceptions like:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
In the xmlrpcd.log file.
Version History/Availability
- This feature was added in version 1.1.3
- This feature was enhanced or modified in version 1.5.92









New Pages