Hi,
I’m a new member of the community, I have a problem with the check_eth script when it runs as a command via SSH.
I created a service on Master Icinga and in the path /usr/lib/nagios/plugins on Host I copied the script check_eth.
If when the command start with icinga the result is
Usage: /usr/lib/nagios/plugins/check_eth -i -w -c [-p -b ]
-i, --interface STRING
Network interface name (example: eth0)
-w, --warning STRING
Warning interface speed level (K/M/G Bps, k/m/g bps)
If using with -p value should be in percentage (1-100)
-c, --critilcal STRING
Critical interface speed level (K/M/G Bps, k/m/g bps)
If using with -p value should be in percentage (1-100)
-p
Calculate warning and critical levels in percentage based on interface bandwidth
-b, --bandwidth STRING
Interface bandwidth value (K/M/G Bps, k/m/g bps)
The service created is:
apply Service “SSH_Net” {
import “by_ssh”
vars.check_command = “Network-Linux”
vars.by_ssh_command = “/usr/lib/nagios/plugins/check_eth”
vars.by_ssh_arguments = {
“-i” = {
value = “ens18”,
order = 0
}
“-w” = {
value = “1M Bps”,
order = 1
}
“-c” = {
value = “2M Bps”,
order = 2
}
}
}
So in your manual example only 1024K is used for -w.
Now your Icinga 2 example uses ssh_arguments, where the value is 1M Bps. This will result in the following command being executed via SSH. Note the quotes making sure that the whitespace is part of the argument value, and not a new argument.
i have the same problem with the quotation mark. In my case, i didn’t want use the check_ssh plugin. Is there a way to say icinga2 don’t use quotation marks?