Moogsoft Docs

Nagios

To integrate with Nagios, install shell scripts on the Nagios server. After you have installed and configured the scripts, Nagios posts event data to Moogsoft AIOps.

See the Nagios documentation for details on Nagios components.

Before You Begin

The Nagios integration has been validated with Nagios v. XI. Before you start to set up your Nagios integration, ensure you have met the following requirements:

  • You have an active Nagios installation.
  • You have full permissions to the Nagios installation directory and files.
  • You can make requests from the Nagios server to external endpoints over port 443.
  • You have installed curl on the Nagios server.

Configure the Nagios Integration

Configure the Nagios integration in Moogsoft AIOps as follows:

  1. Navigate to the Integrations tab.
  2. Click Nagios in the Monitoring section.
  3. Follow the instructions to create an integration name.

See the Nagios Integration Reference for advanced configuration information.

Install the Nagios Integration Scripts

To install the Nagios integration on your Nagios sever:

  1. Download Nagios-Files-1.1.zip to your Nagios server. The zip file contains shell scripts and configuration files for the integration.
  2. Extract the files from Nagios-Files-1.1.zip.

  3. Make the Nagios integration shell scripts executable. For example:

    chmod +x send-service-event.sh send-host-event.sh
  4. Edit the configuration variables for send-service-event.sh as follows:

    Field Value
    HOSTNAME

    <your Nagios integration URL>

    For example: https://example.moogsoftaiops.com/events/nagios_nagios1

    BASIC_AUTH_USER

    Username generated in the Moogsoft AIOps UI

    BASIC_AUTH_PASSWORD

    Password generated in the Moogsoft AIOps UI

  5. Edit the same configuration variables for for send-host-event.sh .

  6. Copy the Nagios integration shell scripts to the Nagios plugin dierectory: libexec . For example:

    cp send*event.sh /usr/local/nagios/libexec
  7. Backup your Nagios commands.cfg file. For example:

    cp /usr/local/nagios/etc/commands.cfg ~/commands.cfg.bak
  8. Append the contents of the commands.cfg from the integration package to the Nagios commands.cfg file. For example:

    cat commands.cfg >> /usr/local/nagios/etc/commands.cfg
  9. Backup your Nagios contacts.cfg file. For example:

    cp /usr/local/nagios/etc/contacts.cfg ~/contacts.cfg.back
  10. Append the contents of the contacts.cfg from the integration package to the Nagios contacts.cfg file. For example:

    cat contacts.cfg >> /usr/local/nagios/etc/contacts.cfg
  11. Edit the Nagios configuration file /usr/local/nagios/etc/nagios.cfg as follows:
    • Verify event handlers are enabled: enable_event_handlers=1.
    • Set the global host event handler: global_host_event_handler=send-host-event.
    • Set the global service event handler: global_service_event_handler=send-service-event.
  12. Restart Nagios.

Upon restart, Nagios sends host and service related events to Moogsoft AIOps.