Go to most recent revision | Blame | 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/megaraid.phar
// You MUST make sure that the script check_megaraid 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_megaraid" {
command = [
"/usr/bin/sudo",
// PLEASE ADJUST THIS PATH
"/daten/vnag/bin/megaraid.phar"
]
arguments = {
}
}
// Example usage:
//
// apply Service "example_megaraid" {
// import "generic-service"
// check_command = "vnag_megaraid"
// check_interval = 15m
// vars = {
// }
// assign where host.name == NodeName
// }