LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-03-2013, 12:42 PM   #1
David Trest
Member
 
Registered: Jul 2013
Distribution: CentOS/RHEL, Backtrack, many more.
Posts: 58

Rep: Reputation: Disabled
Attempting to use Nagios to monitor Windows


We have a Nagios setup here and I'm attempting to add in some Windows checks. Most of them have gone OK, using SNMP for basic system stats and NSClient/check_nrpe for service checks and more. Our old monitoring solution that we're attempting to replace used some Powershell scripts to run queries and gather statistics on running applications and more and alert us if there is a problem.

I've been reading various guides out there on how to integrate these with Nagios and I've had no success so far. The most common thing I'm reading is to add a handler line into nsclient.ini and use that with check_nrpe's -c flag. Problem is I get an unknown handler error when attempting that.

Here's a sample of what I've put into nsclient.ini:
check_export = cmd /c echo scripts\<script>.ps1 | powershell.exe -command -

And the check_nrpe command:
./check_nrpe -H <host> -t 60 -n -c check_export

I know this should work since this server is issued commands with check_nt to check other things, and NRPE is enabled and responding. Any ideas?
 
Old 10-04-2013, 09:07 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Perhaps use this script as a basis for your own scripts?
 
Old 10-04-2013, 09:22 PM   #3
David Trest
Member
 
Registered: Jul 2013
Distribution: CentOS/RHEL, Backtrack, many more.
Posts: 58

Original Poster
Rep: Reputation: Disabled
Everything mentioned in that setup is what I've done before.

Note that these scripts work. They are/were used by Zabbix, the implementation we're replacing. The component that is failing is not Powershell, it is NRPE/NSClient++.
 
Old 10-04-2013, 09:47 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by David Trest View Post
Here's a sample of what I've put into nsclient.ini:
check_export = cmd /c echo scripts\<script>.ps1 | powershell.exe -command -

Any ideas?
Yeah, post the actual command instead of a "sample"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to monitor windows system through nagios server bhargav123 Linux - Server 2 08-20-2012 03:07 PM
Laptop monitor shuts off when attempting to switch to external monitor (Debian) sgh Linux - Laptop and Netbook 4 02-20-2012 11:33 PM
[SOLVED] How to monitor number of logged on users (on windows) with nagios? 4Paul4 Linux - Server 3 08-23-2011 12:09 AM
Configuring Nagios to monitor a Windows service JeremyInNC Linux - Server 3 01-13-2009 09:19 AM
Monitor windows mount points with Nagios creatorrr Linux - Software 1 08-15-2008 05:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration