check_ms_win_disk_load error?
check_ms_win_disk_load error?
Hello,
I'm new to Nagios and attempting to use check_ms_win_disk_load script. However, I get the following error:
[root@vnlpnagios01 libexec]# ./check_nrpe -H hnwtcompu01 -t 60 -c check_ms_netstat
Missing expression after unary operator '-'.
At line:1 char:2
+ - <<<<
+ CategoryInfo : ParserError: (-:String) [], ParentContainsErrorR
ecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
[root@vnlpnagios01 libexec]#
Any clue?
I'm new to Nagios and attempting to use check_ms_win_disk_load script. However, I get the following error:
[root@vnlpnagios01 libexec]# ./check_nrpe -H hnwtcompu01 -t 60 -c check_ms_netstat
Missing expression after unary operator '-'.
At line:1 char:2
+ - <<<<
+ CategoryInfo : ParserError: (-:String) [], ParentContainsErrorR
ecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
[root@vnlpnagios01 libexec]#
Any clue?
Re: check_ms_win_disk_load error?
For some clarity here, which plugin are you trying to use?
The topic says check_ms_win_disk_load, and your command output says check_ms_netstat.
I just want to make sure we're on the same page for troubleshooting.
The topic says check_ms_win_disk_load, and your command output says check_ms_netstat.
I just want to make sure we're on the same page for troubleshooting.
Former Nagios Employee.
me.
me.
Re: check_ms_win_disk_load error?
Here is the link to the plugin I wish to leverage:
http://outsideit.net/check-ms-win-disk-load/
I changed updated the nsc.ini file with following:
check_ms_netstat=cmd /c echo scripts/check_ms_win_disk_load.ps1 $ARG1$; exit LastExitCode | powershell.exe -command –
check_ms_netstat is what I'm calling to evoke check_ms_win_disk_load.ps1 command:
Hiram
http://outsideit.net/check-ms-win-disk-load/
I changed updated the nsc.ini file with following:
check_ms_netstat=cmd /c echo scripts/check_ms_win_disk_load.ps1 $ARG1$; exit LastExitCode | powershell.exe -command –
check_ms_netstat is what I'm calling to evoke check_ms_win_disk_load.ps1 command:
Hiram
Re: check_ms_win_disk_load error?
aha you say nsc.ini => This would imply you are using an older version of NSCLient. Could you please
1) try upgrading to 0.4.1.105
2) There was an error in my documentation (I repaired it) You need to make a command like this:
and refer to it like this:
As you need to provide at least one argument...
Let us know if it helps.
Grtz
Willem
1) try upgrading to 0.4.1.105
2) There was an error in my documentation (I repaired it) You need to make a command like this:
Code: Select all
check_ms_win_disk_load=cmd /c echo scripts/check_ms_win_disk_load.ps1 $ARG1$; exit LastExitCode | powershell.exe -command –Code: Select all
./check_nrpe -H hnwtcompu01 -t 60 -c check_ms_win_disk_load -a '-H localhost'Let us know if it helps.
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: check_ms_win_disk_load error?
Thank you for popping in and supporting this, Willem! 
Former Nagios Employee.
me.
me.
Re: check_ms_win_disk_load error?
Ok...I'll try to upgrade nsclient as i'm running 0.3.9.328.
I'll report back results shortly.
I'll report back results shortly.
Re: check_ms_win_disk_load error?
Download 0.4.1.105. Later versions have other problems.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: check_ms_win_disk_load error?
I updated client as suggested and made change to nsc.ini file.
Getting a different error:
[root@vnlpnagios01 libexec]# ./check_nrpe -H hnwtcompu01 -t 60 -c check_ms_win_disk_load -a '-H localhost'
No handler for command: check_ms_win_disk_load
My syntax in the ini file is:
check_ms_win_disk_load=cmd /c echo scripts/check_ms_win_disk_load.ps1 $ARG1$; exit LastExitCode | powershell.exe -command –
File in scripts folder is named check_ms_win_disk_load.ps1.
Getting a different error:
[root@vnlpnagios01 libexec]# ./check_nrpe -H hnwtcompu01 -t 60 -c check_ms_win_disk_load -a '-H localhost'
No handler for command: check_ms_win_disk_load
My syntax in the ini file is:
check_ms_win_disk_load=cmd /c echo scripts/check_ms_win_disk_load.ps1 $ARG1$; exit LastExitCode | powershell.exe -command –
File in scripts folder is named check_ms_win_disk_load.ps1.
Re: check_ms_win_disk_load error?
Did you restart nscp service after editing the nsclient.ini?
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: check_ms_win_disk_load error?
Yes. Restarted and troubleshoot with running cmd window open. While executing command via nagios server. Either my syntax is not correct or something wrong with my setup?