WMI's

Andreas Ericsson ae at op5.se
Fri Mar 13 15:40:13 CET 2009


Mark, thanks for keeping the tone very much to the point and
trying hard yourself. Very few people do this, so the "bones" we throw
on this list are generally on the assumption that people haven't.

Mark Weaver wrote:
> 
> Andreas Ericsson wrote:
>> Martyn wrote:
>>   
>>> How do I add the windows credentials.
>>>
>>> check_nt -H 192.168.1.1 -p 1248 -v INSTANCES -l Process
>>>
>>> If I run the above it will give me a refused connection, where in the above
>>> line would I add the username and password of the Windows box I want to
>>> connect to?
>>>
>>>     
>> You're holding a hammer and want someone to explain to you how to use it
>> as a car. It can't be done with check_nt, but there are other programs out
>> there that can ask questions over WMI, and you already know of some of
>> them. Google should hold plenty of other resources if installing nsclient,
>> NCNet or nsclient++ is not an option for you, although some programming
>> may be necessary on your part.
>>

A clarification will be necessary here, I feel. You mentioned a few apps
in your original post which utilizes WMI to access windows boxes, so I
obviously figured you had researched them already.

The hammer != car analogy is two-fold actually. One meaning is that you
were using the wrong tool. The other is that you might be thinking along
wrong lines entirely. I'm willing to bet that 99% of all nagios installations
in the world monitor Windows servers either using SNMP or one of the 3 easily
available clients designed specifically for that purpose (nsclient, nsclient++
and NC_Net). check_nt *can* talk to either of those clients, but they do not
use WMI while doing so.

The exception is NC_Net which can, if I understand how it works correctly (I
may not; I haven't looked at its source/README's at all, since our own way
of doing it is sufficient), query other windows servers using the dotnet
framework. However, the chain then becomes

nagios -> check_nt -> NC_Net on one windows server -> Other windows server

In other words, you need to use NC_Net on one server as a sort of proxy,
and that seems to fall slightly outside what you wanted.

However, the excellent Mono framework runs just fine under Linux, and
since NC_Net is written in C# (I checked since I last posted about it),
a moderately skilled programmer shouldn't have too much difficulty
adapting NC_Net to cut out the proxy server and send queries directly
to the targeted Windows server from which one actually wants information.

Had you responded "Right, I'm not a programmer so if you could hint at
what's required for this?", I'd have known you're not. The post above
was a kind of bait for both you and Tony Montibello (NC_Net author), as
I believe a mono-based plugin to check windows systems would be totally
awesome. I have no need for it though, so I won't be working on it.


>>   
> *warning: post contains rant*
> 
> Andreas, you're making my head hurt! ;) I've been using (learning) 
> Nagios now for about a week now and haven't encountered anything with 
> such a vertical learning curve like this since I started learning Linux 
> in 1996. Climbing this learning curve causes massive frustration, but 
> once success happens there's a huge release of satisfaction and 
> self-accomplishment. I personally am enjoying the trip and experience.
> 
> Yesterday, after feeling comfortable getting Nagios to talk to servers 
> on my local network for checking the obvious services running on them - 
> linux and windows servers - like IIS, Apache, SMTP and the like I 
> started working on getting my workstation to talk to the Nagios server 
> via the NSClient++ package. This is going to be yet another challenge 
> and one I fully accept.
> 
> Let me tell you, for me the harder something is the more tenacious I 
> become and refuse to let go until I master it. That being said the 
> documentation which comes with Nagios seriously sucks until you begin to 
> get on to the Nagios way of doing things. Over the last week I have 
> googled more than I have in the last 5 years getting my test-bed nagios 
> system going. I have literally googled my brains out. At the moment I'm 
> somewhat at a loss to know whether I've worked harder googling for 
> information or actually getting to know the Nagios way and making things 
> work! I'm leaning towards Googling...
> 
> So for you to curtly suggest that all can easily be found googling as an 
> answer to this question is, well... just too easy. Either you don't 
> actually know or you don't feel like telling. I totally understand 
> though because I suspect you yourself have worked very hard getting to 
> know and work with Nagios and have put quite a bit of time into the 
> gaining the experience you now possess, but throwing us noobs a bone 
> isn't really asking too much is it?
> 
> Bone == link to information
> slap in one's face == go google it...
> 

Well, now that it seems you are no longer bothering to use WMI credentials
(which was what the original post was all about), you really should be
able to find all the information you need using google. I have a fairly
good idea what queries I'd use. 'nagios "check windows" download' without
single quotes would be a good start. Adapt it from there and you can't
possibly fail. You'll notice that check_nt *is* the tool to use for that,
but then we are, again, drifting away from the original post regarding
WMI.


> Yeah... we can find the stuff we need by googling for it, but wouldn't 
> it be nice if the documentation were a lot more robust and contained in 
> a wiki somewhere? I have yet to find one for Nagios. In fact most of the 
> sites I've found for Nagios waste my time. Which is pretty much what 
> suggesting someone google for something does. They're hoping for, at the 
> very least a kick in the ass in the right direction but get sent back to 
> the place of frustration - Google! The trick to googling is knowing the 
> right question to ask and after you've been spending hours trying to 
> suss out something that is vexing one's soul that becomes an exercise in 
> futility. (I'm ranting, but I don't mean it in an accusatory tone.)
> 
> As I said, I do understand that you and others have invested a great 
> deal of time and effort into learning Nagios and how to work it, but if 
> you don't want to share whats locked away in your brains then why even 
> respond to the post?
> 

Because very little is locked away in my brain that didn't come from the
internet in one way or another in the first place, and I won't tell you
to whom I lost my virginity anyway ;-)

Personally, I think your confusion and lack of success with Google stems
from a couple of things;
* You started the thread asking about WMI credentials.
* Tomasz Chmielewski replied (not entirely erroneously) that you can make
  checks using whichever credentials you want. He did however fail to
  mention that quite a lot of those checks would require substantial
  programming skills and effort to realize (there are no opensource
  programs designed specifically to set the clocks of GPS-satellites,
  for example, but it *could* be done by a sufficiently skilled and
  dedicated programmer).
* You proceeded to ask questions about a specific plugin (check_nt),
  asking it to do something it can't do (and was never intended to do),
  while at the same time displaying a rather severe lack of research
  into how check_nt works.
* I replied, rather shortly, that check_nt can't do what you want. This
  would have been obvious if you had read its documentation, so I didn't
  bother researching the further pointers I gave you, since I doubted
  you were worth spending any time on anyway. I'm now happily proven
  wrong. In a way, this small essay is a token of that.

> If I've offended I do apologize, but as an experience network admin and 
> a Nagios noob I know the value of my time and yours and others searching 
> for the information that would hopfully unlock the doors currently 
> barring them from reaching the next milestone or goal. I appreciated 
> your metaphore of a hammer and a car; the fact that it can't be done 
> with check_nt was informative, but then you lost me when you said just 
> google it.
> 

You have not offended (well, you did a little, but the fences are mended
so no harm done ;-)).

> Google What for pete's sake? (after a long day of wrestling with the 
> beast that could mean google for anything ranging from the best recipe 
> for blueberry pancakes to the ingredient to a fusion device!)
> 

That depends on the question, which I'm still not sure you understand.

Q1: What's the most common and tested way of monitoring windows servers?
A1: We (op5 AB) use NSClient++ on all of our 300+ customers' windows
    servers. It works great. Another server-side agent to do the same
    is NC_Net, which does things a bit differently. Both work just fine,
    so just grab whichever you like best and go with that.

Q2: How do I check my windows-servers without installing a server-side
    agent? The program doing the checking must authenticate using WMI
    credentials.
A2: I don't think anything like that exists now. If it does, google
    can almost certainly provide a link for it. If you're a moderately
    skilled programmer, you should be able to modify NC_Net to run
    through Mono on your Nagios server and thus achieve your agent-less
    windows monitoring.


The confusion arises because you seem to wobble between these two questions,
and in the post I replied to, you sort of asked both at once but mingled
them so that no answer in the world would have made sense.

If your *actual* question isn't one of the two above, you should probably
spend a couple of minutes trying to figure out exactly what your end-goal
is ("I want to monitor disk and cpu-usage on my windows-servers") and
*then* figure out restrictions or problems around that end-goal ("I'm not
allowed to install any agent on the servers, or enable SNMP"). When you've
figured it out, come back here and put together a coherent request of
pointers to achieve your end-goal. Trying one solution and asking about
specific problems you run into along the way when it later shows that your
entire solution is totally wrong from the start is a sure-fire way of
getting you possibly humorous but utterly unhelpful responses.

> Frankly, if I knew more about Nagios and the intimacies thereof, I would 
> gladly host a wiki for it on one my web servers, but alas I'm a noob. my 
> one burning question: Why the hell isn't there a wiki for Nagios, and if 
> there is where the bloody hell is it?
> 

That's a new question. I don't know the answer to it, but a qualified guess
would be "there is, you just haven't found it" or "because noone has bothered
to set one up".

> Thank you for you kind attention and for putting up with this petulant 
> Nagios Newbie.
> 

Thanks for not turning into a petulant whiny wanker in the face of apparent
rudeness. Far too many people do that. Needless to say, they accomplish
very little, whereas you who approached it from a far more mature response
has already attracted the attention of, if I may be so bold, two of this
lists most knowledgeable persons; Marc and my not-so-humble self ;-)

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list