こんにちは、次のようなチェックを実行するにはどうすればよいですか。
/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
私の実際のチェックコマンドは次のようになります。
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"
}
}
しかし、これは「NSClient - エラー: コマンドからの無効な戻り値: check_pdh」のみを取得します。
しかし、最初のコマンド bash を実行すると動作します。
これはicinga2のログです:
'/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'
これも機能していません:
'/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'
これだけが機能しています:
'/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'
check_nt プラグインで icinga2 とカウンターを使用した経験のある人はいますか?
一重/二重引用符の問題を解決するには?