Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-03-2013, 12:42 PM
|
#1
|
Member
Registered: Jul 2013
Distribution: CentOS/RHEL, Backtrack, many more.
Posts: 58
Rep: 
|
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?
|
|
|
10-04-2013, 09:07 PM
|
#2
|
Senior Member
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
|
Perhaps use this script as a basis for your own scripts?
|
|
|
10-04-2013, 09:22 PM
|
#3
|
Member
Registered: Jul 2013
Distribution: CentOS/RHEL, Backtrack, many more.
Posts: 58
Original Poster
Rep: 
|
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++.
|
|
|
10-04-2013, 09:47 PM
|
#4
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep: 
|
Quote:
Originally Posted by David Trest
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"
|
|
|
All times are GMT -5. The time now is 06:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|