Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleMethod 2: Configure by using Golang flags

Configure by entering flags into the command from the Nagios XI web interface through Configure > Core Config Manager > Commands. Use -apiKey flag for your apiKey and -ns flag for your nagios_server name. If you don't have multiple Nagios servers, you don't have to define the Nagios server. Using flags overwrites all the other configuration methods mentioned earlier.

To send additional custom arguments, add them after the flags. For example, customArgName1 customArgValue1 customArgName2 customArgValue2. Parse custom arguments by adding {{_payload.customArgName}} to wherever is needed in the input fields. To learn more about using raw parameters, see dynamic fields.

Expand
titleMethod 3: Configure from script

Configure apiKey and nagios_server from the send2jsm.go script. Build the script again and put the new executable into the /home/jsm/jec/scripts directory. Learn more about the location of the send2jsm.go and how to build a go script in the “Source and recompiling send2jsm” section in this article.

...

  1. Go to Configure > Core Config Manager > Contacts.

  2. Select Add New.

  3. Populate the Common Settings as follows:
    Contact Name: jsm
    Description: JSM Contact

  4. Select the Active checkbox.

  5. Populate alert settings:

Expand
titleAlert settings

Host Notifications Enabled

Selected

Host Notification Timeperiod

24×7

Host Notification options

down, unreachable (depending on the use case, you can select other options as well)

Manage Host Notification Commands

Add notify-host-by-opsgenie command to the list of selections

Service Notifications Enabled

Selected

Service Notification Timeperiod

24×7

Service Notification options

critical (depending on the use case, you can select other options as well)

Manage Service Notification Commands

Add notify-service-by-opsgenie command to the list of selections

...