Subversion Repositories vnag

Compare Revisions

Regard whitespace Rev 1 → Rev 2

/trunk/plugins/last/icinga2.conf
0,0 → 1,63
// 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 2018-10-01
 
object CheckCommand "vnag_last" {
command = [ "/daten/vnag/plugins/last/check_last" ]
 
arguments = {
"-u" = {
value = "$vnag_last_user$"
description = "The Linux username. If the argument is missing, all users will be checked."
}
"-R" = {
value = "$vnag_last_regex$"
description = "The regular expression (in PHP: preg_match) which is applied on IP, Hostname, Country, AS number or ISP name. If the regular expression matches, the login will be accepted, otherweise an alert will be triggered. Example: /^DE$/ismU or /Telekom/ismU"
}
"-v" = {
set_if = "$vnag_last_verbose$"
description = "Additionally list logins which are OK, not just the logins which are suspicious."
}
"-f" = {
value = "$vnag_last_wtmp_file_mask$"
description = "Filemask of the wtmp file (important if you use logrotate), e.g. '/var/log/wtmp*'"
}
"-e" = {
set_if = "$vnag_last_emptyok$"
description = "Treat an empty result (e.g. empty wtmp file after rotation) as success; otherwise treat it as status 'Unknown'"
}
"--ipInfoToken" = {
value = "$vnag_ipinfo_token$"
description = "If you have a token for ipinfo.io, please enter it here. Without token, you can query the service approx 1,000 times per day (which should be enough)"
}
}
}
 
// Example usage:
//
// apply Service "example_john_logins" {
// import "generic-service"
// check_command = "vnag_last"
// vars = {
// vnag_last_user = "john"
// vnag_last_regex = "/Telekom/ismU"
// vnag_last_wtmp_file_mask = "/var/log/wtmp*"
// vnag_last_emptyok = true
// }
// assign where host.name == NodeName
// }
// apply Service "example_mike_logins" {
// import "generic-service"
// check_command = "vnag_last"
// vars = {
// vnag_last_user = "mike"
// vnag_last_regex = "/\\.unitymediagroup\\.de/ismU"
// vnag_last_wtmp_file_mask = "/var/log/wtmp*"
// vnag_last_emptyok = false
// }
// assign where host.name == NodeName
// }