Age | Commit message (Collapse) | Author | Files | Lines |
|
This fixes an issue that appears when running check_procs over NRPE,
where the default shell is configured to (for example) dash, as is the
case on Debian.
dash (and tcsh, and mksh, and probably others), when invoked with -c forks an additional process
to execute the argument string. Contrast this with bash, which does not
do this, provided that the argument string simply can be exec()'d as-is.
To demonstrate:
$ bash -c pstree
init─┬ ..
...
├─sshd─-─sshd───pstree
versus
$ dash -c pstree
init─┬ ..
...
├─sshd─-─sshd───dash───pstree
The consequence of this fork is that the following invocation:
/opt/plugins/check_procs -a init
will result in this output:
PROCS OK: 2 processes with args 'init' | processes=2;;;0;
because the check_procs, in addition to finding the actual init process,
finds its parent shell as well.
This example is a bit contrived, but I think it illustrates the
point.
This wouldn't really be a problem, and normally isn't, if it weren't
for the fact that NRPE uses a call to popen() which does exactly the
above (executes '/bin/sh -c ...'), causing inconsistent behaviour
between distributions and much confusion for end users.
The argument may be made that the dash process spawned by NRPE is just a
process like any other, and should therefore be included in the process
count just like any other. However, this is not very intuitive, because
of the previously mentioned inconsistencies.
The argument might also well be made that we're _never_ interested in the
immediate ancestor of the plugin, and while it is unknown how many
installations have already made the necessary modifications to their
setups to make up for the fact that the plugin behaves the way it does,
it is not deemed worthwhile to entertain such workarounds.
Thus, this patch ignores the parent process.
See also these bug reports:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626913
http://sourceforge.net/p/nagiosplug/bugs/512/
https://github.com/nagios-plugins/nagios-plugins/issues/999
https://bugs.op5.com/view.php?id=4398
|
|
Testing "nagiosplugins.org" will currently not work.
|
|
average value
|
|
|
|
some systems do not expand the path automatically.
|
|
solaris netcat does not listen in udp mode due to
http://sourceforge.net/p/netcat/bugs/27/
|
|
at least on freebsd, there are a processes with state 'S', they always
use two character status.
|
|
|
|
freebsds ping takes a few seconds till it returns, so a 1 second timeout does
not work for the test.
|
|
nc.traditional is available on (at least) ubuntu systems and uses traditional nc syntax
|
|
|
|
older netcats do not understand -p, they expect host and port as additional argument.
This is backwards compatibel to newer clients. Also support netcat instead of nc.
|
|
|
|
A check with thresholds 9000,1 must exit with warning if the certificate expires in less
than 9000 but more than one day.
|
|
|
|
The check_procs plugin now emits performance data, fix the test(s)
accordingly.
|
|
The check_apt plugin now emits performance data, fix the test(s)
accordingly.
|
|
- cleanup whitespace
- added test cases
- print time_ssl only if ssl is in use
- updated news and thanks file
|
|
multiple headers have to be set by multiple -k switches. Seperating them
by semicolons is not longer supported as semicolons are valid characters in
http headers.
|
|
"./check_tcp -6 -p 80 host" leads to an error:
TCP CRITICAL - Invalid hostname, address or socket: 127.0.0.1
because 127.0.0.1 is the fallback host, the tailing hostname
was ignored.
|
|
Fixes for check_apt handling of -i/-e/-c regexps and SECURITY_RE, plus tests
|
|
nagios.com seems to have changed their ip address. Also added tests
about -4/-6 option.
|
|
Add a hidden "--input-file" option to check_apt (modelled on
check_procs) so that it can take files with sample apt output as input.
Add tests for my SECURITY_RE fix (debian3) and for the include, exclude
and critical options.
|
|
|
|
fixed typo in sslutils
|
|
In the C shell and in the Z shell, the "?" character must be quoted or
backslash-escaped in order to use it verbatim. Therefore, a command
such as
check_by_ssh -H test.example.com -l joe echo huh?
might fail, depending on joe's login shell on test.example.com.
Just to make sure, this commit removes most punctuation characters from
our test strings.
|
|
Older versions of SQLite3 don't seem to support that.
|
|
All tests use sqlite3. A temporary database is created for the purpose of the
tests.
|
|
|
|
This patch adds a check for the certificate cn (hostname) to normal
certificate checks. It returns CRITICAL if th cn is missing, otherwise it
prints it in the normal output.
Patch by Stéphane Urbanovski
|
|
1. Timetick test could fail with uptime > 115 days. Thresholds are
double type, so it's safe to put a large number even for 32bit systems.
2. Add a test based on an invalid bug report, worthy anyway.
|
|
Original patch to make Timeticks works as in check_snmp v1.4.14, it turns
out is_numeric isn't so useful and treating all types as numeric works
best for backwards-compatibility. This is how it used to work in 1.4.14.
As a special case, I also make calculate_rate look up for numeric values
as it would otherwise return the last value instead.
|
|
Add support for checking the number of usable time sources (i.e., the
number of peers which are classified as so-called "truechimers" by NTP's
intersection algorithm). The new "-m" and "-n" options allow for
specifying the according WARNING and CRITICAL thresholds (and thereby
activating the truechimers check), respectively.
|
|
|
|
|
|
|
|
|
|
no snmp community is specified
The checks for invalid/unavailable hosts need a complete command line.
They failed on hosts where no community was specified. Now, an invalid community is used so
the tests can run on hosts w/o snmp host/community in NPTest.cache. Execution will fail anyway.
|
|
This patch makes use of standard threshold functions. This allows using
doubles as thresholds.
Since SNMP supports only integers, double precision numbers are only
printed when parsed from a STRING type.
In addition, support for printing properly Timeticks type has been added,
and the code has been thoroughly cleaned.
|
|
|
|
|
|
|
|
|
|
- Fix broken compilation caused by typo in command ending
- Remove extra whitespaces at EOL
- Fix invalid host test on Ubuntu Hardy (and possibly others)
|
|
by John Barbuto)
|
|
|
|
For contrib/, full tags have been imported from subversion
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2067 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2032 f882894a-f735-0410-b71e-b25c423dba1c
|
|
added perfdata checking for string values
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2022 f882894a-f735-0410-b71e-b25c423dba1c
|