Hi,
All our Linux servers are monitored through ssh with such kind of config :
template Host "generic-ssh-host" {
import "generic-host"
vars.os = "Linux"
vars.agent_type = "by_ssh"
vars.by_ssh_logname = "nagios"
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
}
object Host "unitbkp1" {
import "generic-ssh-host"
[...]
}
apply Service "users" {
import "generic-service"
check_command = "by_ssh_users"
assign where host.vars.agent_type == "by_ssh"
}
object CheckCommand "by_ssh_users" {
import "by_ssh"
vars.by_ssh_command = "/usr/lib/nagios/plugins/check_users -w
$by_ssh_users_warn$ -c $by_ssh_users_crit$"
vars.by_ssh_users_warn = "20"
vars.by_ssh_users_crit = "50"
}
Since syntax described at
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics#commands
:
command = [...]
arguments = {...}
seems much more efficient & generic, we'd like to know if there is an
equivalent for ssh hosts and be able to do something similar to :
object CheckCommand "by_ssh_users" {
import "by_ssh"# or something else?
command = [ PluginDir + "/check_users" ]
arguments = {
"-w" = "$users_warn$"
"-c" = "$users_crit$"
}
vars.users_warn = "20"
vars.users_crit = "50"
}
Thanks,
Samuel
--
Samuel Bancal
ENAC-IT
EPFL
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users