Note: This guide is intended to be for opHA 3, opEvents 3 and NMIS 9. The tool is available for previous versions, but the syntax and some parameters can change.
In order to integrate the poller events into the primary server on an opHA environment, we can make use of the create_remote_event tool and create some event actions rules to send the poller events the the primary server:
- Edit the Event Actions (Got to System, Edit Event Actions) and create a new script (Please, replace with your configurations):
PRIMARY-URL (this is the Primary server the event will be sent to)
- USERNAME (A user account on the Primary with Admin rights)
- PASSWORD (the password for the USERNAME account)
Authority (this is the button label that will appear on the Primary)
POLLER-URL (this is the Poller-server sending the event, used to link back to the originating event from the Primary)
Please note, you can edit the event information that you want to send.
- Add a new policy in the Event Actions file:
Please note, you can edit the condition and send just the events that you want.
- Test the remote event:
The raw exit code should be 0:
Sending UP events to the Primary
When an event is acknowledged, opEvents stops the propagation. That means, that all the rules are not going to run anymore. There are different approaches to achieve this, but is a common schema to set up opevents_auto_acknowledge_up to false in the poller, so the event is not acknowledge and can be sent to the primary.
Forwarded events may arrive out of order to the primary server, because of network congestion or slow action processing.
To enable reorder protection, two steps need to be taken:
- Set the configuration property
state_reorder_windowto a positive number (e.g. 30) on the receiving server.
- Always send the
authorityproperty, to denote the event as originating from a remote authoritative source.
Fast create remote event
We have recently rewritten create remote event in Go and have provided the option f to use token auth skipping out one of the auth requests from the old Perl version.
We recommend you place this in the current location of create_remote_event.pl which is in /usr/local/omk/bin
We have retained all arguments from the perl version.
Version 1.0.1 can be downloaded here:
New in this version is using token auth so you can now skip passing the username and password and use a token from the master.
More about tokens found here in Delegated Authentication
This is passed using -t
If your Opmantek Applications in a non standard location you can use -path to point to the full path of generate_auth_token.pl which is shiped in /usr/local/omk/bin/generate_auth_token.pl in future versions we aim to remove this.
Sometimes the end server is busy but using the flag -retry you can instruct the http handler to make X amount of requests to try again, this will perform a back off to try and not swamp the end server.