check_ms_win_disk_load error?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
hk44765
Posts: 21
Joined: Mon Sep 21, 2015 1:14 pm

check_ms_win_disk_load error?

Post by hk44765 »

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?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_ms_win_disk_load error?

Post by hsmith »

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.
Former Nagios Employee.
me.
hk44765
Posts: 21
Joined: Mon Sep 21, 2015 1:14 pm

Re: check_ms_win_disk_load error?

Post by hk44765 »

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
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: check_ms_win_disk_load error?

Post by WillemDH »

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:

Code: Select all

check_ms_win_disk_load=cmd /c echo scripts/check_ms_win_disk_load.ps1 $ARG1$; exit LastExitCode | powershell.exe -command –
and refer to it like this:

Code: Select all

./check_nrpe -H hnwtcompu01 -t 60 -c check_ms_win_disk_load -a '-H localhost'
As you need to provide at least one argument...

Let us know if it helps.

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_ms_win_disk_load error?

Post by hsmith »

Thank you for popping in and supporting this, Willem! :mrgreen:
Former Nagios Employee.
me.
hk44765
Posts: 21
Joined: Mon Sep 21, 2015 1:14 pm

Re: check_ms_win_disk_load error?

Post by hk44765 »

Ok...I'll try to upgrade nsclient as i'm running 0.3.9.328.

I'll report back results shortly.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: check_ms_win_disk_load error?

Post by WillemDH »

Download 0.4.1.105. Later versions have other problems.
Nagios XI 5.8.1
https://outsideit.net
hk44765
Posts: 21
Joined: Mon Sep 21, 2015 1:14 pm

Re: check_ms_win_disk_load error?

Post by hk44765 »

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.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: check_ms_win_disk_load error?

Post by WillemDH »

Did you restart nscp service after editing the nsclient.ini?
Nagios XI 5.8.1
https://outsideit.net
hk44765
Posts: 21
Joined: Mon Sep 21, 2015 1:14 pm

Re: check_ms_win_disk_load error?

Post by hk44765 »

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?
Locked