Rev 52 | 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 2022-06-06
// ATTENTION!
// To make this work, you need to add following to /etc/sudoers (adjust the paths)
// nagios ALL=(root) NOPASSWD:/daten/vnag/plugins/open_deleted_files/check_open_deleted_files
// 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_open_deleted_files" {
command = [
"/usr/bin/sudo",
// PLEASE ADJUST THIS PATH
"/daten/vnag/plugins/open_deleted_files/check_open_deleted_files"
]
arguments = {
"-d" = {
value = "$vnag_open_deleted_files_dir$"
description = "Directory to check (e.g. /tmp)"
}
"-w" = {
value = "$vnag_open_deleted_files_warn$"
description = "absoluteKB (Warning range)"
}
"-c" = {
value = "$vnag_open_deleted_files_crit$"
description = "absoluteKB (Critical range)"
}
}
}
// Example usage:
//
// apply Service "example_server1_open_deleted_files" {
// import "generic-service"
// check_command = "vnag_open_deleted_files"
//
// vars = {
// vnag_open_deleted_files_dir = "/tmp"
// vnag_open_deleted_files_warn = "300MB"
// vnag_open_deleted_files_crit = "700MB"
// }
//
// assign where host.name == NodeName
// }