I'm following this guide to use by_ssh on icinga2 instead of NRPE:
https://wiki.icinga.org/display/howtos/Using+SSH+as+remote+client+for+Icinga2
The problem I have this that when executing a nagios plugin remotely over SSH i'm getting 'stdin: is not a tty' returned, which icinga2 is erroring on.
I can stop this on the command line with passing ssh -t, eg:
ssh -t icinga2@myserver.com "ls -l"
However, i can't seem to get -t into the by_ssh module. I thought using the by_ssh_argument attribute would do this. My icinga2 config looks like this:
object CheckCommand "disks" {
import "by_ssh"
vars.by_ssh_logname = "root"
vars.by_ssh_port = "4873"
vars.by_ssh_argument = { "-t" = null }
vars.by_ssh_command = [ "/usr/lib64/nagios/plugins/check_disk", "-w", "$by_ssh_disk_warn$", "-c", "$by_ssh_disk_crit$" ]
vars.by_ssh_disk_warn = "5%"
vars.by_ssh_disk_crit = "2%"
}
I've also tried inverting, putting { 0 = "-t" } or equivalent. Neither way is getting passed into the ssh command correctly.
I'm either not going about this the correct way at all, or it's not possible and i need to make my own by_ssh plugin?