Search code examples
nagiosnagiosxi

Nagios alert integration with external tool


I'm integrating alerts and events from Nagios to my system. On searching I have found an integration of Moogsoft with Nagios(click). I have followed this, but it was not successful.

In their 'Step 2: Configurations:' they mentioned about 'HOSTNAME', 'BASIC_AUTH' etc. I can't found any of these keys in the respective downloaded file. Can anyone provide clarification or suggest any other solution? Any help would be greatful.


Solution

  • I suspect this is bad documentation.

    Both scripts simply echo (slightly formatted) output from Nagios and pipe this to the 'nc' command with the destination host and port number. The 'nc' command does not support HTTP authentication (like for instance 'curl' does), so it makes no sense why those options would be documented. Also, none of the HOSTNAME -to- BASIC_AUTH_PASS variables are ever used in the two shell scripts.

    • Set recStation to the 'hostname' OR 'ip address' of the Moogsoft server.
    • Set recPort to the port number the Moogsoft server is listening on.

    For example:

    recStation="192.168.0.199"
    recPort="9000"
    

    And give it a shot.

    Note that IF your Moogsoft system does require HTTP authentication, these scripts simply will not work. But it would be a simple matter to create a new shell script that used something like 'curl' to add authentication support.