Imported Upstream version 2.1
This commit is contained in:
parent
0841b5c7c7
commit
060ec72678
537
ChangeLog
537
ChangeLog
|
@ -1,3 +1,464 @@
|
||||||
|
2014-10-15 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
|
* NEWS, NP-VERSION-GEN, configure.ac: Prepare for the 2.1 release
|
||||||
|
|
||||||
|
* THANKS.in: Add new authors
|
||||||
|
|
||||||
|
Update the THANKS.in file with the new Git commit authors.
|
||||||
|
|
||||||
|
* FAQ: Remove outdated (RPM/DEB-related) questions
|
||||||
|
|
||||||
|
* NEWS: Mention that we dropped the spec file
|
||||||
|
|
||||||
|
2014-10-15 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* Makefile.am, configure.ac, monitoring-plugins.spec.in: Removing the
|
||||||
|
spec file, as it's broken
|
||||||
|
Even we have none feedback in PR #1283
|
||||||
|
|
||||||
|
2014-10-08 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
|
* plugins-scripts/check_ifstatus.pl: check_ifstatus: Fix "-n" and "-u"
|
||||||
|
options
|
||||||
|
|
||||||
|
Ignore interface if it's specified via "-n" OR "-u", not just when it's
|
||||||
|
specified via "-n" AND "-u".
|
||||||
|
|
||||||
|
2014-10-06 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
|
* lib/utils_base.c: Revert "Make use of xasprintf instead of asprintf"
|
||||||
|
|
||||||
|
This reverts commit a143739ed286cf9ae003792dbb1ce26ce43f3312.
|
||||||
|
|
||||||
|
Our current setup doesn't allow lib/*.c files to call functions defined
|
||||||
|
in plugins/utils.[ch].
|
||||||
|
|
||||||
|
2014-09-23 Jonas Genannt <jonas@brachium-system.net>
|
||||||
|
|
||||||
|
* NEWS, plugins-scripts/check_file_age.pl,
|
||||||
|
plugins-scripts/t/check_file_age.t: check_file_age: Provide performance
|
||||||
|
data
|
||||||
|
|
||||||
|
2014-10-06 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* NEWS: Adding missing informations to NEWS
|
||||||
|
|
||||||
|
2014-09-29 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* THANKS.in: Adding Simon to Thanks file
|
||||||
|
|
||||||
|
2014-09-01 Simon Meggle <simon.meggle@consol.de>
|
||||||
|
|
||||||
|
* plugins-scripts/check_mailq.pl: check_mailq: fixed mailer names
|
||||||
|
|
||||||
|
(Closes #1289)
|
||||||
|
|
||||||
|
2014-09-16 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
|
* NEWS, plugins/check_tcp.c: Fix check_jabber to work with Openfire
|
||||||
|
servers
|
||||||
|
|
||||||
|
The plugin expected:
|
||||||
|
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
|
||||||
|
But Openfire sends:
|
||||||
|
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
|
||||||
|
2014-09-10 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
|
* NEWS: Mention new check_ifstatus option
|
||||||
|
|
||||||
|
2013-05-13 Nick Peelman <nick@peelman.us>
|
||||||
|
|
||||||
|
* plugins-scripts/check_ifstatus.pl: Add check_ifstatus option to ignore
|
||||||
|
interfaces by name
|
||||||
|
|
||||||
|
Ignoring by index is not always an option, as the index can change on
|
||||||
|
chassis switches as blade configurations change.
|
||||||
|
|
||||||
|
2014-07-30 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* .travis.yml: travis-ci: create MySQL database 'test'
|
||||||
|
|
||||||
|
2014-07-21 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* .travis.yml: travis-ci: Installing libhttp-daemon-ssl-perl to make
|
||||||
|
plugins/tests/check_http.t possible to run
|
||||||
|
|
||||||
|
* .travis.yml: travis-ci: Using libfreeradius-client-dev as build-dep
|
||||||
|
|
||||||
|
2014-08-20 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* plugins-scripts/check_log.sh, plugins-scripts/check_oracle.sh,
|
||||||
|
plugins-scripts/check_sensors.sh: Setting PATH at first
|
||||||
|
|
||||||
|
* plugins-scripts/check_log.sh: check_log.sh: droping path from basename
|
||||||
|
while evaluating PROGNAME (Closes Debian Bug #758662)
|
||||||
|
|
||||||
|
2014-08-06 Sven Nierlein <sven@nierlein.de>
|
||||||
|
|
||||||
|
* plugins/check_by_ssh.c: check_by_ssh: added --hostname support
|
||||||
|
|
||||||
|
just like the guidelines and the help already suggests.
|
||||||
|
|
||||||
|
2014-07-31 Sven Nierlein <Sven.Nierlein@consol.de>
|
||||||
|
|
||||||
|
* plugins/tests/check_snmp.t: tests: skip extented snmp tests if snmpd
|
||||||
|
has no perl support
|
||||||
|
|
||||||
|
solaris snmpd has no perl support by default, so this test will fail.
|
||||||
|
|
||||||
|
* plugins/t/negate.t: tests: negate test fails when not run from plugins
|
||||||
|
folder
|
||||||
|
|
||||||
|
* plugins/t/negate.t: tests: get current directory the perl way
|
||||||
|
|
||||||
|
instead of hoping to have it in the environment. This at
|
||||||
|
least broke tests on solaris.
|
||||||
|
|
||||||
|
* plugins/check_dns.c: check_dns: unified check output
|
||||||
|
|
||||||
|
this also allows us to make tests against "critical" in the output.
|
||||||
|
|
||||||
|
* plugins-scripts/t/check_disk_smb.t: tests: check_disk_smb may exit
|
||||||
|
with critical for unresponsive hosts too
|
||||||
|
|
||||||
|
Unknown (ex. debian 7)
|
||||||
|
%> ./check_disk_smb -H 1.1.1.1 -s np_foobar -vvv
|
||||||
|
/usr/bin/smbclient //1.1.1.1/np_foobar -U guest% -c du
|
||||||
|
No Answer from Client
|
||||||
|
|
||||||
|
Critical (ex. debian 8)
|
||||||
|
%> ./check_disk_smb -H 1.1.1.1 -s np_foobar -vvv
|
||||||
|
/usr/bin/smbclient //1.1.1.1/np_foobar -U guest% -c du
|
||||||
|
Connection to 1.1.1.1 failed
|
||||||
|
CRITICAL
|
||||||
|
|
||||||
|
2014-07-31 Sven Nierlein <sven@nierlein.de>
|
||||||
|
|
||||||
|
* plugins/check_ntp_peer.c: check_ntp_peer: do not use uninitialized
|
||||||
|
results for max state
|
||||||
|
|
||||||
|
s/t/jresult are not initialized if there is no corresponding threshold
|
||||||
|
supplied. So we shouldn't use them for calculating our result.
|
||||||
|
|
||||||
|
2014-07-31 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
|
* NEWS: Mention --with-qmail-qstat-command option
|
||||||
|
|
||||||
|
2013-10-21 awiddersheim <awiddersheim@hotmail.com>
|
||||||
|
|
||||||
|
* configure.ac: Fix PATH_TO_QMAIL_QSTAT in configure
|
||||||
|
|
||||||
|
When configuring PATH_TO_QMAIL_QSTAT the PATH_TO_MAILQ would get applied
|
||||||
|
instead after tests had passed. Also made --with-qmail-qstat-command a
|
||||||
|
configuration option.
|
||||||
|
|
||||||
|
2013-09-30 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* THANKS.in: adding to THANKS
|
||||||
|
|
||||||
|
2014-07-30 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* plugins/check_dns.c: check_dns: Use strchr instead of index
|
||||||
|
|
||||||
|
* THANKS.in: Adding Alexander Wittig to THANKS.in
|
||||||
|
---
|
||||||
|
Closes #1218
|
||||||
|
Closes #1281
|
||||||
|
|
||||||
|
2013-12-16 Alexander Wittig <abgandar@gmail.com>
|
||||||
|
|
||||||
|
* plugins/check_dig.c: check_dig: takes into account the -4 and -6
|
||||||
|
switch
|
||||||
|
|
||||||
|
Fix automatic DNS server name detection to honor -4 and -6 switches
|
||||||
|
(default to 127.0.0.1 or ::1 respectively, i.e. if -6 is given ::1
|
||||||
|
is used instead of 127.0.0.1)
|
||||||
|
|
||||||
|
* plugins/check_dig.c: check_dig: Fix to work with dig and drill tool
|
||||||
|
|
||||||
|
FreeBSD starting with version 10 is shipped with ldns instead of bind as
|
||||||
|
resolver. Consequently the dig tool in base is replaced by drill. While dig can
|
||||||
|
still be installed as a third party application, it would be nice to make do
|
||||||
|
with the tools available in the system already.
|
||||||
|
This patch rearranges the command line used to invoke dig slightly so that it
|
||||||
|
can be used with both dig and drill (tested with dig 9.8.3-P1 and 9.9.4 as well
|
||||||
|
as drill 1.6.16). It would be really neat if the configure script could be
|
||||||
|
changed to automatically pick up drill when dig is not available (or the other
|
||||||
|
way around), but my autotools-foo is not good enough for that.
|
||||||
|
This part of the patch is an extended version of the locally maintained patch
|
||||||
|
currently deployed in the FreeBSD ports tree by Dmitry Sivachenko.
|
||||||
|
|
||||||
|
2014-07-30 Sven Nierlein <Sven.Nierlein@consol.de>
|
||||||
|
|
||||||
|
* tools/generate-change-log: workaround for broken Text::Wrap
|
||||||
|
|
||||||
|
workaround for broken Text::Wrap:
|
||||||
|
"This shouldn't happen at /usr/share/perl/5.18/Text/Wrap.pm line 84."
|
||||||
|
changing huge to overflow make generating changelogs work again at
|
||||||
|
the price of not having changelog strictly cut of at 80 columns
|
||||||
|
anymore. Words longer than 80 characters will now printed in one
|
||||||
|
line. This mainly affects old sf.net urls.
|
||||||
|
|
||||||
|
* tools/generate-change-log: no need for the signed off messages in our
|
||||||
|
changelog
|
||||||
|
|
||||||
|
2014-07-30 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* lib/utils_base.c: Make use of xasprintf instead of asprintf
|
||||||
|
---
|
||||||
|
Closes #1278
|
||||||
|
|
||||||
|
2014-01-22 Ricardo Maraschini <ricardo.maraschini@gmail.com>
|
||||||
|
|
||||||
|
* lib/utils_base.c: if asprintf fails, string is undefined
|
||||||
|
|
||||||
|
if asprintf fails, string content becomes invalid. we need
|
||||||
|
to check if it ran OK by checking the returned value.
|
||||||
|
|
||||||
|
in case of fail, asprintf returns -1, otherwise the number
|
||||||
|
of writen bytes is returned.
|
||||||
|
|
||||||
|
also, on ubuntu 13.10 i've receiving a lot of warnings:
|
||||||
|
|
||||||
|
"warning: ignoring return value of ‘asprintf’"
|
||||||
|
|
||||||
|
this patches fixes some of them
|
||||||
|
|
||||||
|
2013-09-29 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* plugins/check_dns.c: check_dns: returns incorrect state when
|
||||||
|
specifying server
|
||||||
|
|
||||||
|
This patch verifies if the response is returned by the dns server we
|
||||||
|
are trying to check
|
||||||
|
---
|
||||||
|
Closes #981
|
||||||
|
Closes #982
|
||||||
|
Closes #1164
|
||||||
|
|
||||||
|
2014-07-30 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* .travis.yml: travis-ci: create MySQL database 'test'
|
||||||
|
|
||||||
|
2014-07-30 Sven Nierlein <sven@nierlein.de>
|
||||||
|
|
||||||
|
* plugins/t/check_dns.t: check_dns: added test for nonresponsive dns
|
||||||
|
server (#982)
|
||||||
|
|
||||||
|
2014-07-29 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* THANKS.in: Adding Jason Benguerel
|
||||||
|
|
||||||
|
2013-10-01 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* plugins/check_disk.c: check_disk: show troubled partition in verbose
|
||||||
|
mode
|
||||||
|
|
||||||
|
I'm submitting a small patch to check_disk that will show which partitions are
|
||||||
|
actually causing the error state. This helps the human operator to quickly
|
||||||
|
identify the exact issue. I made it so a single -v flag is required so it
|
||||||
|
doesn't harm legacy code that may be parsing the original style of output.
|
||||||
|
|
||||||
|
Thanks to Jason Benguerel.
|
||||||
|
---
|
||||||
|
Closes #984
|
||||||
|
Closes #1182
|
||||||
|
|
||||||
|
2014-02-05 abrist <abrist@nagios.com>
|
||||||
|
|
||||||
|
* plugins/check_ntp_time.c: check_ntp_time.c - Cleaned up usage and
|
||||||
|
added a note
|
||||||
|
|
||||||
|
Closes #907
|
||||||
|
Closes #1184
|
||||||
|
|
||||||
|
2014-07-21 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* THANKS.in: Adding Patrick McAndrew to THANKS.in
|
||||||
|
|
||||||
|
2013-10-01 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* plugins/check_ntp_time.c: check_ntp_time: adding offset option
|
||||||
|
|
||||||
|
Not sure if this is of use or not - we have a strange requirement to run
|
||||||
|
certain servers 5 minutes fast. I've added a switch to the check_ntp_time
|
||||||
|
to allow for this offset.
|
||||||
|
|
||||||
|
Thanks to Patrick McAndrew.
|
||||||
|
|
||||||
|
2014-05-19 abrist <abrist@nagios.com>
|
||||||
|
|
||||||
|
* plugins/netutils.c: netutils.c - A few more changes
|
||||||
|
|
||||||
|
Changed bool to short.
|
||||||
|
|
||||||
|
Removed first instance of is_socket to avoid
|
||||||
|
redeclaration error.
|
||||||
|
|
||||||
|
Changed 'socket' to 'file socket' for verbosity.
|
||||||
|
|
||||||
|
2014-05-07 Davide Madrisan <davide.madrisan@gmail.com>
|
||||||
|
|
||||||
|
* plugins/netutils.c: This patch will add the IP and port, or socket
|
||||||
|
name, to the error message and
|
||||||
|
thus simplify the problem debugging: no need to check for this information in
|
||||||
|
the Nagios configuration.
|
||||||
|
This function is only used by 'check_tcp.c'.
|
||||||
|
|
||||||
|
Without the patch:
|
||||||
|
|
||||||
|
$ ./plugins/check_tcp -H 127.0.0.1 -p 21
|
||||||
|
Connection refused
|
||||||
|
$ ./plugins/check_tcp -H /var/spool/nagios/cmd/nagios.cmd
|
||||||
|
Permission denied
|
||||||
|
|
||||||
|
With the patch:
|
||||||
|
|
||||||
|
$ ./plugins/check_tcp -H 127.0.0.1 -p 21
|
||||||
|
connect to address 127.0.0.1 and port 21: Connection refused
|
||||||
|
$ ./plugins/check_tcp -H /var/spool/nagios/cmd/nagios.cmd
|
||||||
|
connect to socket /var/spool/nagios/cmd/nagios.cmd: Permission denied
|
||||||
|
|
||||||
|
Thanks to Davide Madrisan.
|
||||||
|
---
|
||||||
|
Closes #1277
|
||||||
|
|
||||||
|
2013-10-01 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* THANKS.in, plugins/check_mysql.c: check_mysql: ignore authentication
|
||||||
|
failure
|
||||||
|
|
||||||
|
This patch allows checking if MySQL server is running without providing valid
|
||||||
|
username and password. Similar to check_ssh plugin it returns MySQL server
|
||||||
|
version string and protocol number.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
check_mysql -n -H aaa.bbb.ccc.ddd
|
||||||
|
MySQL OK - Version: 5.0.51a-24+lenny5 (protocol 10)
|
||||||
|
|
||||||
|
This is useful for monitoring servers where one does not have administrator
|
||||||
|
privileges or does not want to grant any privileges for the monitoring station.
|
||||||
|
|
||||||
|
To enable this functionality new option --ignore-auth (-n) is added to
|
||||||
|
check_mysql plugin.
|
||||||
|
|
||||||
|
Thanks to Julius Kriukas
|
||||||
|
|
||||||
|
Closes #1020
|
||||||
|
Closes #1178
|
||||||
|
|
||||||
|
2014-07-21 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* .travis.yml: travis-ci: Installing libhttp-daemon-ssl-perl to make
|
||||||
|
plugins/tests/check_http.t possible to run
|
||||||
|
|
||||||
|
2014-07-21 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
|
* test.pl.in: Use "C" locale when running test suite
|
||||||
|
|
||||||
|
Some of our tests check locale-dependent plugin output, so let's make
|
||||||
|
sure "make test" is always using the "C" locale.
|
||||||
|
|
||||||
|
* plugins/tests/check_http.t: Adjust date strings
|
||||||
|
|
||||||
|
Adjust the expected date strings to the now-localized output produced by
|
||||||
|
plugins/sslutils.c.
|
||||||
|
|
||||||
|
Closes #1275.
|
||||||
|
|
||||||
|
2014-07-21 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* .travis.yml: travis-ci: Using libfreeradius-client-dev as build-dep
|
||||||
|
|
||||||
|
2014-07-21 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
|
* plugins/t/check_dns.t: Fix Perl warning
|
||||||
|
|
||||||
|
Perl said: "Unrecognized escape \d passed through at ./t/check_dns.t
|
||||||
|
line 57."
|
||||||
|
|
||||||
|
2013-10-01 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* THANKS.in, plugins/sslutils.c: sslutils: expire time in local timezone
|
||||||
|
format
|
||||||
|
|
||||||
|
sshutils prints the expiry time of certificates in US format
|
||||||
|
this patch uses the strftime %c, I don't know how portable that is
|
||||||
|
|
||||||
|
Thanks to Neil Prockter.
|
||||||
|
|
||||||
|
Closes #1188
|
||||||
|
Closes #1161
|
||||||
|
Closes #977
|
||||||
|
Closes #976
|
||||||
|
Closes #975
|
||||||
|
Closes #840
|
||||||
|
Closes #382
|
||||||
|
|
||||||
|
2013-09-30 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* THANKS.in, plugins-scripts/check_ifstatus.pl: check_ifstatus: perfdata
|
||||||
|
bug
|
||||||
|
|
||||||
|
The perfdata output violates the current Nagios Plugin Development Guidelines
|
||||||
|
(http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN202 :
|
||||||
|
"space separated list of label/value pairs").
|
||||||
|
|
||||||
|
Thus the Addon PNP did not read the perdata correctly.
|
||||||
|
|
||||||
|
The patch replaces the commas with spaces in the perfdata output.
|
||||||
|
|
||||||
|
Many thanks to Patric Wust.
|
||||||
|
---
|
||||||
|
Closes #1169 and #721.
|
||||||
|
|
||||||
|
2014-07-20 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* plugins/t/NPTest.cache.travis: travis-ci: Adding ports for check_hpjd
|
||||||
|
|
||||||
|
2014-01-27 abrist <abrist@nagios.com>
|
||||||
|
|
||||||
|
* plugins/t/check_hpjd.t: added tests for check_hpjd port options
|
||||||
|
---
|
||||||
|
Closes #1160 and #973
|
||||||
|
|
||||||
|
2014-01-24 abrist <abrist@nagios.com>
|
||||||
|
|
||||||
|
* NEWS, plugins/check_hpjd.c: Added check_hpjd port option to news and
|
||||||
|
clarified the port usage error.
|
||||||
|
|
||||||
|
* plugins/check_hpjd.c: check_hpjd - Added a switch for port
|
||||||
|
specification. Defaults to 161.
|
||||||
|
|
||||||
|
2014-03-03 abrist <abrist@nagios.com>
|
||||||
|
|
||||||
|
* plugins/t/check_ntp.t: check_ntp.t - fixed tests for new status output
|
||||||
|
closes #1236 and #1239
|
||||||
|
|
||||||
|
2014-02-14 abrist <abrist@nagios.com>
|
||||||
|
|
||||||
|
* plugins/check_ntp_peer.c: check_ntp_peer - Added specific state output
|
||||||
|
for each metric. It now should be easy to see which check caused the
|
||||||
|
alert.
|
||||||
|
|
||||||
|
2013-10-01 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
|
* THANKS.in, plugins-scripts/check_oracle.sh: check_oracle: --tns bad
|
||||||
|
string matching
|
||||||
|
|
||||||
|
check_oracle in the 1.4.15 release doesn't correctly parse the output gotten
|
||||||
|
from at least Oracle 11 (with german locales). I guess it's probably more.
|
||||||
|
Also it completely needlessly uses sed where basic bash string parsing actually
|
||||||
|
does more than suffice (and does not run into possible problems with locales
|
||||||
|
like sed ;)).
|
||||||
|
--
|
||||||
|
Just turning attached patch of github issue #1015 into a push request.
|
||||||
|
(Closes #1015 and #1191)
|
||||||
|
|
||||||
2014-07-11 Holger Weiss <holger@zedat.fu-berlin.de>
|
2014-07-11 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
* NEWS: Fix typo
|
* NEWS: Fix typo
|
||||||
|
@ -29,8 +490,6 @@
|
||||||
In our build environment, the build failed 3 of 4 times before
|
In our build environment, the build failed 3 of 4 times before
|
||||||
this patch. After the patch it failed 0 of 7 times.
|
this patch. After the patch it failed 0 of 7 times.
|
||||||
|
|
||||||
Signed-off-by: Mikael Falkvidd <mfalkvidd@op5.com>
|
|
||||||
|
|
||||||
2014-07-07 Holger Weiss <holger@zedat.fu-berlin.de>
|
2014-07-07 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
* NEWS: Add a warning regarding check_snmp
|
* NEWS: Add a warning regarding check_snmp
|
||||||
|
@ -93,8 +552,6 @@
|
||||||
|
|
||||||
* plugins/t/check_dns.t: tests: added check_dns performance data test
|
* plugins/t/check_dns.t: tests: added check_dns performance data test
|
||||||
|
|
||||||
Signed-off-by: Sven Nierlein <sven@nierlein.de>
|
|
||||||
|
|
||||||
2014-02-26 abrist <abrist@nagios.com>
|
2014-02-26 abrist <abrist@nagios.com>
|
||||||
|
|
||||||
* plugins/check_dns.c: check_dns.c Added a bit more logic to thresholds
|
* plugins/check_dns.c: check_dns.c Added a bit more logic to thresholds
|
||||||
|
@ -116,8 +573,6 @@
|
||||||
host_specified is set. This will help the admins when multiple checks
|
host_specified is set. This will help the admins when multiple checks
|
||||||
are configured
|
are configured
|
||||||
|
|
||||||
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
|
|
||||||
|
|
||||||
2014-05-19 abrist <abrist@nagios.com>
|
2014-05-19 abrist <abrist@nagios.com>
|
||||||
|
|
||||||
* plugins/check_nt.c: check_nt.c - Changed 'Mb' to 'MB' in MEMUSE.
|
* plugins/check_nt.c: check_nt.c - Changed 'Mb' to 'MB' in MEMUSE.
|
||||||
|
@ -177,8 +632,6 @@
|
||||||
|
|
||||||
also make test is now working on travis-ci
|
also make test is now working on travis-ci
|
||||||
|
|
||||||
Signed-off-by: Sven Nierlein <sven@nierlein.de>
|
|
||||||
|
|
||||||
2014-06-23 Jan Wagner <waja@cyconet.org>
|
2014-06-23 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
* plugins/check_ide_smart.c, po/de.po, po/fr.po,
|
* plugins/check_ide_smart.c, po/de.po, po/fr.po,
|
||||||
|
@ -329,22 +782,16 @@
|
||||||
when returning syscontact. So make them optional since we want to test
|
when returning syscontact. So make them optional since we want to test
|
||||||
check_snmp and not the snmpd.
|
check_snmp and not the snmpd.
|
||||||
|
|
||||||
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
|
|
||||||
|
|
||||||
* plugins/tests/check_procs.t: tests: check_proc tests fail if uid -2
|
* plugins/tests/check_procs.t: tests: check_proc tests fail if uid -2
|
||||||
does not map to nobody
|
does not map to nobody
|
||||||
|
|
||||||
so make sure our tests only run if -2 maps to nobody
|
so make sure our tests only run if -2 maps to nobody
|
||||||
|
|
||||||
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
|
|
||||||
|
|
||||||
* NPTest.pm, plugins/t/check_fping.t: tests: fping checks require being
|
* NPTest.pm, plugins/t/check_fping.t: tests: fping checks require being
|
||||||
root or setuid root
|
root or setuid root
|
||||||
|
|
||||||
on the fping binary. Check this before running the test.
|
on the fping binary. Check this before running the test.
|
||||||
|
|
||||||
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
|
|
||||||
|
|
||||||
* plugins/tests/check_http.t: require at least HTTP::Daemon 6.01
|
* plugins/tests/check_http.t: require at least HTTP::Daemon 6.01
|
||||||
|
|
||||||
since the test uses send_header from HTTP::Daemon::ClientConn which has been introduced in
|
since the test uses send_header from HTTP::Daemon::ClientConn which has been introduced in
|
||||||
|
@ -357,15 +804,11 @@
|
||||||
|
|
||||||
so add configurable/optional timeout to testCmd.
|
so add configurable/optional timeout to testCmd.
|
||||||
|
|
||||||
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
|
|
||||||
|
|
||||||
* plugins/tests/check_procs.t: tests: parts of the check_procs test only
|
* plugins/tests/check_procs.t: tests: parts of the check_procs test only
|
||||||
work when uid -2 exists
|
work when uid -2 exists
|
||||||
|
|
||||||
skip those tests if the uid does not exist
|
skip those tests if the uid does not exist
|
||||||
|
|
||||||
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
|
|
||||||
|
|
||||||
2014-06-12 Holger Weiss <holger@zedat.fu-berlin.de>
|
2014-06-12 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
* configure.ac: Remove unused code
|
* configure.ac: Remove unused code
|
||||||
|
@ -409,8 +852,6 @@
|
||||||
See also:
|
See also:
|
||||||
https:://bugs.op5.com/view.php?id=8385.
|
https:://bugs.op5.com/view.php?id=8385.
|
||||||
|
|
||||||
Signed-off-by: Anton Lofgren <alofgren@op5.com>
|
|
||||||
|
|
||||||
2014-04-03 Sam Kottler <shk@redhat.com>
|
2014-04-03 Sam Kottler <shk@redhat.com>
|
||||||
|
|
||||||
* plugins/check_apt.c: Remove the suggestion to run check_apt with
|
* plugins/check_apt.c: Remove the suggestion to run check_apt with
|
||||||
|
@ -446,8 +887,6 @@
|
||||||
* lib/Makefile.am, lib/tests/Makefile.am, plugins/Makefile.am: build -
|
* lib/Makefile.am, lib/tests/Makefile.am, plugins/Makefile.am: build -
|
||||||
avoid deprecated INCLUDES
|
avoid deprecated INCLUDES
|
||||||
|
|
||||||
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
|
|
||||||
|
|
||||||
2014-02-28 Holger Weiss <holger@zedat.fu-berlin.de>
|
2014-02-28 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
* plugins-scripts/check_breeze.pl, plugins-scripts/check_ircd.pl,
|
* plugins-scripts/check_breeze.pl, plugins-scripts/check_ircd.pl,
|
||||||
|
@ -582,8 +1021,6 @@
|
||||||
* plugins/check_swap.c: check_swap: Fix the plugin name that appears in
|
* plugins/check_swap.c: check_swap: Fix the plugin name that appears in
|
||||||
the comment
|
the comment
|
||||||
|
|
||||||
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
|
|
||||||
|
|
||||||
2014-02-20 Holger Weiss <holger@zedat.fu-berlin.de>
|
2014-02-20 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
* .travis.yml: travis-ci: Don't use Clang
|
* .travis.yml: travis-ci: Don't use Clang
|
||||||
|
@ -607,8 +1044,6 @@
|
||||||
given uid filter. So even we use sample data for this
|
given uid filter. So even we use sample data for this
|
||||||
test, we still need a real user.
|
test, we still need a real user.
|
||||||
|
|
||||||
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
|
|
||||||
|
|
||||||
2014-02-17 Jan Wagner <waja@cyconet.org>
|
2014-02-17 Jan Wagner <waja@cyconet.org>
|
||||||
|
|
||||||
* plugins/check_ssh.c: check_ssh: Reverting a387120
|
* plugins/check_ssh.c: check_ssh: Reverting a387120
|
||||||
|
@ -979,8 +1414,6 @@
|
||||||
|
|
||||||
using an unorthodox method to remove them
|
using an unorthodox method to remove them
|
||||||
|
|
||||||
Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
|
|
||||||
|
|
||||||
2014-01-22 Lars Vogdt <lrupp@suse.de>
|
2014-01-22 Lars Vogdt <lrupp@suse.de>
|
||||||
|
|
||||||
* plugins-scripts/check_file_age.pl,
|
* plugins-scripts/check_file_age.pl,
|
||||||
|
@ -1061,8 +1494,6 @@
|
||||||
* perlmods/Monitoring-Plugin-0.37.tar.gz,
|
* perlmods/Monitoring-Plugin-0.37.tar.gz,
|
||||||
perlmods/Nagios-Plugin-0.36.tar.gz: updated perldod with a renamed pkg
|
perlmods/Nagios-Plugin-0.36.tar.gz: updated perldod with a renamed pkg
|
||||||
|
|
||||||
Signed-off-by: Sven Nierlein <sven@nierlein.de>
|
|
||||||
|
|
||||||
2014-01-20 Holger Weiss <holger@zedat.fu-berlin.de>
|
2014-01-20 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
* plugins-root/check_dhcp.c, plugins-root/check_icmp.c,
|
* plugins-root/check_dhcp.c, plugins-root/check_icmp.c,
|
||||||
|
@ -2531,8 +2962,6 @@
|
||||||
This was reported by clang, and in order for it to understand attributes
|
This was reported by clang, and in order for it to understand attributes
|
||||||
properly, I had to modify the macro that checks for non-gcc compilers.
|
properly, I had to modify the macro that checks for non-gcc compilers.
|
||||||
|
|
||||||
Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
|
|
||||||
|
|
||||||
* plugins/check_snmp.c: check_snmp: Dynamically grow all data structures
|
* plugins/check_snmp.c: check_snmp: Dynamically grow all data structures
|
||||||
|
|
||||||
Before this patch, there was a constant, MAX_OIDS, that determined the
|
Before this patch, there was a constant, MAX_OIDS, that determined the
|
||||||
|
@ -2546,8 +2975,6 @@
|
||||||
packetsize on the SNMP server allows, which is usually significantly
|
packetsize on the SNMP server allows, which is usually significantly
|
||||||
smaller than infinity, yet often larger than 8.
|
smaller than infinity, yet often larger than 8.
|
||||||
|
|
||||||
Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
|
|
||||||
|
|
||||||
2013-01-24 Daniël van Eeden <git@myname.nl>
|
2013-01-24 Daniël van Eeden <git@myname.nl>
|
||||||
|
|
||||||
* REQUIREMENTS, plugins/check_mysql.c: Apply my patch from:
|
* REQUIREMENTS, plugins/check_mysql.c: Apply my patch from:
|
||||||
|
@ -2601,8 +3028,6 @@
|
||||||
|
|
||||||
This patch allocates the proper amount of memory, to fix the issue.
|
This patch allocates the proper amount of memory, to fix the issue.
|
||||||
|
|
||||||
Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
|
|
||||||
|
|
||||||
2012-12-28 Jonathan Milby <jon@uky.edu>
|
2012-12-28 Jonathan Milby <jon@uky.edu>
|
||||||
|
|
||||||
* plugins/check_mysql.c: Updated check_mysql.c to take client options
|
* plugins/check_mysql.c: Updated check_mysql.c to take client options
|
||||||
|
@ -2723,8 +3148,6 @@
|
||||||
While at it, we fix the string offset so the output we're interested
|
While at it, we fix the string offset so the output we're interested
|
||||||
in doesn't keep the equal sign that snmpget prints.
|
in doesn't keep the equal sign that snmpget prints.
|
||||||
|
|
||||||
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
||||||
|
|
||||||
* lib/utils_base.c: Stop dumping core on bad args to check_snmp
|
* lib/utils_base.c: Stop dumping core on bad args to check_snmp
|
||||||
|
|
||||||
Since the state patch introduction, we've been freeing uninitialized
|
Since the state patch introduction, we've been freeing uninitialized
|
||||||
|
@ -2742,8 +3165,6 @@
|
||||||
we get the memory from the kernel (which alread does that) and almost
|
we get the memory from the kernel (which alread does that) and almost
|
||||||
always desirable everywhere else.
|
always desirable everywhere else.
|
||||||
|
|
||||||
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
||||||
|
|
||||||
* plugins/check_snmp.c: Make check_snmp backwards compatible in how it
|
* plugins/check_snmp.c: Make check_snmp backwards compatible in how it
|
||||||
parses thresholds
|
parses thresholds
|
||||||
|
|
||||||
|
@ -2757,8 +3178,6 @@
|
||||||
exactly what the once did and people with lots of snmp checks can
|
exactly what the once did and people with lots of snmp checks can
|
||||||
avoid a bazillion false positives from their environments.
|
avoid a bazillion false positives from their environments.
|
||||||
|
|
||||||
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
||||||
|
|
||||||
2012-10-12 chl <dev+github@bugness.org>
|
2012-10-12 chl <dev+github@bugness.org>
|
||||||
|
|
||||||
* plugins/check_disk.c: check_disk: option to ignore reserved space
|
* plugins/check_disk.c: check_disk: option to ignore reserved space
|
||||||
|
@ -3019,8 +3438,6 @@
|
||||||
|
|
||||||
* plugins/check_smtp.c: check_smtp: Fix strcat overflows
|
* plugins/check_smtp.c: check_smtp: Fix strcat overflows
|
||||||
|
|
||||||
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
|
|
||||||
|
|
||||||
* contrib/check_http-with-client-certificate.c, plugins/check_by_ssh.c,
|
* contrib/check_http-with-client-certificate.c, plugins/check_by_ssh.c,
|
||||||
plugins/check_dig.c, plugins/check_disk.c, plugins/check_dns.c,
|
plugins/check_dig.c, plugins/check_disk.c, plugins/check_dns.c,
|
||||||
plugins/check_fping.c, plugins/check_game.c, plugins/check_hpjd.c,
|
plugins/check_fping.c, plugins/check_game.c, plugins/check_hpjd.c,
|
||||||
|
@ -3039,8 +3456,6 @@
|
||||||
Fixes many instances of
|
Fixes many instances of
|
||||||
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
|
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
|
||||||
|
|
||||||
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
|
|
||||||
|
|
||||||
* plugins/check_smtp.c: check_smtp: Strip angle brackets from -f
|
* plugins/check_smtp.c: check_smtp: Strip angle brackets from -f
|
||||||
argument, if provided
|
argument, if provided
|
||||||
|
|
||||||
|
@ -3050,8 +3465,6 @@
|
||||||
MTAs, so let's continue to support this syntax now that we generate
|
MTAs, so let's continue to support this syntax now that we generate
|
||||||
RFC-compliant commands.
|
RFC-compliant commands.
|
||||||
|
|
||||||
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
|
|
||||||
|
|
||||||
2012-06-28 Anders Kaseorg <andersk@mit.edu>
|
2012-06-28 Anders Kaseorg <andersk@mit.edu>
|
||||||
|
|
||||||
* plugins/check_smtp.c: check_smtp: Change MAIL FROM: command to comply
|
* plugins/check_smtp.c: check_smtp: Change MAIL FROM: command to comply
|
||||||
|
@ -3061,8 +3474,6 @@
|
||||||
5321) requires the address following MAIL FROM: to follow the colon
|
5321) requires the address following MAIL FROM: to follow the colon
|
||||||
immediately (with no space) and to be surrounded by angle brackets.
|
immediately (with no space) and to be surrounded by angle brackets.
|
||||||
|
|
||||||
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
|
|
||||||
|
|
||||||
2012-06-28 Holger Weiss <holger@zedat.fu-berlin.de>
|
2012-06-28 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
* package.def: Remove the package.def file
|
* package.def: Remove the package.def file
|
||||||
|
@ -4067,8 +4478,6 @@
|
||||||
gl/xalloc-die.c, gl/xalloc.h, gl/xmalloc.c, gl/xsize.h, gl/xstrndup.c,
|
gl/xalloc-die.c, gl/xalloc.h, gl/xmalloc.c, gl/xsize.h, gl/xstrndup.c,
|
||||||
gl/xstrndup.h, tools/setup: Sync with the latest Gnulib code (177f525)
|
gl/xstrndup.h, tools/setup: Sync with the latest Gnulib code (177f525)
|
||||||
|
|
||||||
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
|
|
||||||
|
|
||||||
2010-04-13 Holger Weiss <holger@zedat.fu-berlin.de>
|
2010-04-13 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
* plugins/check_ntp_peer.c: Fix typo
|
* plugins/check_ntp_peer.c: Fix typo
|
||||||
|
@ -4904,16 +5313,12 @@
|
||||||
when using its "-S" option on FreeBSD/amd64 (as reported and analyzed by
|
when using its "-S" option on FreeBSD/amd64 (as reported and analyzed by
|
||||||
Nikita Kalabukhov - 2797757).
|
Nikita Kalabukhov - 2797757).
|
||||||
|
|
||||||
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
|
|
||||||
|
|
||||||
* plugins-root/check_icmp.c: Don't use the plain char type for data
|
* plugins-root/check_icmp.c: Don't use the plain char type for data
|
||||||
buffers
|
buffers
|
||||||
|
|
||||||
Buffers which are used for holding arbitrary data should be referenced
|
Buffers which are used for holding arbitrary data should be referenced
|
||||||
using pointers to void and accessed using pointers to unsigned char.
|
using pointers to void and accessed using pointers to unsigned char.
|
||||||
|
|
||||||
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
|
|
||||||
|
|
||||||
2009-06-01 Matthias Eble <psychotrahe@gmx.de>
|
2009-06-01 Matthias Eble <psychotrahe@gmx.de>
|
||||||
|
|
||||||
* plugins/check_pgsql.c: Whitespace indent fixes for check_pgsql
|
* plugins/check_pgsql.c: Whitespace indent fixes for check_pgsql
|
||||||
|
@ -5013,14 +5418,10 @@
|
||||||
gl/unistd.in.h, gl/vasnprintf.c, gl/wchar.in.h, gl/xmalloc.c: Sync with
|
gl/unistd.in.h, gl/vasnprintf.c, gl/wchar.in.h, gl/xmalloc.c: Sync with
|
||||||
the latest Gnulib code (cb75dc5)
|
the latest Gnulib code (cb75dc5)
|
||||||
|
|
||||||
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
|
|
||||||
|
|
||||||
2009-05-19 Chris Pepper <pepper@reppep.com>
|
2009-05-19 Chris Pepper <pepper@reppep.com>
|
||||||
|
|
||||||
* plugins/check_ups.c, plugins/urlize.c: Fix a few minor typos
|
* plugins/check_ups.c, plugins/urlize.c: Fix a few minor typos
|
||||||
|
|
||||||
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
|
|
||||||
|
|
||||||
2009-05-19 Holger Weiss <holger@zedat.fu-berlin.de>
|
2009-05-19 Holger Weiss <holger@zedat.fu-berlin.de>
|
||||||
|
|
||||||
* doc/developer-guidelines.sgml: Talk about Git instead of CVS
|
* doc/developer-guidelines.sgml: Talk about Git instead of CVS
|
||||||
|
@ -5031,8 +5432,6 @@
|
||||||
|
|
||||||
While at it, apply another few minor cleanups.
|
While at it, apply another few minor cleanups.
|
||||||
|
|
||||||
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
|
|
||||||
|
|
||||||
* doc/developer-guidelines.sgml: Remove comments regarding former
|
* doc/developer-guidelines.sgml: Remove comments regarding former
|
||||||
requirements
|
requirements
|
||||||
|
|
||||||
|
@ -5041,8 +5440,6 @@
|
||||||
Libtool are needed for our Autotools setup. And the fact that Gettext
|
Libtool are needed for our Autotools setup. And the fact that Gettext
|
||||||
is no longer needed probably isn't that interesting for new developers.
|
is no longer needed probably isn't that interesting for new developers.
|
||||||
|
|
||||||
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
|
|
||||||
|
|
||||||
2009-05-07 Ton Voon <tonvoon@macbook-2.local>
|
2009-05-07 Ton Voon <tonvoon@macbook-2.local>
|
||||||
|
|
||||||
* NEWS, THANKS.in, plugins/check_disk.c: Fixed typo in check_disk
|
* NEWS, THANKS.in, plugins/check_disk.c: Fixed typo in check_disk
|
||||||
|
@ -14099,16 +14496,14 @@
|
||||||
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@841 f882894a-f735-0410-b71e-b25c423dba1c
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@841 f882894a-f735-0410-b71e-b25c423dba1c
|
||||||
|
|
||||||
* contrib/check_pop3.pl: fix loop and \r\n (Jason Burnett -
|
* contrib/check_pop3.pl: fix loop and \r\n (Jason Burnett -
|
||||||
http://sourceforge.net/tracker/index.php?func=detail&aid=895677&group_id
|
http://sourceforge.net/tracker/index.php?func=detail&aid=895677&group_id=29880&atid=397599)
|
||||||
=29880&atid=397599)
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@840 f882894a-f735-0410-b71e-b25c423dba1c
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@840 f882894a-f735-0410-b71e-b25c423dba1c
|
||||||
|
|
||||||
* plugins/check_disk.c: check_disk was getting blocks instead of bytes
|
* plugins/check_disk.c: check_disk was getting blocks instead of bytes
|
||||||
(Michael Musikhin -
|
(Michael Musikhin -
|
||||||
http://sourceforge.net/tracker/index.php?func=detail&aid=900215&group_id
|
http://sourceforge.net/tracker/index.php?func=detail&aid=900215&group_id=29880&atid=397599)
|
||||||
=29880&atid=397599)
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@839 f882894a-f735-0410-b71e-b25c423dba1c
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@839 f882894a-f735-0410-b71e-b25c423dba1c
|
||||||
|
@ -15934,15 +16329,13 @@
|
||||||
2003-06-10 Karl DeBisschop <kdebisschop@users.sourceforge.net>
|
2003-06-10 Karl DeBisschop <kdebisschop@users.sourceforge.net>
|
||||||
|
|
||||||
* contrib/urlize.pl: add comment about shell quote removal to address
|
* contrib/urlize.pl: add comment about shell quote removal to address
|
||||||
https://sourceforge.net/tracker/index.php?func=detail&aid=661916&group_i
|
https://sourceforge.net/tracker/index.php?func=detail&aid=661916&group_id=29880&atid=397597
|
||||||
d=29880&atid=397597
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@544 f882894a-f735-0410-b71e-b25c423dba1c
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@544 f882894a-f735-0410-b71e-b25c423dba1c
|
||||||
|
|
||||||
* plugins/urlize.c: add note about shell quote removal to address
|
* plugins/urlize.c: add note about shell quote removal to address
|
||||||
https://sourceforge.net/tracker/index.php?func=detail&aid=661916&group_i
|
https://sourceforge.net/tracker/index.php?func=detail&aid=661916&group_id=29880&atid=397597
|
||||||
d=29880&atid=397597
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@543 f882894a-f735-0410-b71e-b25c423dba1c
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@543 f882894a-f735-0410-b71e-b25c423dba1c
|
||||||
|
|
36
FAQ
36
FAQ
|
@ -29,42 +29,6 @@ A: At a minimum, the output from 'uname -a' and the version string
|
||||||
problem and any solution/patch.
|
problem and any solution/patch.
|
||||||
|
|
||||||
|
|
||||||
Q: I'm using Redhat Linux (or some other RPM-based distribution).
|
|
||||||
Which packages should I install?
|
|
||||||
|
|
||||||
A: The package monitoring-plugins-<version>.<arch>.rpm contains only
|
|
||||||
those plugins that should work on any POSIX compliant system. In
|
|
||||||
other words, you should be able to install this package on your
|
|
||||||
system, no matter what else is or in not installed.
|
|
||||||
|
|
||||||
However, most of us have more complex systems than barebones
|
|
||||||
POSIX. We tried creating a variety of separate packages so
|
|
||||||
each dependency could be installed cleanly, but many people
|
|
||||||
found that this resulted in too many packages. So in the end,
|
|
||||||
all the non-POSIX plugins were folded into one RPM
|
|
||||||
(monitoring-plugins-<version>.<arch>.rpm). Most people will need to
|
|
||||||
use RPM's '--nodeps' option to install this package.
|
|
||||||
|
|
||||||
|
|
||||||
Q: My system uses the .deb package format. What packages should I
|
|
||||||
install?
|
|
||||||
|
|
||||||
A: We strive for cooperation between all packagers and developers.
|
|
||||||
The answers for .deb are the same as for RPM, after changing the
|
|
||||||
package name suffixes accordingly.
|
|
||||||
|
|
||||||
|
|
||||||
Q: I prefer to build my own RPMs. Do I need to install all of the
|
|
||||||
various dependencies?
|
|
||||||
|
|
||||||
A: Beginning with the 1.2.9-1 release, you may run
|
|
||||||
|
|
||||||
rpm --define 'custom 1' -ta monitoring-plugins-<release>.tar.gz
|
|
||||||
|
|
||||||
In prior releases, you must unpack the tarball and build the
|
|
||||||
RPM using monitoring-custom.spec with 'rpm -ba'.
|
|
||||||
|
|
||||||
|
|
||||||
Q: I get an error like
|
Q: I get an error like
|
||||||
|
|
||||||
Warning: Return code of 127 for check of service 'PING' on host 'anyhost' was out of bounds.
|
Warning: Return code of 127 for check of service 'PING' on host 'anyhost' was out of bounds.
|
||||||
|
|
|
@ -5,7 +5,7 @@ SUBDIRS = gl tap lib plugins plugins-scripts plugins-root po @PERLMODS_DIR@
|
||||||
EXTRA_DIST = config.rpath \
|
EXTRA_DIST = config.rpath \
|
||||||
ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ LEGAL NEWS \
|
ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ LEGAL NEWS \
|
||||||
NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \
|
NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \
|
||||||
NPTest.pm pkg monitoring-plugins.spec \
|
NPTest.pm pkg \
|
||||||
config_test/Makefile config_test/run_tests config_test/child_test.c \
|
config_test/Makefile config_test/run_tests config_test/child_test.c \
|
||||||
tools/build_perl_modules \
|
tools/build_perl_modules \
|
||||||
tools/tinderbox_build
|
tools/tinderbox_build
|
||||||
|
|
21
Makefile.in
21
Makefile.in
|
@ -52,13 +52,13 @@ host_triplet = @host@
|
||||||
subdir = .
|
subdir = .
|
||||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||||
$(srcdir)/monitoring-plugins.spec.in $(srcdir)/test.pl.in \
|
$(srcdir)/test.pl.in $(top_srcdir)/configure \
|
||||||
$(top_srcdir)/configure $(top_srcdir)/pkg/solaris/pkginfo.in \
|
$(top_srcdir)/pkg/solaris/pkginfo.in ABOUT-NLS AUTHORS COPYING \
|
||||||
ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS THANKS \
|
ChangeLog INSTALL NEWS THANKS build-aux/compile \
|
||||||
build-aux/compile build-aux/config.guess \
|
build-aux/config.guess build-aux/config.rpath \
|
||||||
build-aux/config.rpath build-aux/config.sub build-aux/depcomp \
|
build-aux/config.sub build-aux/depcomp build-aux/install-sh \
|
||||||
build-aux/install-sh build-aux/ltmain.sh build-aux/missing \
|
build-aux/ltmain.sh build-aux/missing build-aux/mkinstalldirs \
|
||||||
build-aux/mkinstalldirs config.rpath mkinstalldirs
|
config.rpath mkinstalldirs
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||||
$(top_srcdir)/gl/m4/00gnulib.m4 $(top_srcdir)/gl/m4/alloca.m4 \
|
$(top_srcdir)/gl/m4/00gnulib.m4 $(top_srcdir)/gl/m4/alloca.m4 \
|
||||||
|
@ -162,8 +162,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
configure.lineno config.status.lineno
|
configure.lineno config.status.lineno
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||||
CONFIG_HEADER = config.h
|
CONFIG_HEADER = config.h
|
||||||
CONFIG_CLEAN_FILES = monitoring-plugins.spec test.pl \
|
CONFIG_CLEAN_FILES = test.pl pkg/solaris/pkginfo
|
||||||
pkg/solaris/pkginfo
|
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
SOURCES =
|
SOURCES =
|
||||||
DIST_SOURCES =
|
DIST_SOURCES =
|
||||||
|
@ -1356,7 +1355,7 @@ SUBDIRS = gl tap lib plugins plugins-scripts plugins-root po @PERLMODS_DIR@
|
||||||
EXTRA_DIST = config.rpath \
|
EXTRA_DIST = config.rpath \
|
||||||
ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ LEGAL NEWS \
|
ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ LEGAL NEWS \
|
||||||
NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \
|
NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \
|
||||||
NPTest.pm pkg monitoring-plugins.spec \
|
NPTest.pm pkg \
|
||||||
config_test/Makefile config_test/run_tests config_test/child_test.c \
|
config_test/Makefile config_test/run_tests config_test/child_test.c \
|
||||||
tools/build_perl_modules \
|
tools/build_perl_modules \
|
||||||
tools/tinderbox_build
|
tools/tinderbox_build
|
||||||
|
@ -1420,8 +1419,6 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
|
||||||
distclean-hdr:
|
distclean-hdr:
|
||||||
-rm -f config.h stamp-h1
|
-rm -f config.h stamp-h1
|
||||||
monitoring-plugins.spec: $(top_builddir)/config.status $(srcdir)/monitoring-plugins.spec.in
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
||||||
test.pl: $(top_builddir)/config.status $(srcdir)/test.pl.in
|
test.pl: $(top_builddir)/config.status $(srcdir)/test.pl.in
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
pkg/solaris/pkginfo: $(top_builddir)/config.status $(top_srcdir)/pkg/solaris/pkginfo.in
|
pkg/solaris/pkginfo: $(top_builddir)/config.status $(top_srcdir)/pkg/solaris/pkginfo.in
|
||||||
|
|
28
NEWS
28
NEWS
|
@ -1,5 +1,33 @@
|
||||||
This file documents the major additions and syntax changes between releases.
|
This file documents the major additions and syntax changes between releases.
|
||||||
|
|
||||||
|
2.1 15th October 2014
|
||||||
|
ENHANCEMENTS
|
||||||
|
New check_hpjd -p option for port specification (abrist)
|
||||||
|
New ./configure --with-qmail-qstat-command option to specify the path to
|
||||||
|
qmail-qstat(8)
|
||||||
|
New check_ifstatus -n option to ignore interfaces by name
|
||||||
|
check_ntp_peer has now specific state output for each metric
|
||||||
|
New check_mysql -n option to ignore authentication failures
|
||||||
|
Added IP and port or socket name to error messages
|
||||||
|
New check_ntp_time -o option to add expected offset
|
||||||
|
check_disk shows now troubled partions in verbose mode
|
||||||
|
check_dig has now support for drill and dig
|
||||||
|
check_dig has now support for -6 option
|
||||||
|
Add performance data to check_file_age
|
||||||
|
|
||||||
|
FIXES
|
||||||
|
Fix check_jabber to work with Openfire servers
|
||||||
|
Fix check_oracle bad string matching when testing TNS server
|
||||||
|
Fixed check_ifstatus performance data output
|
||||||
|
Fixed expire time output for sslutils
|
||||||
|
check_dns now verifies if the answer is returning from the queried
|
||||||
|
server
|
||||||
|
Fix check_by_ssh to accept --hostname as argument
|
||||||
|
|
||||||
|
WARNINGS
|
||||||
|
This release doesn't ship with an RPM spec file, please contribute to
|
||||||
|
PR #1283 if you are interested in it
|
||||||
|
|
||||||
2.0 11th July 2014
|
2.0 11th July 2014
|
||||||
ENHANCEMENTS
|
ENHANCEMENTS
|
||||||
check_mailq now supports auto detection of qmail, postfix, exim and nullmailer with
|
check_mailq now supports auto detection of qmail, postfix, exim and nullmailer with
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
SRC_ROOT=`dirname $0`
|
SRC_ROOT=`dirname $0`
|
||||||
|
|
||||||
NPVF=NP-VERSION-FILE
|
NPVF=NP-VERSION-FILE
|
||||||
DEF_VER=2.0.git
|
DEF_VER=2.1.git
|
||||||
|
|
||||||
LF='
|
LF='
|
||||||
'
|
'
|
||||||
|
|
10
THANKS
10
THANKS
|
@ -30,6 +30,7 @@ Lutz Behnke
|
||||||
Marlo Bell
|
Marlo Bell
|
||||||
Simon Bellwood
|
Simon Bellwood
|
||||||
Hilko Bengen
|
Hilko Bengen
|
||||||
|
Jason Benguerel
|
||||||
Allan Bennett
|
Allan Bennett
|
||||||
Booker C. Bense
|
Booker C. Bense
|
||||||
Guy Van Den Bergh
|
Guy Van Den Bergh
|
||||||
|
@ -112,6 +113,7 @@ Felix Frank
|
||||||
Dann Frazier
|
Dann Frazier
|
||||||
Rick Frey
|
Rick Frey
|
||||||
Matt Garrett
|
Matt Garrett
|
||||||
|
Jonas Genannt
|
||||||
Robby Giffin
|
Robby Giffin
|
||||||
Flo Gleixner
|
Flo Gleixner
|
||||||
Florian Gleixner
|
Florian Gleixner
|
||||||
|
@ -153,6 +155,7 @@ Anders Kaseorg
|
||||||
Jason Kau
|
Jason Kau
|
||||||
Mark Keisler
|
Mark Keisler
|
||||||
Ryan Kelly
|
Ryan Kelly
|
||||||
|
Matthew Kent
|
||||||
Bo Kersey
|
Bo Kersey
|
||||||
Konstantin Khomoutov
|
Konstantin Khomoutov
|
||||||
Serhan Kiymaz
|
Serhan Kiymaz
|
||||||
|
@ -160,7 +163,9 @@ Denis Knauf
|
||||||
Tilman Koschnick
|
Tilman Koschnick
|
||||||
John Koyle
|
John Koyle
|
||||||
Steven Kreuzer
|
Steven Kreuzer
|
||||||
|
Julius Kriukas
|
||||||
Christoph Kron
|
Christoph Kron
|
||||||
|
Frederic Krueger
|
||||||
Marcel Kuiper
|
Marcel Kuiper
|
||||||
Alexander Kulak
|
Alexander Kulak
|
||||||
Bill Kunkel
|
Bill Kunkel
|
||||||
|
@ -196,8 +201,10 @@ Mathieu Masseboeuf
|
||||||
Alexander Matey
|
Alexander Matey
|
||||||
Ville Mattila
|
Ville Mattila
|
||||||
Richard Mayhew
|
Richard Mayhew
|
||||||
|
Patrick McAndrew
|
||||||
Patrick McCormick
|
Patrick McCormick
|
||||||
Mike McHenry
|
Mike McHenry
|
||||||
|
Simon Meggle
|
||||||
Stefan Meier
|
Stefan Meier
|
||||||
Jan-Piet Mens
|
Jan-Piet Mens
|
||||||
Sven Meyer
|
Sven Meyer
|
||||||
|
@ -222,6 +229,7 @@ Craig Orsinger
|
||||||
Vaclav Ovsik
|
Vaclav Ovsik
|
||||||
Remi Paulmier
|
Remi Paulmier
|
||||||
Tom Payerle
|
Tom Payerle
|
||||||
|
Nick Peelman
|
||||||
Fabian Pehla
|
Fabian Pehla
|
||||||
Chris Pepper
|
Chris Pepper
|
||||||
Matt Perry
|
Matt Perry
|
||||||
|
@ -325,5 +333,7 @@ Howard Wilkinson
|
||||||
Shawn Wills
|
Shawn Wills
|
||||||
Rob Windsor
|
Rob Windsor
|
||||||
Mario Witte
|
Mario Witte
|
||||||
|
Alexander Wittig
|
||||||
Brian De Wolf
|
Brian De Wolf
|
||||||
|
Patric Wust
|
||||||
Jamie Zawinski
|
Jamie Zawinski
|
||||||
|
|
|
@ -1859,9 +1859,12 @@
|
||||||
/* path to lmstat */
|
/* path to lmstat */
|
||||||
#undef PATH_TO_LMSTAT
|
#undef PATH_TO_LMSTAT
|
||||||
|
|
||||||
/* path to qmail-qstat */
|
/* path to mailq */
|
||||||
#undef PATH_TO_MAILQ
|
#undef PATH_TO_MAILQ
|
||||||
|
|
||||||
|
/* path to qmail-qstat */
|
||||||
|
#undef PATH_TO_QMAIL_QSTAT
|
||||||
|
|
||||||
/* path to qstat/quakestat */
|
/* path to qstat/quakestat */
|
||||||
#undef PATH_TO_QSTAT
|
#undef PATH_TO_QSTAT
|
||||||
|
|
||||||
|
|
35
configure
vendored
35
configure
vendored
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for monitoring-plugins 2.0.
|
# Generated by GNU Autoconf 2.69 for monitoring-plugins 2.1.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||||
|
@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='monitoring-plugins'
|
PACKAGE_NAME='monitoring-plugins'
|
||||||
PACKAGE_TARNAME='monitoring-plugins'
|
PACKAGE_TARNAME='monitoring-plugins'
|
||||||
PACKAGE_VERSION='2.0'
|
PACKAGE_VERSION='2.1'
|
||||||
PACKAGE_STRING='monitoring-plugins 2.0'
|
PACKAGE_STRING='monitoring-plugins 2.1'
|
||||||
PACKAGE_BUGREPORT=''
|
PACKAGE_BUGREPORT=''
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
|
@ -1838,6 +1838,7 @@ with_fping_command
|
||||||
with_fping6_command
|
with_fping6_command
|
||||||
with_ssh_command
|
with_ssh_command
|
||||||
with_mailq_command
|
with_mailq_command
|
||||||
|
with_qmail_qstat_command
|
||||||
with_proc_meminfo
|
with_proc_meminfo
|
||||||
with_dig_command
|
with_dig_command
|
||||||
with_apt_get_command
|
with_apt_get_command
|
||||||
|
@ -2399,7 +2400,7 @@ if test "$ac_init_help" = "long"; then
|
||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures monitoring-plugins 2.0 to adapt to many kinds of systems.
|
\`configure' configures monitoring-plugins 2.1 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
|
@ -2470,7 +2471,7 @@ fi
|
||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of monitoring-plugins 2.0:";;
|
short | recursive ) echo "Configuration of monitoring-plugins 2.1:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
|
@ -2544,6 +2545,7 @@ Optional Packages:
|
||||||
--with-fping6-command=PATH Path to fping6 command
|
--with-fping6-command=PATH Path to fping6 command
|
||||||
--with-ssh-command=PATH sets path for ssh
|
--with-ssh-command=PATH sets path for ssh
|
||||||
--with-mailq-command=PATH sets path to mailq
|
--with-mailq-command=PATH sets path to mailq
|
||||||
|
--with-qmail-qstat-command=PATH sets path to qmail-qstat
|
||||||
--with-proc-meminfo=PATH path to /proc/meminfo or equivalent
|
--with-proc-meminfo=PATH path to /proc/meminfo or equivalent
|
||||||
--with-dig-command=PATH Path to dig command
|
--with-dig-command=PATH Path to dig command
|
||||||
--with-apt-get-command=PATH Path to apt-get command
|
--with-apt-get-command=PATH Path to apt-get command
|
||||||
|
@ -2635,7 +2637,7 @@ fi
|
||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
monitoring-plugins configure 2.0
|
monitoring-plugins configure 2.1
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
|
@ -3340,7 +3342,7 @@ cat >config.log <<_ACEOF
|
||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by monitoring-plugins $as_me 2.0, which was
|
It was created by monitoring-plugins $as_me 2.1, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
|
@ -3742,7 +3744,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_config_files="$ac_config_files gl/Makefile monitoring-plugins.spec"
|
ac_config_files="$ac_config_files gl/Makefile"
|
||||||
|
|
||||||
ac_aux_dir=
|
ac_aux_dir=
|
||||||
for ac_dir in build-aux "$srcdir"/build-aux; do
|
for ac_dir in build-aux "$srcdir"/build-aux; do
|
||||||
|
@ -4211,7 +4213,7 @@ fi
|
||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='monitoring-plugins'
|
PACKAGE='monitoring-plugins'
|
||||||
VERSION='2.0'
|
VERSION='2.1'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
@ -18175,11 +18177,17 @@ $as_echo "no" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test -x "$PATH_TO_QMAIL_QSTAT"
|
|
||||||
|
# Check whether --with-qmail_qstat_command was given.
|
||||||
|
if test "${with_qmail_qstat_command+set}" = set; then :
|
||||||
|
withval=$with_qmail_qstat_command; PATH_TO_QMAIL_QSTAT=$withval
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$PATH_TO_QMAIL_QSTAT"
|
||||||
then
|
then
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define PATH_TO_MAILQ "$PATH_TO_QMAIL_QSTAT"
|
#define PATH_TO_QMAIL_QSTAT "$PATH_TO_QMAIL_QSTAT"
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -40929,7 +40937,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by monitoring-plugins $as_me 2.0, which was
|
This file was extended by monitoring-plugins $as_me 2.1, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
|
@ -40995,7 +41003,7 @@ _ACEOF
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
monitoring-plugins config.status 2.0
|
monitoring-plugins config.status 2.1
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
@ -41409,7 +41417,6 @@ for ac_config_target in $ac_config_targets
|
||||||
do
|
do
|
||||||
case $ac_config_target in
|
case $ac_config_target in
|
||||||
"gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;;
|
"gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;;
|
||||||
"monitoring-plugins.spec") CONFIG_FILES="$CONFIG_FILES monitoring-plugins.spec" ;;
|
|
||||||
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
||||||
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||||
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
|
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
|
||||||
|
|
12
configure.ac
12
configure.ac
|
@ -1,9 +1,8 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_INIT(monitoring-plugins,2.0)
|
AC_INIT(monitoring-plugins,2.1)
|
||||||
AC_CONFIG_SRCDIR(NPTest.pm)
|
AC_CONFIG_SRCDIR(NPTest.pm)
|
||||||
AC_CONFIG_FILES([gl/Makefile
|
AC_CONFIG_FILES([gl/Makefile])
|
||||||
monitoring-plugins.spec])
|
|
||||||
AC_CONFIG_AUX_DIR(build-aux)
|
AC_CONFIG_AUX_DIR(build-aux)
|
||||||
AM_INIT_AUTOMAKE([1.8.3])
|
AM_INIT_AUTOMAKE([1.8.3])
|
||||||
AM_MAINTAINER_MODE([enable])
|
AM_MAINTAINER_MODE([enable])
|
||||||
|
@ -1478,9 +1477,12 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat)
|
AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat)
|
||||||
if test -x "$PATH_TO_QMAIL_QSTAT"
|
AC_ARG_WITH(qmail_qstat_command,
|
||||||
|
ACX_HELP_STRING([--with-qmail-qstat-command=PATH],
|
||||||
|
[sets path to qmail-qstat]), PATH_TO_QMAIL_QSTAT=$withval)
|
||||||
|
if test -n "$PATH_TO_QMAIL_QSTAT"
|
||||||
then
|
then
|
||||||
AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat])
|
AC_DEFINE_UNQUOTED(PATH_TO_QMAIL_QSTAT,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat])
|
||||||
else
|
else
|
||||||
AC_MSG_WARN([Could not find qmail-qstat or eqivalent])
|
AC_MSG_WARN([Could not find qmail-qstat or eqivalent])
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -446,6 +446,7 @@ void np_enable_state(char *keyname, int expected_data_version) {
|
||||||
char *temp_filename = NULL;
|
char *temp_filename = NULL;
|
||||||
char *temp_keyname = NULL;
|
char *temp_keyname = NULL;
|
||||||
char *p=NULL;
|
char *p=NULL;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if(this_monitoring_plugin==NULL)
|
if(this_monitoring_plugin==NULL)
|
||||||
die(STATE_UNKNOWN, _("This requires np_init to be called"));
|
die(STATE_UNKNOWN, _("This requires np_init to be called"));
|
||||||
|
@ -476,9 +477,13 @@ void np_enable_state(char *keyname, int expected_data_version) {
|
||||||
this_state->state_data=NULL;
|
this_state->state_data=NULL;
|
||||||
|
|
||||||
/* Calculate filename */
|
/* Calculate filename */
|
||||||
asprintf(&temp_filename, "%s/%lu/%s/%s",
|
ret = asprintf(&temp_filename, "%s/%lu/%s/%s",
|
||||||
_np_state_calculate_location_prefix(), (unsigned long)geteuid(),
|
_np_state_calculate_location_prefix(), (unsigned long)geteuid(),
|
||||||
this_monitoring_plugin->plugin_name, this_state->name);
|
this_monitoring_plugin->plugin_name, this_state->name);
|
||||||
|
if (ret < 0)
|
||||||
|
die(STATE_UNKNOWN, _("Cannot allocate memory: %s"),
|
||||||
|
strerror(errno));
|
||||||
|
|
||||||
this_state->_filename=temp_filename;
|
this_state->_filename=temp_filename;
|
||||||
|
|
||||||
this_monitoring_plugin->state = this_state;
|
this_monitoring_plugin->state = this_state;
|
||||||
|
@ -614,8 +619,8 @@ void np_state_write_string(time_t data_time, char *data_string) {
|
||||||
|
|
||||||
/* If file doesn't currently exist, create directories */
|
/* If file doesn't currently exist, create directories */
|
||||||
if(access(this_monitoring_plugin->state->_filename,F_OK)!=0) {
|
if(access(this_monitoring_plugin->state->_filename,F_OK)!=0) {
|
||||||
asprintf(&directories, "%s", this_monitoring_plugin->state->_filename);
|
result = asprintf(&directories, "%s", this_monitoring_plugin->state->_filename);
|
||||||
if(directories==NULL)
|
if(result < 0)
|
||||||
die(STATE_UNKNOWN, _("Cannot allocate memory: %s"),
|
die(STATE_UNKNOWN, _("Cannot allocate memory: %s"),
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
|
||||||
|
@ -633,8 +638,8 @@ void np_state_write_string(time_t data_time, char *data_string) {
|
||||||
np_free(directories);
|
np_free(directories);
|
||||||
}
|
}
|
||||||
|
|
||||||
asprintf(&temp_file,"%s.XXXXXX",this_monitoring_plugin->state->_filename);
|
result = asprintf(&temp_file,"%s.XXXXXX",this_monitoring_plugin->state->_filename);
|
||||||
if(temp_file==NULL)
|
if(result < 0)
|
||||||
die(STATE_UNKNOWN, _("Cannot allocate memory: %s"),
|
die(STATE_UNKNOWN, _("Cannot allocate memory: %s"),
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
|
||||||
|
|
|
@ -1,201 +0,0 @@
|
||||||
# Macros
|
|
||||||
%define isaix %(test "`uname -s`" = "AIX" && echo "1" || echo "0")
|
|
||||||
%define islinux %(test "`uname -s`" = "Linux" && echo "1" || echo "0")
|
|
||||||
%define isredhatfamily %(test -f /etc/redhat-release && echo "1" || echo "0")
|
|
||||||
|
|
||||||
%if %{isaix}
|
|
||||||
%define _prefix /opt/nagios
|
|
||||||
# %define _defaultdocdir %{_datadir}/doc
|
|
||||||
%else
|
|
||||||
%define _libexecdir %{_exec_prefix}/lib/nagios/plugins
|
|
||||||
%endif
|
|
||||||
%define _sysconfdir /etc/nagios
|
|
||||||
|
|
||||||
%define npusr nagios
|
|
||||||
%define nphome /opt/nagios
|
|
||||||
%define npgrp nagios
|
|
||||||
|
|
||||||
Name: monitoring-plugins
|
|
||||||
Version: 2.0
|
|
||||||
Release: 1
|
|
||||||
Summary: Host/service/network monitoring program plugins for Nagios and compatible
|
|
||||||
|
|
||||||
Group: Applications/System
|
|
||||||
License: GPL
|
|
||||||
URL: https://www.monitoring-plugins.org/
|
|
||||||
Source0: https://www.monitoring-plugins.org/download/%{name}-%{version}.tar.gz
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
|
|
||||||
%define npdir %{_builddir}/%{name}-%{version}
|
|
||||||
|
|
||||||
%if %{isaix}
|
|
||||||
Prefix: %{_prefix}
|
|
||||||
%else
|
|
||||||
Prefix: %{_prefix}/lib/nagios/plugins
|
|
||||||
%endif
|
|
||||||
Packager: Karl DeBisschop <kdebisschop@users.sourceforge.net>
|
|
||||||
Vendor: Monitoring Plugins Development Team
|
|
||||||
Provides: monitoring-plugins
|
|
||||||
|
|
||||||
%{!?custom:%global custom 0}
|
|
||||||
Obsoletes: monitoring-plugins-custom monitoring-plugins-extras
|
|
||||||
|
|
||||||
|
|
||||||
# Requires
|
|
||||||
%if %{isaix}
|
|
||||||
Requires: fping
|
|
||||||
Requires: gawk
|
|
||||||
Requires: net-snmp
|
|
||||||
Requires: net-snmp-perl
|
|
||||||
Requires: net-snmp-utils
|
|
||||||
Requires: openldap
|
|
||||||
Requires: openssl
|
|
||||||
Requires: perl
|
|
||||||
Requires: python
|
|
||||||
Requires: openssl
|
|
||||||
BuildRequires: fping
|
|
||||||
BuildRequires: gawk
|
|
||||||
BuildRequires: net-snmp
|
|
||||||
BuildRequires: net-snmp-perl
|
|
||||||
BuildRequires: net-snmp-utils
|
|
||||||
BuildRequires: openldap-devel
|
|
||||||
%endif
|
|
||||||
%if %{isredhatfamily}
|
|
||||||
Requires: bind-utils
|
|
||||||
Requires: coreutils
|
|
||||||
Requires: fping
|
|
||||||
Requires: gawk
|
|
||||||
Requires: grep
|
|
||||||
Requires: iputils
|
|
||||||
Requires: mysql
|
|
||||||
Requires: net-snmp-utils
|
|
||||||
Requires: ntp
|
|
||||||
Requires: openldap
|
|
||||||
Requires: openssl
|
|
||||||
Requires: openssh-clients
|
|
||||||
Requires: perl
|
|
||||||
Requires: postgresql-libs
|
|
||||||
Requires: procps
|
|
||||||
Requires: python
|
|
||||||
Requires: samba-client
|
|
||||||
Requires: shadow-utils
|
|
||||||
Requires: traceroute
|
|
||||||
Requires: /usr/bin/mailq
|
|
||||||
BuildRequires: bind-utils
|
|
||||||
BuildRequires: coreutils
|
|
||||||
BuildRequires: iputils
|
|
||||||
BuildRequires: mysql-devel
|
|
||||||
BuildRequires: net-snmp-utils
|
|
||||||
BuildRequires: net-tools
|
|
||||||
BuildRequires: ntp
|
|
||||||
BuildRequires: openldap-devel
|
|
||||||
BuildRequires: openssh-clients
|
|
||||||
BuildRequires: openssl-devel
|
|
||||||
BuildRequires: postgresql-devel
|
|
||||||
BuildRequires: procps
|
|
||||||
BuildRequires: samba-client
|
|
||||||
BuildRequires: /usr/bin/mailq
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
|
||||||
|
|
||||||
Nagios is a program that will monitor hosts and services on your
|
|
||||||
network, and to email or page you when a problem arises or is
|
|
||||||
resolved. Nagios runs on a unix server as a background or daemon
|
|
||||||
process, intermittently running checks on various services that you
|
|
||||||
specify. The actual service checks are performed by separate "plugin"
|
|
||||||
programs which return the status of the checks to the monitoring
|
|
||||||
system. This package contains those plugins.
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
|
||||||
%{?isaix: MAKE=gmake} ./configure \
|
|
||||||
--prefix=%{_prefix} \
|
|
||||||
--exec-prefix=%{_exec_prefix} \
|
|
||||||
--libexecdir=%{_libexecdir} \
|
|
||||||
--sysconfdir=%{_sysconfdir} \
|
|
||||||
--datadir=%{_datadir} \
|
|
||||||
--with-cgiurl=/nagios/cgi-bin
|
|
||||||
ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-before
|
|
||||||
ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-before
|
|
||||||
ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-before
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-after
|
|
||||||
ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-after
|
|
||||||
ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-after
|
|
||||||
|
|
||||||
%pre
|
|
||||||
# Create `nagios' group on the system if necessary
|
|
||||||
%if %{isaix}
|
|
||||||
lsgroup %{npgrp} > /dev/null 2> /dev/null
|
|
||||||
if [ $? -eq 2 ] ; then
|
|
||||||
mkgroup %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
%if %{islinux}
|
|
||||||
getent group %{npgrp} > /dev/null 2> /dev/null
|
|
||||||
if [ $? -ne 0 ] ; then
|
|
||||||
groupadd %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Create `nagios' user on the system if necessary
|
|
||||||
%if %{isaix}
|
|
||||||
lsuser %{npusr} > /dev/null 2> /dev/null
|
|
||||||
if [ $? -eq 2 ] ; then
|
|
||||||
useradd -d %{nphome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
|
|
||||||
%nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
%if %{islinux}
|
|
||||||
getent passwd %{npusr} > /dev/null 2> /dev/null
|
|
||||||
if [ $? -ne 0 ] ; then
|
|
||||||
useradd -r -d %{nshome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
|
|
||||||
%nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install
|
|
||||||
%find_lang %{name}
|
|
||||||
echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
|
|
||||||
comm -13 %{npdir}/ls-plugins-before %{npdir}/ls-plugins-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
|
|
||||||
echo "%defattr(755,root,root)" >> %{name}.lang
|
|
||||||
comm -13 %{npdir}/ls-plugins-root-before %{npdir}/ls-plugins-root-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
|
|
||||||
echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
|
|
||||||
comm -13 %{npdir}/ls-plugins-scripts-before %{npdir}/ls-plugins-scripts-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
|
|
||||||
echo "%{_libexecdir}/utils.pm" >> %{name}.lang
|
|
||||||
echo "%{_libexecdir}/utils.sh" >> %{name}.lang
|
|
||||||
echo "%{_libexecdir}/check_ldaps" >> %{name}.lang
|
|
||||||
|
|
||||||
sed -i '/libnpcommon/d' %{name}.lang
|
|
||||||
sed -i '/monitoring-plugins.mo/d' %{name}.lang
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
|
|
||||||
%files -f %{name}.lang
|
|
||||||
%config(missingok,noreplace) %{_sysconfdir}/command.cfg
|
|
||||||
%doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS
|
|
||||||
%doc ChangeLog command.cfg
|
|
||||||
%if ! %{isaix}
|
|
||||||
%{_datadir}/locale/de/LC_MESSAGES/monitoring-plugins.mo
|
|
||||||
%{_datadir}/locale/fr/LC_MESSAGES/monitoring-plugins.mo
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Mon May 23 2005 Sean Finney <seanius@seanius.net> - cvs head
|
|
||||||
- just include the nagios plugins directory, which will automatically include
|
|
||||||
all generated plugins (which keeps the build from failing on systems that
|
|
||||||
don't have all build-dependencies for every plugin)
|
|
||||||
* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
|
|
||||||
- extensive rewrite to facilitate processing into various distro-compatible specs
|
|
||||||
* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
|
|
||||||
- extensive rewrite to facilitate processing into various distro-compatible specs
|
|
|
@ -1,201 +0,0 @@
|
||||||
# Macros
|
|
||||||
%define isaix %(test "`uname -s`" = "AIX" && echo "1" || echo "0")
|
|
||||||
%define islinux %(test "`uname -s`" = "Linux" && echo "1" || echo "0")
|
|
||||||
%define isredhatfamily %(test -f /etc/redhat-release && echo "1" || echo "0")
|
|
||||||
|
|
||||||
%if %{isaix}
|
|
||||||
%define _prefix /opt/nagios
|
|
||||||
# %define _defaultdocdir %{_datadir}/doc
|
|
||||||
%else
|
|
||||||
%define _libexecdir %{_exec_prefix}/lib/nagios/plugins
|
|
||||||
%endif
|
|
||||||
%define _sysconfdir /etc/nagios
|
|
||||||
|
|
||||||
%define npusr nagios
|
|
||||||
%define nphome /opt/nagios
|
|
||||||
%define npgrp nagios
|
|
||||||
|
|
||||||
Name: monitoring-plugins
|
|
||||||
Version: @PACKAGE_VERSION@
|
|
||||||
Release: @RELEASE@
|
|
||||||
Summary: Host/service/network monitoring program plugins for Nagios and compatible
|
|
||||||
|
|
||||||
Group: Applications/System
|
|
||||||
License: GPL
|
|
||||||
URL: https://www.monitoring-plugins.org/
|
|
||||||
Source0: https://www.monitoring-plugins.org/download/%{name}-%{version}.tar.gz
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
|
|
||||||
%define npdir %{_builddir}/%{name}-%{version}
|
|
||||||
|
|
||||||
%if %{isaix}
|
|
||||||
Prefix: %{_prefix}
|
|
||||||
%else
|
|
||||||
Prefix: %{_prefix}/lib/nagios/plugins
|
|
||||||
%endif
|
|
||||||
Packager: Karl DeBisschop <kdebisschop@users.sourceforge.net>
|
|
||||||
Vendor: Monitoring Plugins Development Team
|
|
||||||
Provides: monitoring-plugins
|
|
||||||
|
|
||||||
%{!?custom:%global custom 0}
|
|
||||||
Obsoletes: monitoring-plugins-custom monitoring-plugins-extras
|
|
||||||
|
|
||||||
|
|
||||||
# Requires
|
|
||||||
%if %{isaix}
|
|
||||||
Requires: fping
|
|
||||||
Requires: gawk
|
|
||||||
Requires: net-snmp
|
|
||||||
Requires: net-snmp-perl
|
|
||||||
Requires: net-snmp-utils
|
|
||||||
Requires: openldap
|
|
||||||
Requires: openssl
|
|
||||||
Requires: perl
|
|
||||||
Requires: python
|
|
||||||
Requires: openssl
|
|
||||||
BuildRequires: fping
|
|
||||||
BuildRequires: gawk
|
|
||||||
BuildRequires: net-snmp
|
|
||||||
BuildRequires: net-snmp-perl
|
|
||||||
BuildRequires: net-snmp-utils
|
|
||||||
BuildRequires: openldap-devel
|
|
||||||
%endif
|
|
||||||
%if %{isredhatfamily}
|
|
||||||
Requires: bind-utils
|
|
||||||
Requires: coreutils
|
|
||||||
Requires: fping
|
|
||||||
Requires: gawk
|
|
||||||
Requires: grep
|
|
||||||
Requires: iputils
|
|
||||||
Requires: mysql
|
|
||||||
Requires: net-snmp-utils
|
|
||||||
Requires: ntp
|
|
||||||
Requires: openldap
|
|
||||||
Requires: openssl
|
|
||||||
Requires: openssh-clients
|
|
||||||
Requires: perl
|
|
||||||
Requires: postgresql-libs
|
|
||||||
Requires: procps
|
|
||||||
Requires: python
|
|
||||||
Requires: samba-client
|
|
||||||
Requires: shadow-utils
|
|
||||||
Requires: traceroute
|
|
||||||
Requires: /usr/bin/mailq
|
|
||||||
BuildRequires: bind-utils
|
|
||||||
BuildRequires: coreutils
|
|
||||||
BuildRequires: iputils
|
|
||||||
BuildRequires: mysql-devel
|
|
||||||
BuildRequires: net-snmp-utils
|
|
||||||
BuildRequires: net-tools
|
|
||||||
BuildRequires: ntp
|
|
||||||
BuildRequires: openldap-devel
|
|
||||||
BuildRequires: openssh-clients
|
|
||||||
BuildRequires: openssl-devel
|
|
||||||
BuildRequires: postgresql-devel
|
|
||||||
BuildRequires: procps
|
|
||||||
BuildRequires: samba-client
|
|
||||||
BuildRequires: /usr/bin/mailq
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
|
||||||
|
|
||||||
Nagios is a program that will monitor hosts and services on your
|
|
||||||
network, and to email or page you when a problem arises or is
|
|
||||||
resolved. Nagios runs on a unix server as a background or daemon
|
|
||||||
process, intermittently running checks on various services that you
|
|
||||||
specify. The actual service checks are performed by separate "plugin"
|
|
||||||
programs which return the status of the checks to the monitoring
|
|
||||||
system. This package contains those plugins.
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
|
||||||
%{?isaix: MAKE=gmake} ./configure \
|
|
||||||
--prefix=%{_prefix} \
|
|
||||||
--exec-prefix=%{_exec_prefix} \
|
|
||||||
--libexecdir=%{_libexecdir} \
|
|
||||||
--sysconfdir=%{_sysconfdir} \
|
|
||||||
--datadir=%{_datadir} \
|
|
||||||
--with-cgiurl=/nagios/cgi-bin
|
|
||||||
ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-before
|
|
||||||
ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-before
|
|
||||||
ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-before
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-after
|
|
||||||
ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-after
|
|
||||||
ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-after
|
|
||||||
|
|
||||||
%pre
|
|
||||||
# Create `nagios' group on the system if necessary
|
|
||||||
%if %{isaix}
|
|
||||||
lsgroup %{npgrp} > /dev/null 2> /dev/null
|
|
||||||
if [ $? -eq 2 ] ; then
|
|
||||||
mkgroup %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
%if %{islinux}
|
|
||||||
getent group %{npgrp} > /dev/null 2> /dev/null
|
|
||||||
if [ $? -ne 0 ] ; then
|
|
||||||
groupadd %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Create `nagios' user on the system if necessary
|
|
||||||
%if %{isaix}
|
|
||||||
lsuser %{npusr} > /dev/null 2> /dev/null
|
|
||||||
if [ $? -eq 2 ] ; then
|
|
||||||
useradd -d %{nphome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
|
|
||||||
%nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
%if %{islinux}
|
|
||||||
getent passwd %{npusr} > /dev/null 2> /dev/null
|
|
||||||
if [ $? -ne 0 ] ; then
|
|
||||||
useradd -r -d %{nshome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
|
|
||||||
%nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install
|
|
||||||
%find_lang %{name}
|
|
||||||
echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
|
|
||||||
comm -13 %{npdir}/ls-plugins-before %{npdir}/ls-plugins-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
|
|
||||||
echo "%defattr(755,root,root)" >> %{name}.lang
|
|
||||||
comm -13 %{npdir}/ls-plugins-root-before %{npdir}/ls-plugins-root-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
|
|
||||||
echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
|
|
||||||
comm -13 %{npdir}/ls-plugins-scripts-before %{npdir}/ls-plugins-scripts-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
|
|
||||||
echo "%{_libexecdir}/utils.pm" >> %{name}.lang
|
|
||||||
echo "%{_libexecdir}/utils.sh" >> %{name}.lang
|
|
||||||
echo "%{_libexecdir}/check_ldaps" >> %{name}.lang
|
|
||||||
|
|
||||||
sed -i '/libnpcommon/d' %{name}.lang
|
|
||||||
sed -i '/monitoring-plugins.mo/d' %{name}.lang
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
|
|
||||||
%files -f %{name}.lang
|
|
||||||
%config(missingok,noreplace) %{_sysconfdir}/command.cfg
|
|
||||||
%doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS
|
|
||||||
%doc ChangeLog command.cfg
|
|
||||||
%if ! %{isaix}
|
|
||||||
%{_datadir}/locale/de/LC_MESSAGES/monitoring-plugins.mo
|
|
||||||
%{_datadir}/locale/fr/LC_MESSAGES/monitoring-plugins.mo
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Mon May 23 2005 Sean Finney <seanius@seanius.net> - cvs head
|
|
||||||
- just include the nagios plugins directory, which will automatically include
|
|
||||||
all generated plugins (which keeps the build from failing on systems that
|
|
||||||
don't have all build-dependencies for every plugin)
|
|
||||||
* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
|
|
||||||
- extensive rewrite to facilitate processing into various distro-compatible specs
|
|
||||||
* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
|
|
||||||
- extensive rewrite to facilitate processing into various distro-compatible specs
|
|
|
@ -2,11 +2,11 @@ PKG="NGOSplugin"
|
||||||
NAME="monitoring-plugins"
|
NAME="monitoring-plugins"
|
||||||
DESC="Network Monitoring Plugins for Nagios and compatible"
|
DESC="Network Monitoring Plugins for Nagios and compatible"
|
||||||
ARCH="unknown"
|
ARCH="unknown"
|
||||||
VERSION="2.0,REV=2014.07.11.17.16"
|
VERSION="2.1,REV=2014.10.15.14.31"
|
||||||
CATEGORY="application"
|
CATEGORY="application"
|
||||||
VENDOR="Monitoring Plugins Development Team"
|
VENDOR="Monitoring Plugins Development Team"
|
||||||
EMAIL="devel@monitoring-plugins.org"
|
EMAIL="devel@monitoring-plugins.org"
|
||||||
PSTAMP="nag20140711171632"
|
PSTAMP="nag20141015143143"
|
||||||
BASEDIR="/"
|
BASEDIR="/"
|
||||||
CLASSES="none"
|
CLASSES="none"
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ sub print_help ();
|
||||||
sub print_usage ();
|
sub print_usage ();
|
||||||
|
|
||||||
my ($opt_c, $opt_f, $opt_w, $opt_C, $opt_W, $opt_h, $opt_V, $opt_i);
|
my ($opt_c, $opt_f, $opt_w, $opt_C, $opt_W, $opt_h, $opt_V, $opt_i);
|
||||||
my ($result, $message, $age, $size, $st);
|
my ($result, $message, $age, $size, $st, $perfdata);
|
||||||
|
|
||||||
$PROGNAME="check_file_age";
|
$PROGNAME="check_file_age";
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ unless (-e $opt_f) {
|
||||||
$st = File::stat::stat($opt_f);
|
$st = File::stat::stat($opt_f);
|
||||||
$age = time - $st->mtime;
|
$age = time - $st->mtime;
|
||||||
$size = $st->size;
|
$size = $st->size;
|
||||||
|
$perfdata = "age=${age}s;${opt_w};${opt_c} size=${size}B;${opt_W};${opt_C};0";
|
||||||
|
|
||||||
|
|
||||||
$result = 'OK';
|
$result = 'OK';
|
||||||
|
@ -103,7 +104,7 @@ elsif (($opt_w and $age > $opt_w) or ($opt_W and $size < $opt_W)) {
|
||||||
$result = 'WARNING';
|
$result = 'WARNING';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "FILE_AGE $result: $opt_f is $age seconds old and $size bytes\n";
|
print "FILE_AGE $result: $opt_f is $age seconds old and $size bytes | $perfdata\n";
|
||||||
exit $ERRORS{$result};
|
exit $ERRORS{$result};
|
||||||
|
|
||||||
sub print_usage () {
|
sub print_usage () {
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
# Added -u option (4/2003)
|
# Added -u option (4/2003)
|
||||||
# Added -M option (10/2003)
|
# Added -M option (10/2003)
|
||||||
# Added SNMPv3 support (10/2003)
|
# Added SNMPv3 support (10/2003)
|
||||||
|
# Added -n option (07/2014)
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
|
@ -95,8 +96,10 @@ my $ifXTable;
|
||||||
my $opt_h ;
|
my $opt_h ;
|
||||||
my $opt_V ;
|
my $opt_V ;
|
||||||
my $opt_u;
|
my $opt_u;
|
||||||
|
my $opt_n;
|
||||||
my $opt_x ;
|
my $opt_x ;
|
||||||
my %excluded ;
|
my %excluded ;
|
||||||
|
my %unused_names ;
|
||||||
my @unused_ports ;
|
my @unused_ports ;
|
||||||
my %session_opts;
|
my %session_opts;
|
||||||
|
|
||||||
|
@ -171,28 +174,31 @@ alarm(0);
|
||||||
foreach $key (keys %ifStatus) {
|
foreach $key (keys %ifStatus) {
|
||||||
|
|
||||||
# skip unused interfaces
|
# skip unused interfaces
|
||||||
if (!defined($ifStatus{$key}{'notInUse'})) {
|
my $ifName = $ifStatus{$key}{$snmpIfDescr};
|
||||||
|
|
||||||
|
if (!defined($ifStatus{$key}{'notInUse'}) && !grep(/^${ifName}/, @unused_ports )) {
|
||||||
# check only if interface is administratively up
|
# check only if interface is administratively up
|
||||||
if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) {
|
if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) {
|
||||||
|
#check only if interface is not excluded
|
||||||
|
if (!defined $unused_names{$ifStatus{$key}{$snmpIfDescr}} ) {
|
||||||
# check only if interface type is not listed in %excluded
|
# check only if interface type is not listed in %excluded
|
||||||
if (!defined $excluded{$ifStatus{$key}{$snmpIfType}} ) {
|
if (!defined $excluded{$ifStatus{$key}{$snmpIfType}} ) {
|
||||||
if ($ifStatus{$key}{$snmpIfOperStatus} == 1 ) { $ifup++ ; }
|
if ($ifStatus{$key}{$snmpIfOperStatus} == 1 ) { $ifup++ ; }
|
||||||
if ($ifStatus{$key}{$snmpIfOperStatus} == 2 ) {
|
if ($ifStatus{$key}{$snmpIfOperStatus} == 2 ) {
|
||||||
$ifdown++ ;
|
$ifdown++ ;
|
||||||
if (defined $ifXTable) {
|
if (defined $ifXTable) {
|
||||||
$ifmessage .= sprintf("%s: down -> %s<BR>",
|
$ifmessage .= sprintf("%s: down -> %s<BR>\n", $ifStatus{$key}{$snmpIfName}, $ifStatus{$key}{$snmpIfAlias});
|
||||||
$ifStatus{$key}{$snmpIfName},
|
|
||||||
$ifStatus{$key}{$snmpIfAlias});
|
|
||||||
}else{
|
}else{
|
||||||
$ifmessage .= sprintf("%s: down <BR>",
|
$ifmessage .= sprintf("%s: down <BR>\n",$ifStatus{$key}{$snmpIfDescr});
|
||||||
$ifStatus{$key}{$snmpIfDescr});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($ifStatus{$key}{$snmpIfOperStatus} == 5 ) { $ifdormant++ ;}
|
if ($ifStatus{$key}{$snmpIfOperStatus} == 5 ) { $ifdormant++ ;}
|
||||||
} else {
|
} else {
|
||||||
$ifexclude++;
|
$ifexclude++;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$ifunused++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
@ -221,7 +227,7 @@ foreach $key (keys %ifStatus) {
|
||||||
$ifexclude,
|
$ifexclude,
|
||||||
$ifunused);
|
$ifunused);
|
||||||
}
|
}
|
||||||
my $perfdata = sprintf("up=%d,down=%d,dormant=%d,excluded=%d,unused=%d",$ifup,$ifdown,$ifdormant,$ifexclude,$ifunused);
|
my $perfdata = sprintf("up=%d down=%d dormant=%d excluded=%d unused=%d",$ifup,$ifdown,$ifdormant,$ifexclude,$ifunused);
|
||||||
print ("$state: $answer |$perfdata\n");
|
print ("$state: $answer |$perfdata\n");
|
||||||
exit $ERRORS{$state};
|
exit $ERRORS{$state};
|
||||||
|
|
||||||
|
@ -259,6 +265,8 @@ sub print_help() {
|
||||||
printf " the descriptive name. Do not use if you don't know what this is. \n";
|
printf " the descriptive name. Do not use if you don't know what this is. \n";
|
||||||
printf " -x (--exclude) A comma separated list of ifType values that should be excluded \n";
|
printf " -x (--exclude) A comma separated list of ifType values that should be excluded \n";
|
||||||
printf " from the report (default for an empty list is PPP(23).\n";
|
printf " from the report (default for an empty list is PPP(23).\n";
|
||||||
|
printf " -n (--unused_ports_by_name) A comma separated list of ifDescr values that should be excluded \n";
|
||||||
|
printf " from the report (default is an empty exclusion list).\n";
|
||||||
printf " -u (--unused_ports) A comma separated list of ifIndex values that should be excluded \n";
|
printf " -u (--unused_ports) A comma separated list of ifIndex values that should be excluded \n";
|
||||||
printf " from the report (default is an empty exclusion list).\n";
|
printf " from the report (default is an empty exclusion list).\n";
|
||||||
printf " See the IANAifType-MIB for a list of interface types.\n";
|
printf " See the IANAifType-MIB for a list of interface types.\n";
|
||||||
|
@ -299,6 +307,7 @@ sub process_arguments() {
|
||||||
"I" => \$ifXTable, "ifmib" => \$ifXTable,
|
"I" => \$ifXTable, "ifmib" => \$ifXTable,
|
||||||
"x:s" => \$opt_x, "exclude:s" => \$opt_x,
|
"x:s" => \$opt_x, "exclude:s" => \$opt_x,
|
||||||
"u=s" => \$opt_u, "unused_ports=s" => \$opt_u,
|
"u=s" => \$opt_u, "unused_ports=s" => \$opt_u,
|
||||||
|
"n=s" => \$opt_n, "unused_ports_by_name=s" => \$opt_n,
|
||||||
"M=i" => \$maxmsgsize, "maxmsgsize=i" => \$maxmsgsize,
|
"M=i" => \$maxmsgsize, "maxmsgsize=i" => \$maxmsgsize,
|
||||||
"t=i" => \$timeout, "timeout=i" => \$timeout,
|
"t=i" => \$timeout, "timeout=i" => \$timeout,
|
||||||
);
|
);
|
||||||
|
@ -406,6 +415,16 @@ sub process_arguments() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Excluded interface descriptors
|
||||||
|
if (defined $opt_n) {
|
||||||
|
my @unused = split(/,/,$opt_n);
|
||||||
|
if ( @unused ) {
|
||||||
|
foreach $key (@unused) {
|
||||||
|
$unused_names{$key} = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Excluded interface ports (ifIndex) - management reasons
|
# Excluded interface ports (ifIndex) - management reasons
|
||||||
if ($opt_u) {
|
if ($opt_u) {
|
||||||
@unused_ports = split(/,/,$opt_u);
|
@unused_ports = split(/,/,$opt_u);
|
||||||
|
|
|
@ -58,12 +58,11 @@
|
||||||
# Paths to commands used in this script. These
|
# Paths to commands used in this script. These
|
||||||
# may have to be modified to match your system setup.
|
# may have to be modified to match your system setup.
|
||||||
|
|
||||||
PROGNAME=`/bin/basename $0`
|
PATH="@TRUSTED_PATH@"
|
||||||
|
export PATH
|
||||||
|
PROGNAME=`basename $0`
|
||||||
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||||
REVISION="@NP_VERSION@"
|
REVISION="@NP_VERSION@"
|
||||||
PATH="@TRUSTED_PATH@"
|
|
||||||
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
. $PROGPATH/utils.sh
|
. $PROGPATH/utils.sh
|
||||||
|
|
||||||
|
|
|
@ -332,7 +332,7 @@ elsif ( $mailq eq "postfix" ) {
|
||||||
}elsif ($lines[0]=~/Mail queue is empty/) {
|
}elsif ($lines[0]=~/Mail queue is empty/) {
|
||||||
$msg_q = 0;
|
$msg_q = 0;
|
||||||
}else{
|
}else{
|
||||||
print "Couldn't match $utils::PATH_TO_QMAIL_QSTAT output\n";
|
print "Couldn't match $utils::PATH_TO_MAILQ output\n";
|
||||||
exit $ERRORS{'UNKNOWN'};
|
exit $ERRORS{'UNKNOWN'};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ elsif ( $mailq eq "postfix" ) {
|
||||||
#if ($lines[1]=~/^messages in queue but not yet preprocessed: (\d+)/) {
|
#if ($lines[1]=~/^messages in queue but not yet preprocessed: (\d+)/) {
|
||||||
# my $msg_p = $1;
|
# my $msg_p = $1;
|
||||||
#}else{
|
#}else{
|
||||||
# print "Couldn't match $utils::PATH_TO_QMAIL_QSTAT output\n";
|
# print "Couldn't match $utils::PATH_TO_MAILQ output\n";
|
||||||
# exit $ERRORS{'UNKNOWN'};
|
# exit $ERRORS{'UNKNOWN'};
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,11 @@
|
||||||
# This Monitoring plugin was created to check Oracle status
|
# This Monitoring plugin was created to check Oracle status
|
||||||
#
|
#
|
||||||
|
|
||||||
|
PATH="@TRUSTED_PATH@"
|
||||||
|
export PATH
|
||||||
PROGNAME=`basename $0`
|
PROGNAME=`basename $0`
|
||||||
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||||
REVISION="@NP_VERSION@"
|
REVISION="@NP_VERSION@"
|
||||||
PATH="@TRUSTED_PATH@"
|
|
||||||
|
|
||||||
. $PROGPATH/utils.sh
|
. $PROGPATH/utils.sh
|
||||||
|
|
||||||
|
@ -137,7 +138,7 @@ case "$cmd" in
|
||||||
tnschk=` tnsping $2`
|
tnschk=` tnsping $2`
|
||||||
tnschk2=` echo $tnschk | grep -c OK`
|
tnschk2=` echo $tnschk | grep -c OK`
|
||||||
if [ ${tnschk2} -eq 1 ] ; then
|
if [ ${tnschk2} -eq 1 ] ; then
|
||||||
tnschk3=` echo $tnschk | sed -e 's/.*(//' -e 's/).*//'`
|
tnschk3=${tnschk##*(}; tnschk3=${tnschk3%)*}
|
||||||
echo "OK - reply time ${tnschk3} from $2"
|
echo "OK - reply time ${tnschk3} from $2"
|
||||||
exit $STATE_OK
|
exit $STATE_OK
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH="@TRUSTED_PATH@"
|
||||||
|
export PATH
|
||||||
PROGNAME=`basename $0`
|
PROGNAME=`basename $0`
|
||||||
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||||
REVISION="@NP_VERSION@"
|
REVISION="@NP_VERSION@"
|
||||||
PATH="@TRUSTED_PATH@"
|
|
||||||
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
. $PROGPATH/utils.sh
|
. $PROGPATH/utils.sh
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ SKIP: {
|
||||||
SKIP: {
|
SKIP: {
|
||||||
skip "no non responsive host defined", 1 if ( ! $host_nonresponsive );
|
skip "no non responsive host defined", 1 if ( ! $host_nonresponsive );
|
||||||
$res = NPTest->testCmd( "./$plugin -H $host_nonresponsive -s np_foobar ");
|
$res = NPTest->testCmd( "./$plugin -H $host_nonresponsive -s np_foobar ");
|
||||||
cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with non responsive host" );
|
cmp_ok( $res->return_code, '>=', 2, "Exit CRITICAL/UNKNOWN with non responsive host" );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,14 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More tests => 16;
|
use Test::More tests => 17;
|
||||||
use NPTest;
|
use NPTest;
|
||||||
|
|
||||||
my $successOutput = '/^FILE_AGE OK: /';
|
my $successOutput = '/^FILE_AGE OK: /';
|
||||||
my $warningOutput = '/^FILE_AGE WARNING: /';
|
my $warningOutput = '/^FILE_AGE WARNING: /';
|
||||||
my $criticalOutput = '/^FILE_AGE CRITICAL: /';
|
my $criticalOutput = '/^FILE_AGE CRITICAL: /';
|
||||||
my $unknownOutput = '/^FILE_AGE UNKNOWN: /';
|
my $unknownOutput = '/^FILE_AGE UNKNOWN: /';
|
||||||
|
my $performanceOutput = '/ \| age=[0-9]+s;[0-9]+;[0-9]+ size=[0-9]+B;[0-9]+;[0-9]+;0$/';
|
||||||
|
|
||||||
my $result;
|
my $result;
|
||||||
my $temp_file = "/tmp/check_file_age.tmp";
|
my $temp_file = "/tmp/check_file_age.tmp";
|
||||||
|
@ -57,6 +58,11 @@ $result = NPTest->testCmd(
|
||||||
);
|
);
|
||||||
cmp_ok( $result->return_code, '==', 0, "Checking file size" );
|
cmp_ok( $result->return_code, '==', 0, "Checking file size" );
|
||||||
|
|
||||||
|
$result = NPTest->testCmd(
|
||||||
|
"./check_file_age -f $temp_file -c 1000 -W 100"
|
||||||
|
);
|
||||||
|
like( $result->output, $performanceOutput, "Checking for performance Output" );
|
||||||
|
|
||||||
$result = NPTest->testCmd(
|
$result = NPTest->testCmd(
|
||||||
"./check_file_age -f /non/existent --ignore-missing"
|
"./check_file_age -f /non/existent --ignore-missing"
|
||||||
);
|
);
|
||||||
|
|
|
@ -169,7 +169,8 @@ process_arguments (int argc, char **argv)
|
||||||
{"verbose", no_argument, 0, 'v'},
|
{"verbose", no_argument, 0, 'v'},
|
||||||
{"fork", no_argument, 0, 'f'},
|
{"fork", no_argument, 0, 'f'},
|
||||||
{"timeout", required_argument, 0, 't'},
|
{"timeout", required_argument, 0, 't'},
|
||||||
{"host", required_argument, 0, 'H'},
|
{"host", required_argument, 0, 'H'}, /* backward compatibility */
|
||||||
|
{"hostname", required_argument, 0, 'H'},
|
||||||
{"port", required_argument,0,'p'},
|
{"port", required_argument,0,'p'},
|
||||||
{"output", required_argument, 0, 'O'},
|
{"output", required_argument, 0, 'O'},
|
||||||
{"name", required_argument, 0, 'n'},
|
{"name", required_argument, 0, 'n'},
|
||||||
|
|
|
@ -94,8 +94,8 @@ main (int argc, char **argv)
|
||||||
timeout_interval_dig = timeout_interval / number_tries + number_tries;
|
timeout_interval_dig = timeout_interval / number_tries + number_tries;
|
||||||
|
|
||||||
/* get the command to run */
|
/* get the command to run */
|
||||||
xasprintf (&command_line, "%s @%s -p %d %s -t %s %s %s +tries=%d +time=%d",
|
xasprintf (&command_line, "%s %s %s -p %d @%s %s %s +tries=%d +time=%d",
|
||||||
PATH_TO_DIG, dns_server, server_port, query_address, record_type, dig_args, query_transport, number_tries, timeout_interval_dig);
|
PATH_TO_DIG, dig_args, query_transport, server_port, dns_server, query_address, record_type, number_tries, timeout_interval_dig);
|
||||||
|
|
||||||
alarm (timeout_interval);
|
alarm (timeout_interval);
|
||||||
gettimeofday (&tv, NULL);
|
gettimeofday (&tv, NULL);
|
||||||
|
@ -296,6 +296,9 @@ process_arguments (int argc, char **argv)
|
||||||
dns_server = argv[c];
|
dns_server = argv[c];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if (strcmp(query_transport,"-6") == 0)
|
||||||
|
dns_server = strdup("::1");
|
||||||
|
else
|
||||||
dns_server = strdup ("127.0.0.1");
|
dns_server = strdup ("127.0.0.1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,6 +171,7 @@ main (int argc, char **argv)
|
||||||
char *details;
|
char *details;
|
||||||
char *perf;
|
char *perf;
|
||||||
char *preamble;
|
char *preamble;
|
||||||
|
char *flag_header;
|
||||||
double inode_space_pct;
|
double inode_space_pct;
|
||||||
double warning_high_tide;
|
double warning_high_tide;
|
||||||
double critical_high_tide;
|
double critical_high_tide;
|
||||||
|
@ -353,18 +354,23 @@ main (int argc, char **argv)
|
||||||
if (disk_result==STATE_OK && erronly && !verbose)
|
if (disk_result==STATE_OK && erronly && !verbose)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
xasprintf (&output, "%s %s %.0f %s (%.0f%%",
|
if(disk_result && verbose >= 1) {
|
||||||
output,
|
xasprintf(&flag_header, " %s [", state_text (disk_result));
|
||||||
|
} else {
|
||||||
|
xasprintf(&flag_header, "");
|
||||||
|
}
|
||||||
|
xasprintf (&output, "%s%s %s %.0f %s (%.0f%%",
|
||||||
|
output, flag_header,
|
||||||
(!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
|
(!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
|
||||||
path->dfree_units,
|
path->dfree_units,
|
||||||
units,
|
units,
|
||||||
path->dfree_pct);
|
path->dfree_pct);
|
||||||
if (path->dused_inodes_percent < 0) {
|
if (path->dused_inodes_percent < 0) {
|
||||||
xasprintf(&output, "%s inode=-);", output);
|
xasprintf(&output, "%s inode=-)%s;", output, (disk_result ? "]" : ""));
|
||||||
} else {
|
} else {
|
||||||
xasprintf(&output, "%s inode=%.0f%%);", output, path->dfree_inodes_percent );
|
xasprintf(&output, "%s inode=%.0f%%)%s;", output, path->dfree_inodes_percent, ((disk_result && verbose >= 1) ? "]" : ""));
|
||||||
}
|
}
|
||||||
|
free(flag_header);
|
||||||
/* TODO: Need to do a similar debug line
|
/* TODO: Need to do a similar debug line
|
||||||
xasprintf (&details, _("%s\n\
|
xasprintf (&details, _("%s\n\
|
||||||
%.0f of %.0f %s (%.0f%% inode=%.0f%%) free on %s (type %s mounted on %s) warn:%lu crit:%lu warn%%:%.0f%% crit%%:%.0f%%"),
|
%.0f of %.0f %s (%.0f%% inode=%.0f%%) free on %s (type %s mounted on %s) warn:%lu crit:%lu warn%%:%.0f%% crit%%:%.0f%%"),
|
||||||
|
|
|
@ -136,6 +136,28 @@ main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* bug ID: 2946553 - Older versions of bind will use all available dns
|
||||||
|
servers, we have to match the one specified */
|
||||||
|
if (strstr (chld_out.line[i], "Server:") && strlen(dns_server) > 0) {
|
||||||
|
temp_buffer = strchr (chld_out.line[i], ':');
|
||||||
|
temp_buffer++;
|
||||||
|
|
||||||
|
/* Strip leading tabs */
|
||||||
|
for (; *temp_buffer != '\0' && *temp_buffer == '\t'; temp_buffer++)
|
||||||
|
/* NOOP */;
|
||||||
|
|
||||||
|
strip(temp_buffer);
|
||||||
|
if (temp_buffer==NULL || strlen(temp_buffer)==0) {
|
||||||
|
die (STATE_CRITICAL,
|
||||||
|
_("DNS CRITICAL - '%s' returned empty server string\n"),
|
||||||
|
NSLOOKUP_COMMAND);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strcmp(temp_buffer, dns_server) != 0) {
|
||||||
|
die (STATE_CRITICAL, _("DNS CRITICAL - No response from DNS %s\n"), dns_server);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* the server is responding, we just got the host name... */
|
/* the server is responding, we just got the host name... */
|
||||||
if (strstr (chld_out.line[i], "Name:"))
|
if (strstr (chld_out.line[i], "Name:"))
|
||||||
parse_address = TRUE;
|
parse_address = TRUE;
|
||||||
|
|
|
@ -39,7 +39,7 @@ const char *email = "devel@monitoring-plugins.org";
|
||||||
#include "netutils.h"
|
#include "netutils.h"
|
||||||
|
|
||||||
#define DEFAULT_COMMUNITY "public"
|
#define DEFAULT_COMMUNITY "public"
|
||||||
|
#define DEFAULT_PORT "161"
|
||||||
|
|
||||||
const char *option_summary = "-H host [-C community]\n";
|
const char *option_summary = "-H host [-C community]\n";
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ void print_usage (void);
|
||||||
|
|
||||||
char *community = NULL;
|
char *community = NULL;
|
||||||
char *address = NULL;
|
char *address = NULL;
|
||||||
|
char *port = NULL;
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
|
@ -119,8 +120,8 @@ main (int argc, char **argv)
|
||||||
HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY);
|
HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY);
|
||||||
|
|
||||||
/* get the command to run */
|
/* get the command to run */
|
||||||
sprintf (command_line, "%s -OQa -m : -v 1 -c %s %s %s", PATH_TO_SNMPGET, community,
|
sprintf (command_line, "%s -OQa -m : -v 1 -c %s %s:%hd %s", PATH_TO_SNMPGET, community,
|
||||||
address, query_string);
|
address, port, query_string);
|
||||||
|
|
||||||
/* run the command */
|
/* run the command */
|
||||||
child_process = spopen (command_line);
|
child_process = spopen (command_line);
|
||||||
|
@ -313,7 +314,7 @@ process_arguments (int argc, char **argv)
|
||||||
{"community", required_argument, 0, 'C'},
|
{"community", required_argument, 0, 'C'},
|
||||||
/* {"critical", required_argument,0,'c'}, */
|
/* {"critical", required_argument,0,'c'}, */
|
||||||
/* {"warning", required_argument,0,'w'}, */
|
/* {"warning", required_argument,0,'w'}, */
|
||||||
/* {"port", required_argument,0,'P'}, */
|
{"port", required_argument,0,'p'},
|
||||||
{"version", no_argument, 0, 'V'},
|
{"version", no_argument, 0, 'V'},
|
||||||
{"help", no_argument, 0, 'h'},
|
{"help", no_argument, 0, 'h'},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
|
@ -324,7 +325,7 @@ process_arguments (int argc, char **argv)
|
||||||
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
c = getopt_long (argc, argv, "+hVH:C:", longopts, &option);
|
c = getopt_long (argc, argv, "+hVH:C:p:", longopts, &option);
|
||||||
|
|
||||||
if (c == -1 || c == EOF || c == 1)
|
if (c == -1 || c == EOF || c == 1)
|
||||||
break;
|
break;
|
||||||
|
@ -341,6 +342,12 @@ process_arguments (int argc, char **argv)
|
||||||
case 'C': /* community */
|
case 'C': /* community */
|
||||||
community = strscpy (community, optarg);
|
community = strscpy (community, optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
if (!is_intpos(optarg))
|
||||||
|
usage2 (_("Port must be a positive short integer"), optarg);
|
||||||
|
else
|
||||||
|
port = atoi(optarg);
|
||||||
|
break;
|
||||||
case 'V': /* version */
|
case 'V': /* version */
|
||||||
print_revision (progname, NP_VERSION);
|
print_revision (progname, NP_VERSION);
|
||||||
exit (STATE_OK);
|
exit (STATE_OK);
|
||||||
|
@ -369,6 +376,13 @@ process_arguments (int argc, char **argv)
|
||||||
community = strdup (DEFAULT_COMMUNITY);
|
community = strdup (DEFAULT_COMMUNITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (port == NULL) {
|
||||||
|
if (argv[c] != NULL )
|
||||||
|
port = argv[c];
|
||||||
|
else
|
||||||
|
port = atoi (DEFAULT_PORT);
|
||||||
|
}
|
||||||
|
|
||||||
return validate_arguments ();
|
return validate_arguments ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,6 +416,10 @@ print_help (void)
|
||||||
printf (" %s", _("The SNMP community name "));
|
printf (" %s", _("The SNMP community name "));
|
||||||
printf (_("(default=%s)"), DEFAULT_COMMUNITY);
|
printf (_("(default=%s)"), DEFAULT_COMMUNITY);
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
|
printf (" %s\n", "-p, --port=STRING");
|
||||||
|
printf (" %s", _("Specify the port to check "));
|
||||||
|
printf (_("(default=%s)"), DEFAULT_PORT);
|
||||||
|
printf ("\n");
|
||||||
|
|
||||||
printf (UT_SUPPORT);
|
printf (UT_SUPPORT);
|
||||||
}
|
}
|
||||||
|
@ -412,5 +430,5 @@ void
|
||||||
print_usage (void)
|
print_usage (void)
|
||||||
{
|
{
|
||||||
printf ("%s\n", _("Usage:"));
|
printf ("%s\n", _("Usage:"));
|
||||||
printf ("%s -H host [-C community]\n", progname);
|
printf ("%s -H host [-C community] [-p port]\n", progname);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ const char *email = "devel@monitoring-plugins.org";
|
||||||
#include "netutils.h"
|
#include "netutils.h"
|
||||||
|
|
||||||
#include <mysql.h>
|
#include <mysql.h>
|
||||||
|
#include <mysqld_error.h>
|
||||||
#include <errmsg.h>
|
#include <errmsg.h>
|
||||||
|
|
||||||
char *db_user = NULL;
|
char *db_user = NULL;
|
||||||
|
@ -59,6 +60,7 @@ char *opt_file = NULL;
|
||||||
char *opt_group = NULL;
|
char *opt_group = NULL;
|
||||||
unsigned int db_port = MYSQL_PORT;
|
unsigned int db_port = MYSQL_PORT;
|
||||||
int check_slave = 0, warn_sec = 0, crit_sec = 0;
|
int check_slave = 0, warn_sec = 0, crit_sec = 0;
|
||||||
|
int ignore_auth = 0;
|
||||||
int verbose = 0;
|
int verbose = 0;
|
||||||
|
|
||||||
static double warning_time = 0;
|
static double warning_time = 0;
|
||||||
|
@ -136,7 +138,16 @@ main (int argc, char **argv)
|
||||||
mysql_ssl_set(&mysql,key,cert,ca_cert,ca_dir,ciphers);
|
mysql_ssl_set(&mysql,key,cert,ca_cert,ca_dir,ciphers);
|
||||||
/* establish a connection to the server and error checking */
|
/* establish a connection to the server and error checking */
|
||||||
if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,db_socket,0)) {
|
if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,db_socket,0)) {
|
||||||
if (mysql_errno (&mysql) == CR_UNKNOWN_HOST)
|
if (ignore_auth && mysql_errno (&mysql) == ER_ACCESS_DENIED_ERROR)
|
||||||
|
{
|
||||||
|
printf("MySQL OK - Version: %s (protocol %d)\n",
|
||||||
|
mysql_get_server_info(&mysql),
|
||||||
|
mysql_get_proto_info(&mysql)
|
||||||
|
);
|
||||||
|
mysql_close (&mysql);
|
||||||
|
return STATE_OK;
|
||||||
|
}
|
||||||
|
else if (mysql_errno (&mysql) == CR_UNKNOWN_HOST)
|
||||||
die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||||
else if (mysql_errno (&mysql) == CR_VERSION_ERROR)
|
else if (mysql_errno (&mysql) == CR_VERSION_ERROR)
|
||||||
die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
die (STATE_WARNING, "%s\n", mysql_error (&mysql));
|
||||||
|
@ -341,6 +352,7 @@ process_arguments (int argc, char **argv)
|
||||||
{"critical", required_argument, 0, 'c'},
|
{"critical", required_argument, 0, 'c'},
|
||||||
{"warning", required_argument, 0, 'w'},
|
{"warning", required_argument, 0, 'w'},
|
||||||
{"check-slave", no_argument, 0, 'S'},
|
{"check-slave", no_argument, 0, 'S'},
|
||||||
|
{"ignore-auth", no_argument, 0, 'n'},
|
||||||
{"verbose", no_argument, 0, 'v'},
|
{"verbose", no_argument, 0, 'v'},
|
||||||
{"version", no_argument, 0, 'V'},
|
{"version", no_argument, 0, 'V'},
|
||||||
{"help", no_argument, 0, 'h'},
|
{"help", no_argument, 0, 'h'},
|
||||||
|
@ -357,7 +369,7 @@ process_arguments (int argc, char **argv)
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
c = getopt_long (argc, argv, "hlvVSP:p:u:d:H:s:c:w:a:k:C:D:L:f:g:", longopts, &option);
|
c = getopt_long (argc, argv, "hlvVnSP:p:u:d:H:s:c:w:a:k:C:D:L:f:g:", longopts, &option);
|
||||||
|
|
||||||
if (c == -1 || c == EOF)
|
if (c == -1 || c == EOF)
|
||||||
break;
|
break;
|
||||||
|
@ -419,6 +431,9 @@ process_arguments (int argc, char **argv)
|
||||||
case 'S':
|
case 'S':
|
||||||
check_slave = 1; /* check-slave */
|
check_slave = 1; /* check-slave */
|
||||||
break;
|
break;
|
||||||
|
case 'n':
|
||||||
|
ignore_auth = 1; /* ignore-auth */
|
||||||
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
warning = optarg;
|
warning = optarg;
|
||||||
warning_time = strtod (warning, NULL);
|
warning_time = strtod (warning, NULL);
|
||||||
|
@ -506,6 +521,9 @@ print_help (void)
|
||||||
printf (UT_EXTRA_OPTS);
|
printf (UT_EXTRA_OPTS);
|
||||||
|
|
||||||
printf (UT_HOST_PORT, 'P', myport);
|
printf (UT_HOST_PORT, 'P', myport);
|
||||||
|
printf (" %s\n", "-n, --ignore-auth");
|
||||||
|
printf (" %s\n", _("Ignore authentication failure and check for mysql connectivity only"));
|
||||||
|
|
||||||
printf (" %s\n", "-s, --socket=STRING");
|
printf (" %s\n", "-s, --socket=STRING");
|
||||||
printf (" %s\n", _("Use the specified socket (has no effect if -H is used)"));
|
printf (" %s\n", _("Use the specified socket (has no effect if -H is used)"));
|
||||||
|
|
||||||
|
|
|
@ -560,7 +560,7 @@ char *perfd_truechimers (int num_truechimers)
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]){
|
int main(int argc, char *argv[]){
|
||||||
int result, offset_result, stratum, num_truechimers;
|
int result, offset_result, stratum, num_truechimers, oresult, jresult, sresult, tresult;
|
||||||
double offset=0, jitter=0;
|
double offset=0, jitter=0;
|
||||||
char *result_line, *perfdata_line;
|
char *result_line, *perfdata_line;
|
||||||
|
|
||||||
|
@ -597,15 +597,22 @@ int main(int argc, char *argv[]){
|
||||||
result = STATE_UNKNOWN;
|
result = STATE_UNKNOWN;
|
||||||
result = max_state_alt(result, get_status(fabs(offset), offset_thresholds));
|
result = max_state_alt(result, get_status(fabs(offset), offset_thresholds));
|
||||||
}
|
}
|
||||||
|
oresult = result;
|
||||||
|
|
||||||
if(do_truechimers)
|
if(do_truechimers) {
|
||||||
result = max_state_alt(result, get_status(num_truechimers, truechimer_thresholds));
|
tresult = get_status(num_truechimers, truechimer_thresholds);
|
||||||
|
result = max_state_alt(result, tresult);
|
||||||
|
}
|
||||||
|
|
||||||
if(do_stratum)
|
if(do_stratum) {
|
||||||
result = max_state_alt(result, get_status(stratum, stratum_thresholds));
|
sresult = get_status(stratum, stratum_thresholds);
|
||||||
|
result = max_state_alt(result, sresult);
|
||||||
|
}
|
||||||
|
|
||||||
if(do_jitter)
|
if(do_jitter) {
|
||||||
result = max_state_alt(result, get_status(jitter, jitter_thresholds));
|
jresult = get_status(jitter, jitter_thresholds);
|
||||||
|
result = max_state_alt(result, jresult);
|
||||||
|
}
|
||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case STATE_CRITICAL :
|
case STATE_CRITICAL :
|
||||||
|
@ -629,20 +636,43 @@ int main(int argc, char *argv[]){
|
||||||
if(offset_result == STATE_UNKNOWN){
|
if(offset_result == STATE_UNKNOWN){
|
||||||
xasprintf(&result_line, "%s %s", result_line, _("Offset unknown"));
|
xasprintf(&result_line, "%s %s", result_line, _("Offset unknown"));
|
||||||
xasprintf(&perfdata_line, "");
|
xasprintf(&perfdata_line, "");
|
||||||
|
} else if (oresult == STATE_WARNING) {
|
||||||
|
xasprintf(&result_line, "%s %s %.10g secs (WARNING)", result_line, _("Offset"), offset);
|
||||||
|
} else if (oresult == STATE_CRITICAL) {
|
||||||
|
xasprintf(&result_line, "%s %s %.10g secs (CRITICAL)", result_line, _("Offset"), offset);
|
||||||
} else {
|
} else {
|
||||||
xasprintf(&result_line, "%s %s %.10g secs", result_line, _("Offset"), offset);
|
xasprintf(&result_line, "%s %s %.10g secs", result_line, _("Offset"), offset);
|
||||||
xasprintf(&perfdata_line, "%s", perfd_offset(offset));
|
|
||||||
}
|
}
|
||||||
|
xasprintf(&perfdata_line, "%s", perfd_offset(offset));
|
||||||
|
|
||||||
if (do_jitter) {
|
if (do_jitter) {
|
||||||
|
if (jresult == STATE_WARNING) {
|
||||||
|
xasprintf(&result_line, "%s, jitter=%f (WARNING)", result_line, jitter);
|
||||||
|
} else if (jresult == STATE_CRITICAL) {
|
||||||
|
xasprintf(&result_line, "%s, jitter=%f (CRITICAL)", result_line, jitter);
|
||||||
|
} else {
|
||||||
xasprintf(&result_line, "%s, jitter=%f", result_line, jitter);
|
xasprintf(&result_line, "%s, jitter=%f", result_line, jitter);
|
||||||
|
}
|
||||||
xasprintf(&perfdata_line, "%s %s", perfdata_line, perfd_jitter(jitter));
|
xasprintf(&perfdata_line, "%s %s", perfdata_line, perfd_jitter(jitter));
|
||||||
}
|
}
|
||||||
if (do_stratum) {
|
if (do_stratum) {
|
||||||
|
if (sresult == STATE_WARNING) {
|
||||||
|
xasprintf(&result_line, "%s, stratum=%i (WARNING)", result_line, stratum);
|
||||||
|
} else if (sresult == STATE_CRITICAL) {
|
||||||
|
xasprintf(&result_line, "%s, stratum=%i (CRITICAL)", result_line, stratum);
|
||||||
|
} else {
|
||||||
xasprintf(&result_line, "%s, stratum=%i", result_line, stratum);
|
xasprintf(&result_line, "%s, stratum=%i", result_line, stratum);
|
||||||
|
}
|
||||||
xasprintf(&perfdata_line, "%s %s", perfdata_line, perfd_stratum(stratum));
|
xasprintf(&perfdata_line, "%s %s", perfdata_line, perfd_stratum(stratum));
|
||||||
}
|
}
|
||||||
if (do_truechimers) {
|
if (do_truechimers) {
|
||||||
|
if (tresult == STATE_WARNING) {
|
||||||
|
xasprintf(&result_line, "%s, truechimers=%i (WARNING)", result_line, num_truechimers);
|
||||||
|
} else if (tresult == STATE_CRITICAL) {
|
||||||
|
xasprintf(&result_line, "%s, truechimers=%i (CRITICAL)", result_line, num_truechimers);
|
||||||
|
} else {
|
||||||
xasprintf(&result_line, "%s, truechimers=%i", result_line, num_truechimers);
|
xasprintf(&result_line, "%s, truechimers=%i", result_line, num_truechimers);
|
||||||
|
}
|
||||||
xasprintf(&perfdata_line, "%s %s", perfdata_line, perfd_truechimers(num_truechimers));
|
xasprintf(&perfdata_line, "%s %s", perfdata_line, perfd_truechimers(num_truechimers));
|
||||||
}
|
}
|
||||||
printf("%s|%s\n", result_line, perfdata_line);
|
printf("%s|%s\n", result_line, perfdata_line);
|
||||||
|
@ -651,8 +681,6 @@ int main(int argc, char *argv[]){
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void print_help(void){
|
void print_help(void){
|
||||||
print_revision(progname, NP_VERSION);
|
print_revision(progname, NP_VERSION);
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ static int verbose=0;
|
||||||
static int quiet=0;
|
static int quiet=0;
|
||||||
static char *owarn="60";
|
static char *owarn="60";
|
||||||
static char *ocrit="120";
|
static char *ocrit="120";
|
||||||
|
static int time_offset=0;
|
||||||
|
|
||||||
int process_arguments (int, char **);
|
int process_arguments (int, char **);
|
||||||
thresholds *offset_thresholds = NULL;
|
thresholds *offset_thresholds = NULL;
|
||||||
|
@ -400,7 +401,7 @@ double offset_request(const char *host, int *status){
|
||||||
gettimeofday(&recv_time, NULL);
|
gettimeofday(&recv_time, NULL);
|
||||||
DBG(print_ntp_message(&req[i]));
|
DBG(print_ntp_message(&req[i]));
|
||||||
respnum=servers[i].num_responses++;
|
respnum=servers[i].num_responses++;
|
||||||
servers[i].offset[respnum]=calc_offset(&req[i], &recv_time);
|
servers[i].offset[respnum]=calc_offset(&req[i], &recv_time)+time_offset;
|
||||||
if(verbose) {
|
if(verbose) {
|
||||||
printf("offset %.10g\n", servers[i].offset[respnum]);
|
printf("offset %.10g\n", servers[i].offset[respnum]);
|
||||||
}
|
}
|
||||||
|
@ -455,6 +456,7 @@ int process_arguments(int argc, char **argv){
|
||||||
{"use-ipv4", no_argument, 0, '4'},
|
{"use-ipv4", no_argument, 0, '4'},
|
||||||
{"use-ipv6", no_argument, 0, '6'},
|
{"use-ipv6", no_argument, 0, '6'},
|
||||||
{"quiet", no_argument, 0, 'q'},
|
{"quiet", no_argument, 0, 'q'},
|
||||||
|
{"time-offset", optional_argument, 0, 'o'},
|
||||||
{"warning", required_argument, 0, 'w'},
|
{"warning", required_argument, 0, 'w'},
|
||||||
{"critical", required_argument, 0, 'c'},
|
{"critical", required_argument, 0, 'c'},
|
||||||
{"timeout", required_argument, 0, 't'},
|
{"timeout", required_argument, 0, 't'},
|
||||||
|
@ -468,7 +470,7 @@ int process_arguments(int argc, char **argv){
|
||||||
usage ("\n");
|
usage ("\n");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
c = getopt_long (argc, argv, "Vhv46qw:c:t:H:p:", longopts, &option);
|
c = getopt_long (argc, argv, "Vhv46qw:c:t:H:p:o:", longopts, &option);
|
||||||
if (c == -1 || c == EOF || c == 1)
|
if (c == -1 || c == EOF || c == 1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -504,6 +506,9 @@ int process_arguments(int argc, char **argv){
|
||||||
case 't':
|
case 't':
|
||||||
socket_timeout=atoi(optarg);
|
socket_timeout=atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'o':
|
||||||
|
time_offset=atoi(optarg);
|
||||||
|
break;
|
||||||
case '4':
|
case '4':
|
||||||
address_family = AF_INET;
|
address_family = AF_INET;
|
||||||
break;
|
break;
|
||||||
|
@ -616,6 +621,8 @@ void print_help(void){
|
||||||
printf (" %s\n", _("Offset to result in warning status (seconds)"));
|
printf (" %s\n", _("Offset to result in warning status (seconds)"));
|
||||||
printf (" %s\n", "-c, --critical=THRESHOLD");
|
printf (" %s\n", "-c, --critical=THRESHOLD");
|
||||||
printf (" %s\n", _("Offset to result in critical status (seconds)"));
|
printf (" %s\n", _("Offset to result in critical status (seconds)"));
|
||||||
|
printf (" %s\n", "-o, --time_offset=INTEGER");
|
||||||
|
printf (" %s\n", _("Expected offset of the ntp server relative to local server (seconds)"));
|
||||||
printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
|
printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
|
||||||
printf (UT_VERBOSE);
|
printf (UT_VERBOSE);
|
||||||
|
|
||||||
|
@ -628,6 +635,8 @@ void print_help(void){
|
||||||
printf("%s\n", _("Notes:"));
|
printf("%s\n", _("Notes:"));
|
||||||
printf(" %s\n", _("If you'd rather want to monitor an NTP server, please use"));
|
printf(" %s\n", _("If you'd rather want to monitor an NTP server, please use"));
|
||||||
printf(" %s\n", _("check_ntp_peer."));
|
printf(" %s\n", _("check_ntp_peer."));
|
||||||
|
printf(" %s\n", _("--time-offset is usefull for compensating for servers with known"));
|
||||||
|
printf(" %s\n", _("and expected clock skew."));
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(UT_THRESHOLDS_NOTES);
|
printf(UT_THRESHOLDS_NOTES);
|
||||||
|
|
||||||
|
@ -642,6 +651,6 @@ void
|
||||||
print_usage(void)
|
print_usage(void)
|
||||||
{
|
{
|
||||||
printf ("%s\n", _("Usage:"));
|
printf ("%s\n", _("Usage:"));
|
||||||
printf(" %s -H <host> [-4|-6] [-w <warn>] [-c <crit>] [-v verbose]\n", progname);
|
printf(" %s -H <host> [-4|-6] [-w <warn>] [-c <crit>] [-v verbose] [-o <time offset>]\n", progname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
else if (!strncmp(SERVICE, "JABBER", 6)) {
|
else if (!strncmp(SERVICE, "JABBER", 6)) {
|
||||||
SEND = "<stream:stream to=\'host\' xmlns=\'jabber:client\' xmlns:stream=\'http://etherx.jabber.org/streams\'>\n";
|
SEND = "<stream:stream to=\'host\' xmlns=\'jabber:client\' xmlns:stream=\'http://etherx.jabber.org/streams\'>\n";
|
||||||
EXPECT = "<?xml version=\'1.0\'?><stream:stream xmlns=\'jabber:client\' xmlns:stream=\'http://etherx.jabber.org/streams\'";
|
EXPECT = "<?xml version=\'1.0\'";
|
||||||
QUIT = "</stream:stream>\n";
|
QUIT = "</stream:stream>\n";
|
||||||
flags |= FLAG_HIDE_OUTPUT;
|
flags |= FLAG_HIDE_OUTPUT;
|
||||||
PORT = 5222;
|
PORT = 5222;
|
||||||
|
|
|
@ -167,11 +167,12 @@ np_net_connect (const char *host_name, int port, int *sd, int proto)
|
||||||
char port_str[6], host[MAX_HOST_ADDRESS_LENGTH];
|
char port_str[6], host[MAX_HOST_ADDRESS_LENGTH];
|
||||||
size_t len;
|
size_t len;
|
||||||
int socktype, result;
|
int socktype, result;
|
||||||
|
short is_socket = (host_name[0] == '/');
|
||||||
|
|
||||||
socktype = (proto == IPPROTO_UDP) ? SOCK_DGRAM : SOCK_STREAM;
|
socktype = (proto == IPPROTO_UDP) ? SOCK_DGRAM : SOCK_STREAM;
|
||||||
|
|
||||||
/* as long as it doesn't start with a '/', it's assumed a host or ip */
|
/* as long as it doesn't start with a '/', it's assumed a host or ip */
|
||||||
if(host_name[0] != '/'){
|
if (!is_socket){
|
||||||
memset (&hints, 0, sizeof (hints));
|
memset (&hints, 0, sizeof (hints));
|
||||||
hints.ai_family = address_family;
|
hints.ai_family = address_family;
|
||||||
hints.ai_protocol = proto;
|
hints.ai_protocol = proto;
|
||||||
|
@ -253,7 +254,11 @@ np_net_connect (const char *host_name, int port, int *sd, int proto)
|
||||||
return econn_refuse_state;
|
return econn_refuse_state;
|
||||||
break;
|
break;
|
||||||
case STATE_CRITICAL: /* user did not set econn_refuse_state */
|
case STATE_CRITICAL: /* user did not set econn_refuse_state */
|
||||||
printf ("%s\n", strerror(errno));
|
if (is_socket)
|
||||||
|
printf("connect to file socket %s: %s\n", host_name, strerror(errno));
|
||||||
|
else
|
||||||
|
printf("connect to address %s and port %d: %s\n",
|
||||||
|
host_name, port, strerror(errno));
|
||||||
return econn_refuse_state;
|
return econn_refuse_state;
|
||||||
break;
|
break;
|
||||||
default: /* it's a logic error if we do not end up in STATE_(OK|WARNING|CRITICAL) */
|
default: /* it's a logic error if we do not end up in STATE_(OK|WARNING|CRITICAL) */
|
||||||
|
@ -262,7 +267,11 @@ np_net_connect (const char *host_name, int port, int *sd, int proto)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf ("%s\n", strerror(errno));
|
if (is_socket)
|
||||||
|
printf("connect to file socket %s: %s\n", host_name, strerror(errno));
|
||||||
|
else
|
||||||
|
printf("connect to address %s and port %d: %s\n",
|
||||||
|
host_name, port, strerror(errno));
|
||||||
return STATE_CRITICAL;
|
return STATE_CRITICAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,8 @@ int np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit){
|
||||||
struct tm stamp;
|
struct tm stamp;
|
||||||
float time_left;
|
float time_left;
|
||||||
int days_left;
|
int days_left;
|
||||||
char timestamp[17] = "";
|
char timestamp[50] = "";
|
||||||
|
time_t tm_t;
|
||||||
|
|
||||||
certificate=SSL_get_peer_certificate(s);
|
certificate=SSL_get_peer_certificate(s);
|
||||||
if (!certificate) {
|
if (!certificate) {
|
||||||
|
@ -211,10 +212,8 @@ int np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit){
|
||||||
|
|
||||||
time_left = difftime(timegm(&stamp), time(NULL));
|
time_left = difftime(timegm(&stamp), time(NULL));
|
||||||
days_left = time_left / 86400;
|
days_left = time_left / 86400;
|
||||||
snprintf
|
tm_t = mktime (&stamp);
|
||||||
(timestamp, 17, "%02d/%02d/%04d %02d:%02d",
|
strftime(timestamp, 50, "%c", localtime(&tm_t));
|
||||||
stamp.tm_mon + 1,
|
|
||||||
stamp.tm_mday, stamp.tm_year + 1900, stamp.tm_hour, stamp.tm_min);
|
|
||||||
|
|
||||||
if (days_left > 0 && days_left <= days_till_exp_warn) {
|
if (days_left > 0 && days_left <= days_till_exp_warn) {
|
||||||
printf (_("%s - Certificate '%s' expires in %d day(s) (%s).\n"), (days_left>days_till_exp_crit)?"WARNING":"CRITICAL", cn, days_left, timestamp);
|
printf (_("%s - Certificate '%s' expires in %d day(s) (%s).\n"), (days_left>days_till_exp_crit)?"WARNING":"CRITICAL", cn, days_left, timestamp);
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
'NP_HOST_SNMP' => '',
|
'NP_HOST_SNMP' => '',
|
||||||
'NP_HOST_TCP_FTP' => '',
|
'NP_HOST_TCP_FTP' => '',
|
||||||
'NP_HOST_TCP_HPJD' => '',
|
'NP_HOST_TCP_HPJD' => '',
|
||||||
|
'NP_HOST_HPJD_PORT_INVALID' => '161',
|
||||||
|
'NP_HOST_HPJD_PORT_VALID' => '',
|
||||||
'NP_HOST_TCP_HTTP' => 'localhost',
|
'NP_HOST_TCP_HTTP' => 'localhost',
|
||||||
'NP_HOST_TCP_HTTP2' => 'labs.consol.de',
|
'NP_HOST_TCP_HTTP2' => 'labs.consol.de',
|
||||||
'NP_HOST_TCP_IMAP' => 'imap.web.de',
|
'NP_HOST_TCP_IMAP' => 'imap.web.de',
|
||||||
|
|
|
@ -10,7 +10,7 @@ use NPTest;
|
||||||
|
|
||||||
plan skip_all => "check_dns not compiled" unless (-x "check_dns");
|
plan skip_all => "check_dns not compiled" unless (-x "check_dns");
|
||||||
|
|
||||||
plan tests => 14;
|
plan tests => 16;
|
||||||
|
|
||||||
my $successOutput = '/DNS OK: [\.0-9]+ seconds? response time/';
|
my $successOutput = '/DNS OK: [\.0-9]+ seconds? response time/';
|
||||||
|
|
||||||
|
@ -43,6 +43,12 @@ my $dns_server = getTestParameter(
|
||||||
"A non default (remote) DNS server",
|
"A non default (remote) DNS server",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my $host_nonresponsive = getTestParameter(
|
||||||
|
"NP_HOST_NONRESPONSIVE",
|
||||||
|
"The hostname of system not responsive to network requests",
|
||||||
|
"10.0.0.1",
|
||||||
|
);
|
||||||
|
|
||||||
my $res;
|
my $res;
|
||||||
|
|
||||||
$res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5");
|
$res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5");
|
||||||
|
@ -54,7 +60,7 @@ cmp_ok( $res->return_code, '==', 2, "Critical threshold passed");
|
||||||
|
|
||||||
$res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5 -w 0 -c 5");
|
$res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5 -w 0 -c 5");
|
||||||
cmp_ok( $res->return_code, '==', 1, "Warning threshold passed");
|
cmp_ok( $res->return_code, '==', 1, "Warning threshold passed");
|
||||||
like( $res->output, "/\|time=[\d\.]+s;0.0*;5\.0*;0\.0*/", "Output performance data OK" );
|
like( $res->output, '/\|time=[\d\.]+s;0.0*;5\.0*;0\.0*/', "Output performance data OK" );
|
||||||
|
|
||||||
$res = NPTest->testCmd("./check_dns -H $hostname_invalid -t 1");
|
$res = NPTest->testCmd("./check_dns -H $hostname_invalid -t 1");
|
||||||
cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid");
|
cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid");
|
||||||
|
@ -66,6 +72,10 @@ like ( $res->output, $successOutput, "Output OK" );
|
||||||
$res = NPTest->testCmd("./check_dns -H $hostname_invalid -s $dns_server -t 1");
|
$res = NPTest->testCmd("./check_dns -H $hostname_invalid -s $dns_server -t 1");
|
||||||
cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid on $dns_server");
|
cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid on $dns_server");
|
||||||
|
|
||||||
|
$res = NPTest->testCmd("./check_dns -H $hostname_valid -a $hostname_valid_ip -s $host_nonresponsive -t 2");
|
||||||
|
cmp_ok( $res->return_code, '==', 2, "Got no answer from unresponsive server");
|
||||||
|
like ( $res->output, "/CRITICAL - /", "Output OK");
|
||||||
|
|
||||||
$res = NPTest->testCmd("./check_dns -H $hostname_valid -a $hostname_valid_ip -t 5");
|
$res = NPTest->testCmd("./check_dns -H $hostname_valid -a $hostname_valid_ip -t 5");
|
||||||
cmp_ok( $res->return_code, '==', 0, "Got expected address");
|
cmp_ok( $res->return_code, '==', 0, "Got expected address");
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ use NPTest;
|
||||||
|
|
||||||
plan skip_all => "check_hpjd not compiled" unless (-x "check_hpjd");
|
plan skip_all => "check_hpjd not compiled" unless (-x "check_hpjd");
|
||||||
|
|
||||||
plan tests => 5;
|
|
||||||
|
|
||||||
my $successOutput = '/^Printer ok - /';
|
my $successOutput = '/^Printer ok - /';
|
||||||
my $failureOutput = '/Timeout: No [Rr]esponse from /';
|
my $failureOutput = '/Timeout: No [Rr]esponse from /';
|
||||||
|
@ -20,31 +19,53 @@ my $host_tcp_hpjd = getTestParameter(
|
||||||
"A host (usually a printer) providing the HP-JetDirect Services"
|
"A host (usually a printer) providing the HP-JetDirect Services"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my $host_hpjd_port_invalid = getTestParameter(
|
||||||
|
"NP_HOST_HPJD_PORT_INVALID",
|
||||||
|
"A port that HP-JetDirect Services is not listening on",
|
||||||
|
"162"
|
||||||
|
);
|
||||||
|
|
||||||
|
my $host_hpjd_port_valid = getTestParameter(
|
||||||
|
"NP_HOST_HPJD_PORT_VALID",
|
||||||
|
"The port that HP-JetDirect Services is currently listening on",
|
||||||
|
"161"
|
||||||
|
);
|
||||||
|
|
||||||
my $host_nonresponsive = getTestParameter(
|
my $host_nonresponsive = getTestParameter(
|
||||||
"NP_HOST_NONRESPONSIVE",
|
"NP_HOST_NONRESPONSIVE",
|
||||||
"The hostname of system not responsive to network requests",
|
"The hostname of system not responsive to network requests",
|
||||||
"10.0.0.1",
|
"10.0.0.1"
|
||||||
);
|
);
|
||||||
|
|
||||||
my $hostname_invalid = getTestParameter(
|
my $hostname_invalid = getTestParameter(
|
||||||
"NP_HOSTNAME_INVALID",
|
"NP_HOSTNAME_INVALID",
|
||||||
"An invalid (not known to DNS) hostname",
|
"An invalid (not known to DNS) hostname",
|
||||||
"nosuchhost",
|
"nosuchhost"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my $tests = $host_tcp_hpjd ? 9 : 5;
|
||||||
|
plan tests => $tests;
|
||||||
my $res;
|
my $res;
|
||||||
|
|
||||||
SKIP: {
|
SKIP: {
|
||||||
skip "No HP JetDirect defined", 2 unless $host_tcp_hpjd;
|
skip "No HP JetDirect defined", 2 unless $host_tcp_hpjd;
|
||||||
$res = NPTest->testCmd("./check_hpjd $host_tcp_hpjd");
|
$res = NPTest->testCmd("./check_hpjd -H $host_tcp_hpjd");
|
||||||
cmp_ok( $res->return_code, '==', 0, "Jetdirect responding" );
|
cmp_ok( $res->return_code, 'eq', 0, "Jetdirect responding" );
|
||||||
like ( $res->output, $successOutput, "Output correct" );
|
like ( $res->output, $successOutput, "Output correct" );
|
||||||
|
|
||||||
|
$res = NPTest->testCmd("./check_hpjd -H $host_tcp_hpjd -p $host_hpjd_port_valid");
|
||||||
|
cmp_ok( $res->return_code, 'eq', 0, "Jetdirect responding on port $host_hpjd_port_valid" );
|
||||||
|
like ( $res->output, $successOutput, "Output correct" );
|
||||||
|
|
||||||
|
$res = NPTest->testCmd("./check_hpjd -H $host_tcp_hpjd -p $host_hpjd_port_invalid");
|
||||||
|
cmp_ok( $res->return_code, 'eq', 2, "Jetdirect not responding on port $host_hpjd_port_invalid" );
|
||||||
|
like ( $res->output, $failureOutput, "Output correct" );
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = NPTest->testCmd("./check_hpjd $host_nonresponsive");
|
$res = NPTest->testCmd("./check_hpjd -H $host_nonresponsive");
|
||||||
cmp_ok( $res->return_code, 'eq', 2, "Host not responding");
|
cmp_ok( $res->return_code, 'eq', 2, "Host not responding");
|
||||||
like ( $res->output, $failureOutput, "Output OK" );
|
like ( $res->output, $failureOutput, "Output OK" );
|
||||||
|
|
||||||
$res = NPTest->testCmd("./check_hpjd $hostname_invalid");
|
$res = NPTest->testCmd("./check_hpjd -H $hostname_invalid");
|
||||||
cmp_ok( $res->return_code, 'eq', 3, "Hostname invalid");
|
cmp_ok( $res->return_code, 'eq', 3, "Hostname invalid");
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@ my $ntp_okmatch1 = '/^NTP\sOK:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs/'
|
||||||
my $ntp_warnmatch1 = '/^NTP\sWARNING:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs/';
|
my $ntp_warnmatch1 = '/^NTP\sWARNING:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs/';
|
||||||
my $ntp_critmatch1 = '/^NTP\sCRITICAL:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs/';
|
my $ntp_critmatch1 = '/^NTP\sCRITICAL:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs/';
|
||||||
my $ntp_okmatch2 = '/^NTP\sOK:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs,\sjitter=[0-9]+\.[0-9]+,\sstratum=[0-9]{1,2},\struechimers=[0-9]+/';
|
my $ntp_okmatch2 = '/^NTP\sOK:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs,\sjitter=[0-9]+\.[0-9]+,\sstratum=[0-9]{1,2},\struechimers=[0-9]+/';
|
||||||
my $ntp_warnmatch2 = '/^NTP\sWARNING:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs,\sjitter=[0-9]+\.[0-9]+,\sstratum=[0-9]{1,2},\struechimers=[0-9]+/';
|
my $ntp_warnmatch2 = '/^NTP\sWARNING:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs,\sjitter=[0-9]+\.[0-9]+,\sstratum=[0-9]{1,2}\s\(WARNING\),\struechimers=[0-9]+/';
|
||||||
my $ntp_critmatch2 = '/^NTP\sCRITICAL:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs,\sjitter=[0-9]+\.[0-9]+,\sstratum=[0-9]{1,2},\struechimers=[0-9]+/';
|
my $ntp_critmatch2 = '/^NTP\sCRITICAL:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs,\sjitter=[0-9]+\.[0-9]+\s\(CRITICAL\),\sstratum=[0-9]{1,2},\struechimers=[0-9]+/';
|
||||||
my $ntp_noresponse = '/^(CRITICAL - Socket timeout after 3 seconds)|(NTP CRITICAL: No response from NTP server)$/';
|
my $ntp_noresponse = '/^(CRITICAL - Socket timeout after 3 seconds)|(NTP CRITICAL: No response from NTP server)$/';
|
||||||
my $ntp_nosuchhost = '/^check_ntp.*: Invalid hostname/address - ' . $hostname_invalid . '/';
|
my $ntp_nosuchhost = '/^check_ntp.*: Invalid hostname/address - ' . $hostname_invalid . '/';
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
use Test::More;
|
||||||
|
use Cwd;
|
||||||
use NPTest;
|
use NPTest;
|
||||||
|
|
||||||
# 15 tests in the first part, 9 in timeout tests and 2 * 32 in the last loops
|
# 15 tests in the first part, 9 in timeout tests and 2 * 32 in the last loops
|
||||||
|
@ -13,7 +14,7 @@ plan tests => 88;
|
||||||
|
|
||||||
my $res;
|
my $res;
|
||||||
|
|
||||||
my $PWD = $ENV{PWD};
|
my $PWD = getcwd();
|
||||||
|
|
||||||
$res = NPTest->testCmd( "./negate" );
|
$res = NPTest->testCmd( "./negate" );
|
||||||
is( $res->return_code, 3, "Not enough parameters");
|
is( $res->return_code, 3, "Not enough parameters");
|
||||||
|
@ -50,7 +51,7 @@ is( $res->output, "OK: a dummy okay", "The quoted string is passed through to su
|
||||||
$res = NPTest->testCmd( "./negate '$PWD/check_dummy 0' 'a dummy okay'" );
|
$res = NPTest->testCmd( "./negate '$PWD/check_dummy 0' 'a dummy okay'" );
|
||||||
is( $res->output, "No data returned from command", "Bad command, as expected (trying to execute './check_dummy 0')");
|
is( $res->output, "No data returned from command", "Bad command, as expected (trying to execute './check_dummy 0')");
|
||||||
|
|
||||||
$res = NPTest->testCmd( './negate $PWD/check_dummy 0 \'$$ a dummy okay\'' );
|
$res = NPTest->testCmd( './negate '.$PWD.'/check_dummy 0 \'$$ a dummy okay\'' );
|
||||||
is( $res->output, 'OK: $$ a dummy okay', 'Proves that $$ is not being expanded again' );
|
is( $res->output, 'OK: $$ a dummy okay', 'Proves that $$ is not being expanded again' );
|
||||||
|
|
||||||
my %state = (
|
my %state = (
|
||||||
|
|
|
@ -186,21 +186,21 @@ SKIP: {
|
||||||
|
|
||||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 14" );
|
$result = NPTest->testCmd( "$command -p $port_https -S -C 14" );
|
||||||
is( $result->return_code, 0, "$command -p $port_https -S -C 14" );
|
is( $result->return_code, 0, "$command -p $port_https -S -C 14" );
|
||||||
is( $result->output, 'OK - Certificate \'Ton Voon\' will expire on 03/03/2019 21:41.', "output ok" );
|
is( $result->output, 'OK - Certificate \'Ton Voon\' will expire on Sun Mar 3 21:41:00 2019.', "output ok" );
|
||||||
|
|
||||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 14000" );
|
$result = NPTest->testCmd( "$command -p $port_https -S -C 14000" );
|
||||||
is( $result->return_code, 1, "$command -p $port_https -S -C 14000" );
|
is( $result->return_code, 1, "$command -p $port_https -S -C 14000" );
|
||||||
like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" );
|
like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:00 2019\)./', "output ok" );
|
||||||
|
|
||||||
# Expired cert tests
|
# Expired cert tests
|
||||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" );
|
$result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" );
|
||||||
is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" );
|
is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" );
|
||||||
like( $result->output, '/CRITICAL - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" );
|
like( $result->output, '/CRITICAL - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:00 2019\)./', "output ok" );
|
||||||
|
|
||||||
$result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" );
|
$result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" );
|
||||||
is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" );
|
is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" );
|
||||||
is( $result->output,
|
is( $result->output,
|
||||||
'CRITICAL - Certificate \'Ton Voon\' expired on 03/05/2009 00:13.',
|
'CRITICAL - Certificate \'Ton Voon\' expired on Thu Mar 5 00:13:00 2009.',
|
||||||
"output ok" );
|
"output ok" );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,16 @@ if ($@) {
|
||||||
plan skip_all => "Missing required module for test: $@";
|
plan skip_all => "Missing required module for test: $@";
|
||||||
} else {
|
} else {
|
||||||
if (-x "./check_snmp") {
|
if (-x "./check_snmp") {
|
||||||
|
# check if snmpd has perl support
|
||||||
|
my $test = `snmpd -c tests/conf/snmpd.conf -C -r -H 2>&1`;
|
||||||
|
if(!defined $test) {
|
||||||
|
plan skip_all => "snmpd required";
|
||||||
|
}
|
||||||
|
elsif($test =~ m/Warning: Unknown token: perl/) {
|
||||||
|
plan skip_all => "snmpd has no perl support";
|
||||||
|
} else {
|
||||||
plan tests => $tests;
|
plan tests => $tests;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
plan skip_all => "No check_snmp compiled";
|
plan skip_all => "No check_snmp compiled";
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -9,6 +9,8 @@ use Getopt::Long;
|
||||||
|
|
||||||
use NPTest qw(DetermineTestHarnessDirectory TestsFrom);
|
use NPTest qw(DetermineTestHarnessDirectory TestsFrom);
|
||||||
|
|
||||||
|
$ENV{LC_ALL} = 'C';
|
||||||
|
|
||||||
my @tstdir;
|
my @tstdir;
|
||||||
|
|
||||||
if ( ! GetOptions( "testdir:s" => \@tstdir ) )
|
if ( ! GetOptions( "testdir:s" => \@tstdir ) )
|
||||||
|
|
Loading…
Reference in a new issue