| 685 |  |  | 
          
            |  | 685 | === 3.4.3. Nagios integration === | 
          
            |  | 686 |  | 
          
            |  | 687 | The script can be called with --nagios parameter. It will force a single line output and will return exit code 0 if all good, or 2 if at least one thing is wrong. | 
          
            |  | 688 | It's the standard nagios expected return code. | 
          
            |  | 689 |  | 
          
            |  | 690 | You probably want to run the script through NRPE, define the command like this: | 
          
            |  | 691 |  | 
          
            |  | 692 | In '''/etc/nagios/nrpe.d/00_check_raid.cfg''' | 
          
            |  | 693 | {{{ | 
          
            |  | 694 | command[check_raid]=/usr/bin/sudo /usr/sbin/megaclisas-status --nagios | 
          
            |  | 695 | }}} | 
          
            |  | 696 |  | 
          
            |  | 697 | You also need a sudo config file, in '''/etc/sudoers.d/00-check-raid''' | 
          
            |  | 698 | {{{ | 
          
            |  | 699 | nagios ALL=(root) NOPASSWD:/usr/sbin/megaclisas-status --nagios | 
          
            |  | 700 | }}} | 
          
            |  | 701 |  | 
          
            |  | 702 | Then you can expect such monitoring facilities (centreon on-top centreon-engine in this picture): | 
          
            |  | 703 |  | 
          
            |  | 704 | [[Image(centreon_check_raid.png)]] |