Hello how is it possbile to perform a check like this:
/usr/lib/nagios/plugins/check_nt -H 192.168.110.130 -p 12489 -s ****** -v COUNTER -l "\\Paging File(_Total)\\% Usage","Paging File usage is %.2f %%" -w 60 -c 90
My actual check command looks like this:
object CheckCommand "check_windows_pagefile" {
import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_nt" ]
arguments = {
"-H" = "$component_ip$"
"-p" = "12489"
"-s" = "$nsclient_password$"
"-v" = "COUNTER"
"-l" = "\"\\\\Paging File(_Total)\\\\% Usage\",\"Paging File usage is %.2f %%\""
"-w" = "60"
"-c" = "90"
}
}
But this gets me only "NSClient - ERROR: Invalid return from command: check_pdh"
But if i perform the first command an bash it works.
This is what icinga2 log:
'/usr/lib/nagios/plugins/check_nt' '-H' '192.168.110.130' '-c' '90' '-l' '"\\Paging File(_Total)\\% Usage","Paging File usage is %.2f %%"' '-p' '12489' '-s' '******' '-v' 'COUNTER' '-w' '60'
This is also not working:
'/usr/lib/nagios/plugins/check_nt' '-H' '192.168.110.130' '-c' '90' '-l' '\\Paging File(_Total)\\% Usage','Paging File usage is %.2f %%' '-p' '12489' '-s' '******' '-v' 'COUNTER' '-w' '60'
Only this is working:
'/usr/lib/nagios/plugins/check_nt' '-H' '192.168.110.130' '-c' '90' '-l' "\\Paging File(_Total)\\% Usage","Paging File usage is %.2f %%" '-p' '12489' '-s' '******' '-v' 'COUNTER' '-w' '60'
Has someone experience with icinga2 and counter at the check_nt plugin?
How to solve the single / double quote problem?