Subversion Repositories vnag

Rev

Rev 80 | Blame | Compare with Previous | Last modification | View Log | RSS feed

// Put this file in /etc/icinga2/conf.d/...

// VNag - Nagios Framework for PHP
// Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com>
// Licensed under the terms of the Apache 2.0 license
//
// Revision 2023-10-14

// ATTENTION!
// To make this work, you need to add following to /etc/sudoers (adjust the paths)
//     nagios ALL=(root) NOPASSWD:/daten/vnag/bin/hp_smartarray.phar
// You MUST make sure that the script check_hp_smartarray and all other VNag scripts are
// owned by root, otherwise the owner could change the code, and it would be executed with
// root privileges!

object CheckCommand "vnag_hp_smartarray" {
        command = [
                "/usr/bin/sudo",

                // PLEASE ADJUST THIS PATH
                "/daten/vnag/bin/hp_smartarray.phar"
        ]

        arguments = {
                "-s" = {
                        value = "$vnag_hp_smartarray_slot$"
                        description = "The slot where the HP Smart Array RAID controller is installed"
                        required = true
                }
        }
}

// Example usage:
//
// apply Service "example_hp_smartarray_slot3" {
//      import "generic-service"
//      check_command = "vnag_hp_smartarray"
//      check_interval = 15m
//      vars = {
//              vnag_hp_smartarray_slot = 3
//      }
//      assign where host.name == NodeName
// }