Executing check_disk.wsf

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
v3ct0r
Posts: 5
Joined: Wed Oct 30, 2013 1:46 am

Executing check_disk.wsf

Post by v3ct0r »

Hey all,

So I'm fairly a noob here. I pretty much got (I think) the gist, am able to install a Nagios setup and get it to monitor the basics on Linux/Windows servers.

Now, I am trying to monitor all disks on Windows hosts using the check_disk.wsf I found on Nagios Exchange. Granted, the script itself works dandily when I run it manually on a host, however, I am totally clueless as to how to remotely execute it on hosts. I've been trying to read around on it, on forums and documentation, however, it seems that everything I have found requires deeper understanding of Nagios than I've got.

Anyone can throw me a lead here?

Cheers,
J.
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Executing check_disk.wsf

Post by jsmurphy »

When it comes to windows monitoring nsclient++ is your best friend: http://nsclient.org/nscp/

It has native support for monitoring disk usage, CPU usage, services, etc. But you can also use it to define scripts to run for third party plugins such as the one you linked. The documentation for NSClient is a bit tricky to navigate and not always as informative as it could be... but it's usually just informative enough to enable you to muddle your way through.

Hopefully that helps.
User avatar
mickem
Posts: 16
Joined: Tue Oct 08, 2013 2:17 am
Location: Stockholm, SWEDEN
Contact:

Re: Executing check_disk.wsf

Post by mickem »

Given that I actually take the documentation thing seriously (for a change) could someone please help me by telling me whats bad with the new documentation site: http://docs.nsclient.org/

// Michael Medin
// Michael Medin @mickem, blog.medin.name

Author of NSClient++ - http://nsclient.org
NSClient++ 0.4.2 Documentation: http://docs.nsclient.org
v3ct0r
Posts: 5
Joined: Wed Oct 30, 2013 1:46 am

Re: Executing check_disk.wsf

Post by v3ct0r »

Hey,

I've looked at the docs for NSClient++ before posting here. I've found pages saying that scripts should be referenced in the INI file. Then, it goes on to talk about wrappers, saying how to define, for example, a VBS wrapper (and I don't even know what does the wrapper do, only guess). However, when I attempt to define the command, which calls for cscript.exe to execute the said WSF file, I get errors, such as no handler, or such.

I'm quite willing to believe that for people proficient in Linux, and/or people who've been on Nagios scene for a few years, the docs are beyond informative, however, for someone who's only came to Linux with knowledge of what ls does, this is not exactly helpful. At this point, I've spent over 10 hours trying to figure on my own how to do this.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Executing check_disk.wsf

Post by sreinhardt »

well as you stated, nsclient is windows not linux, but the point still stands that many of the quickly changing features are not completely documented. Additionally because things do seem to change both function and flags relatively quickly, I'm sure it makes it a bit tough on michael.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
v3ct0r
Posts: 5
Joined: Wed Oct 30, 2013 1:46 am

Re: Executing check_disk.wsf

Post by v3ct0r »

Well, after a total of around 10 hours, I finally figured how to do this, and the specific script runs fine. I've got another script, to which NSClient doesn't like passing arguments, but I suppose I will figure it on my own.

G'day all.
Locked