Search found 8 matches

by sc00354007
Wed Jun 08, 2016 5:21 am
Forum: Open Source Nagios Projects
Topic: check_nrpe unexpected result with powershell script
Replies: 14
Views: 8448

Re: check_nrpe unexpected result with powershell script

Thanks a lot Below is the updated code : #check_scripts.ps1 $returnStateOK =0 $returnStateWarning =1 $returnStateCritical =2 $returnStateUnknown =3 $servers = "ABCWPMBX1-ABC","GHIWPMBX3-DEF","DEFWPMBX2-ABC","KLMWPMBX4-DEF","PQRWVJAR2-DEF" $username =...
by sc00354007
Fri Jun 03, 2016 7:20 am
Forum: Open Source Nagios Projects
Topic: check_nrpe unexpected result with powershell script
Replies: 14
Views: 8448

Re: check_nrpe unexpected result with powershell script

The problem is that the Powershell script runs on a windows 2008 probe which in turn will connect to the exchange 2010 environment and give the results back to Nagios. So, the user "DOMAIN\ABC" on the windows probe is also setup on the exchange as well. Is there any other way to achieve th...
by sc00354007
Thu Jun 02, 2016 2:02 pm
Forum: Open Source Nagios Projects
Topic: check_nrpe unexpected result with powershell script
Replies: 14
Views: 8448

Re: check_nrpe unexpected result with powershell script

Please see the below output after doing the changes: [nagios@abc ~]$ /usr/lib64/nagios/plugins/check_nrpe -H x.x.x.x -c alias_check_scripts Get-Counter -ComputerName 'ABCWPMBX1-ABC' -ListSet MSExchangeIS -ea stop|'select-object'=0 '-ExpandProperty'=0 'CounterSetName Get-Counter'=0 '-ComputerName'=0 ...
by sc00354007
Thu Jun 02, 2016 4:00 am
Forum: Open Source Nagios Projects
Topic: check_nrpe unexpected result with powershell script
Replies: 14
Views: 8448

Re: check_nrpe unexpected result with powershell script

Hi, Thanks for your response. Please see below: Updated code : $returnStateOK =0 $returnStateWarning =1 $returnStateCritical =2 $returnStateUnknown =3 $servers = "ABCWPMBX1-ABC","GHIWPMBX3-DEF","DEFWPMBX2-ABC","KLMWPMBX4-DEF","PQRWVJAR2-DEF" $ErrorAc...
by sc00354007
Wed Jun 01, 2016 8:03 am
Forum: Open Source Nagios Projects
Topic: check_nrpe unexpected result with powershell script
Replies: 14
Views: 8448

Re: check_nrpe unexpected result with powershell script

If I run it from the Powershell console, it gives me below output: PS C:\Program Files\NSClient++\scripts\powershell> .\check_scripts.ps1 Critical: MSExchangeIS counter is enabled for PQRWVJAR2-DEF PS C:\Program Files\NSClient++\scripts\emas> [nagios@abc ~]$ /usr/lib64/nagios/plugins/check_nrpe -H x...
by sc00354007
Tue May 31, 2016 3:23 am
Forum: Open Source Nagios Projects
Topic: check_nrpe unexpected result with powershell script
Replies: 14
Views: 8448

Re: check_nrpe unexpected result with powershell script

Hello,

Thanks for your response.

I did the changes suggested by you and restarted NSCleint service.

Still the same output.

Could there be an issue with the powershell or the NSClient version itself ?
by sc00354007
Mon May 30, 2016 3:49 pm
Forum: Open Source Nagios Projects
Topic: check_nrpe unexpected result with powershell script
Replies: 14
Views: 8448

Re: check_nrpe unexpected result with powershell script

I also displayed the value of $c outside the loop while calling from check_nrpe and it is blank.

Why is the value of $c as blank when calling via check_nrpe ?

If I call it from Powershell console or cmd, $c = MSExchangeIS

Can anyone help or point me to the right direction ?
by sc00354007
Mon May 30, 2016 6:00 am
Forum: Open Source Nagios Projects
Topic: check_nrpe unexpected result with powershell script
Replies: 14
Views: 8448

check_nrpe unexpected result with powershell script

Hi All, I am trying to run a powershell script via NSClient using check_nrpe but it is giving unexpected output. The powershell script is fetching a performance counter from list of servers and based on it the result is send to Nagios. Below is the software version I am using: Nagios 3.5.1 Nagios-pl...