nsclient++ check_always_ok syntax
nsclient++ check_always_ok syntax
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?
[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?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: nsclient++ check_always_ok syntax
Can you post the nsclient++ command definition for check_always_ok
Thanks
Thanks
Re: nsclient++ check_always_ok syntax
for -a:
so just send into -a "$ARG1$ $ARG2$ $ARG3$ $ARG4$"
So yours would look like:
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.
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 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"
/Luke
Re: nsclient++ check_always_ok syntax
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
http://www.nsclient.org/trac/tmp/refere ... ys_ok.html
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: nsclient++ check_always_ok syntax
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.
Re: nsclient++ check_always_ok syntax
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.
http://nsclient.org/nscp/wiki/CheckHelp ... _always_ok
An alias for that command is CheckAlwaysOK you could try running it using that.
/Luke
Re: nsclient++ check_always_ok syntax
I may just write a shell wrapper to do the same thing.
Re: nsclient++ check_always_ok syntax
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?
Re: nsclient++ check_always_ok syntax
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)
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.
"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.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: nsclient++ check_always_ok syntax
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.