HowTo Configure Nagios to support Mellanox Switches

Version 7

    This post is shows the basic steps needed to monitor Mellanox switches using Monitoring systems based Nagios (NagiosXI, Icinga, Shinken, Opsview ...)

     

    References

     

    Nagios Installation and setup

    Refer to Nagios website for documentation per your server's OS (Nagios - Documentation)

    Once Nagios is installed on your network you should be able to add hosts and services per hosts (or host groups).

     

    Add Host

    Add to /usr/local/nagios/etc/hosts/switch.cfg the required host:

    define host {

            host_name              r-qa-sit-sx06
            address                10.209.28.82
            alias                  r-qa-sit-sx06 switch
            use                    generic-switch
            }

         

    You can add many hosts or group or hosts as well.

     

    Add Service

    Add to /usr/local/nagios/etc/services/switch-services.cfg the required service :


    Here is aexample of SysUPTime SNMP check.

    Note: There are many other service options to check and monitor (e.g. via SNMP, HTTP, SSH and so on) for more options refer to Nagios documentation.

    define service {

            host_name                r-qa-sit-sx06

            service_description      Uptime

            check_command            check_snmp!-o .1.3.6.1.2.1.1.3.0

            use                      generic-service

    }

         

     

    Verification

    It is recommended to test the Nagios configuration (before restarting the Nagios service) as follows:

    # cd /usr/local/nagios/etc
    # /usr/local/nagios/bin/nagios -v nagios.cfg

    Nagios Core 4.0.8
    Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
    Copyright (c) 1999-2009 Ethan Galstad
    Last Modified: 08-12-2014
    License: GPL

    Website: http://www.nagios.org
    Reading configuration data...
      Read main config file okay...
      Read object config files okay...

    Running pre-flight check on configuration data...

    Checking objects...
            Checked 9 services.
            Checked 2 hosts.
            Checked 1 host groups.
            Checked 0 service groups.
            Checked 2 contacts.
            Checked 2 contact groups.
            Checked 115 commands.
            Checked 8 time periods.
            Checked 0 host escalations.
            Checked 0 service escalations.
    Checking for circular paths...
            Checked 2 hosts
            Checked 0 service dependencies
            Checked 0 host dependencies
            Checked 8 timeperiods
    Checking global event handlers...
    Checking obsessive compulsive processor commands...
    Checking misc settings...

    Total Warnings: 0
    Total Errors:  0

    Things look okay - No serious problems were detected during the pre-flight check
    #                 

        

     

    Restart the server:

    /etc/init.d/nagios restart

        

     

     

    Screen shot - Hosts list

     

    Capture1.PNG.png

    Screen shot - Service list

     

    Capture2.PNG.png