nsclient++ check_always_ok syntax

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.
td3201
Posts: 15
Joined: Sun Jan 25, 2015 6:16 pm

nsclient++ check_always_ok syntax

Post by td3201 »

I'm trying to ensure that a plugin check always returns OK. Here's what I'm trying to do:
[root@omaprodut01 objects]# /usr/lib/nagios/plugins/check_nrpe -H 10.20.37.7 -c check_always_ok -a "check_memory" "type=physical" "warn=free<2M" "crit=free<1M"
Invalid command line: unrecognised option 'check_memory'
help Show help screen (this screen)
help-pb Show help screen as a protocol buffer payload
help-short Show help screen (short format).


Clearly what I'm doing here isn't correct. What's the right way to do what I'm trying to do here?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nsclient++ check_always_ok syntax

Post by scottwilkerson »

Can you post the nsclient++ command definition for check_always_ok

Thanks
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: nsclient++ check_always_ok syntax

Post by lgroschen »

for -a:

Code: Select all

 [arglist]  = Optional arguments that should be passed to the command.  Multiple
              arguments should be separated by a space.  If provided, this must be
              the last option supplied on the command line.
so just send into -a "$ARG1$ $ARG2$ $ARG3$ $ARG4$"

So yours would look like:

Code: Select all

 /usr/lib/nagios/plugins/check_nrpe -H 10.20.37.7 -c check_always_ok -a "check_memory type=physical warn=free<2M crit=free<1M"
What matters here is how you have the arguments defined in check_always_true because you might need type to be type=physical OR just physical if in the command definition it is being passed as type=$ARG2$. Do this for each argument, then post the check_always_ok definition and the command that your run here.
/Luke
td3201
Posts: 15
Joined: Sun Jan 25, 2015 6:16 pm

Re: nsclient++ check_always_ok syntax

Post by td3201 »

I appreciate your help. I'm not following what you're suggesting. check_always_ok is a builtin command within nsclient++ so it's not defined within the nsclient.ini explicity. The documentation for nsclient++ is miserable at best. Or I can't read it.

http://www.nsclient.org/trac/tmp/refere ... ys_ok.html
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nsclient++ check_always_ok syntax

Post by slansing »

Unfortunately, as NSClient++ is not maintained by us, nor does that help page show anything that is helpful when it comes to syntax, I have no idea. I'd recommend contacting their team on their support forum to get some information, I'll also try poking around to see what I can get it to do.
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: nsclient++ check_always_ok syntax

Post by lgroschen »

Does this make more sense:
http://nsclient.org/nscp/wiki/CheckHelp ... _always_ok

An alias for that command is CheckAlwaysOK you could try running it using that.
/Luke
td3201
Posts: 15
Joined: Sun Jan 25, 2015 6:16 pm

Re: nsclient++ check_always_ok syntax

Post by td3201 »

I may just write a shell wrapper to do the same thing.
td3201
Posts: 15
Joined: Sun Jan 25, 2015 6:16 pm

Re: nsclient++ check_always_ok syntax

Post by td3201 »

I should probably ask. I've been out of the Nagios loop for a couple of years. Is nsclient++ still one of the better agents for windows? Any others out there or agentless methods that I should be aware of?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nsclient++ check_always_ok syntax

Post by abrist »

There are a few big ones:
nsclient (I still prefer 0.3.9.x instead of 0.4.x.x)
ncpa (new, written by the wizard nscott in python and becoming more stable by the day)
wmi ("agentless" but requires configuring wmi on the windows server)
snmp (now deprecated by microsoft)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: nsclient++ check_always_ok syntax

Post by Box293 »

What version of NSClient++ are you using?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked