Bernd Arnold
6a8564fb44
Fixed error message, added comment
2018-06-17 09:42:25 +02:00
Bernd Arnold
37f9b45266
Drop uptime binary call
...
No need to call /bin/uptime, since the string can be generated with strftime(...).
2018-06-17 09:36:13 +02:00
Bernd Arnold
28f4d144f2
Added help text for range support
2018-06-17 09:20:16 +02:00
Bernd Arnold
b40d660bb3
Remove useless (empty) print
2018-06-17 09:19:55 +02:00
Sven Nierlein
0b9c85109b
fix typo in check_uptime
2018-06-13 20:23:21 +02:00
Sven Nierlein
ae7c16306c
add check_uptime to makefile
2018-06-13 20:23:07 +02:00
Bernd Arnold
cf157ef845
Refactoring
...
Better alignment.
Avoid duplications ("Exceeds ... threshold").
2018-06-13 17:28:53 +02:00
Bernd Arnold
558090a7d8
Added tests for range values
2018-06-13 17:26:51 +02:00
Bernd Arnold
db499b6f5b
Introducing ranges for warning and critical
...
Works as before:
-w 1w -c 2w
New (as before, but also warn if uptime < 5m, and crit if uptime < 2m):
-w 5m:1w -c 2m:2w
(idea by @sni)
Also refactored the time calculation, if a suffix is present:
New sub calc_as_seconds($)
2018-06-13 16:56:22 +02:00
Bernd Arnold
a784b19d6f
Modified alignment
2018-06-13 16:10:17 +02:00
Bernd Arnold
9ee884b3de
Fix: Use macro for perl binary
...
I've messed that up in the previous commit 554b702f9d .
2018-06-13 15:57:16 +02:00
Bernd Arnold
5a73671ec6
Fix: Initialize values
...
Otherwise, there's a warning about unitialized values:
Use of uninitialized value $hours in numeric gt (>) at ...
Use of uninitialized value $days in numeric gt (>) at ...
2018-06-09 10:02:23 +02:00
Bernd Arnold
554b702f9d
Fix: uptime_file variable was declared too late
...
When called with --help, the following error was shown:
Use of uninitialized value $uptime_file in concatenation (.) or string at
2018-06-03 20:55:42 +02:00
Bernd Arnold
250adb31ef
Added test file
2018-06-03 16:51:43 +02:00
Bernd Arnold
d5fbf8ae93
Added suffix "s" for seconds in perfdata output
2018-06-03 16:42:34 +02:00
Bernd Arnold
44816b4979
Rename to .pl
...
All other check script also have the .pl ending
2018-06-03 16:05:54 +02:00
Bernd Arnold
de0872e2d7
Replaced my values with macros
2018-05-30 19:11:06 +02:00
Bernd Arnold
96c8dd8935
My version of check_uptime
...
Derived from check_mailq
2018-05-30 19:03:43 +02:00
Sven Nierlein
3b86c201a7
Merge pull request #1461 from philipowen/file-size-lessthan
...
Enable check_file_age to test for maximum file size
2017-04-20 16:28:15 +02:00
phowen
d332ee1fa0
resolve issues from code review
2017-04-05 10:27:37 +01:00
Sven Nierlein
4acddec00a
script tests: fix relative lib path in utils test
...
utils.pm uses relative include ".." but the path is relativ to the current folder, so it
does not work when running "perl t/utils.t". Just add another lib of "." fixes that. We could
use FindBin but we don't want to make it unnecessarily complicated.
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-13 13:27:03 +01:00
Sven Nierlein
3b962208e7
fix timeout issue with check_disk_smb
...
check_disk_smb hangs if the smbclient is still running. So send a sigint to all
childs and exit cleanly.
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12 22:55:52 +01:00
phowen
98a365d76c
add range checking to check_file_age
2017-02-14 15:19:18 +00:00
Oliver Skibbe
099bd86f1c
Merge pull request #1376 from riskersen/check_mssql
...
check_mssql.pl: switched alarm timeout
2016-11-19 16:37:27 +01:00
Jan Wagner
1723a3c761
It's useful to use 'useful' instead of 'usefull'
2016-11-18 11:47:20 +01:00
Bernd Apfel
223c594661
check_mssql.pl: switched alarm timeout
...
- alarm() now uses -t option
contributed by Bernd Arnold (wopfel@gmail.com )
closes #991
2015-10-15 11:20:20 +02:00
Jan Wagner
dbd38bf7ec
plugins-scripts/Makefile.am: Testing shell scripts with 'sh -n'
2015-10-05 11:07:19 +02:00
Jan Wagner
2369338191
plugins-scripts/Makefile.am: Cosmetical changes
2015-10-05 09:59:50 +02:00
Holger Weiss
8b2a2b1f4a
Merge branch 'pr/1364'
...
* pr/1364:
check_ntp.pl: Droping this superseded plugin
Conflicts:
NEWS
plugins-scripts/check_ntp.pl
2015-10-04 23:48:28 +02:00
Holger Weiss
3f17f18416
Merge branch 'pr/1363'
...
* pr/1363:
use unknown exit code for help/version in plugins-root as well
use unknown exit code for help/version in plugins
change exit code to unknown on help and version info
use exit code 3 for version and help
2015-10-04 23:42:41 +02:00
Jan Wagner
8832694161
check_ntp.pl: Droping this superseded plugin
2015-10-04 21:17:48 +02:00
Jan Wagner
5ca1bff80c
check_netdns.pl: Prototyping functions
2015-10-04 19:50:18 +02:00
Sven Nierlein
d6baf9dbce
change exit code to unknown on help and version info
...
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-04 19:24:30 +02:00
Jan Wagner
20d223119e
check_ntp.pl: Using FindBin
2015-10-04 18:38:25 +02:00
Jan Wagner
c0b4f41899
plugins-scripts/Makefile.am: Testing scripts with 'perl -wc'
2015-10-04 17:37:52 +02:00
Elan Ruusamäe
a9b02e7aff
also update check_rpc.pl and check_wave.pl
2015-10-02 14:39:25 +02:00
Elan Ruusamäe
8079ead7fa
drop superfluous libexecdir
...
utils.pm locate is already convered by FindBin
2015-10-02 13:58:43 +02:00
Holger Weiss
8235fd0aef
check_mailq: Add sudo support
...
This addition is based on a patch contributed by Christopher Schultz.
Closes #1099 .
Closes #1171 .
2014-12-02 21:13:38 +01:00
Holger Weiss
83744b24b0
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-08 21:46:09 +02:00
Jonas Genannt
3b02d7fafb
check_file_age: Provide performance data
2014-10-06 20:16:00 +02:00
Jan Wagner
93071168df
Merge branch 'maint'
...
Conflicts:
NEWS
THANKS.in
2014-10-06 10:25:31 +02:00
Simon Meggle
37b8081504
check_mailq: fixed mailer names
...
(Closes #1289 )
2014-09-29 10:21:11 +02:00
Nick Peelman
9a4771b09f
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-09-10 20:39:00 +02:00
Jan Wagner
3a668c0f87
Setting PATH at first
2014-08-20 20:37:24 +02:00
Jan Wagner
d4b6d09f10
check_log.sh: droping path from basename
...
while evaluating PROGNAME (Closes Debian Bug #758662 )
2014-08-20 20:29:23 +02:00
Sven Nierlein
d832030e38
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
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-07-31 11:43:47 +02:00
Jan Wagner
69b719aa2e
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 23:52:25 +02:00
Jan Wagner
d8b81e9ef3
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-20 22:30:21 +02:00
Holger Weiss
1f4fd12845
Don't rely on FindBin module to locate utils.pm
...
As the FindBin module doesn't work with ePN, set the path to utils.pm
explicitly at build time. Keep using FindBin additionally, so that the
plugins can also be executed from the build directory.
Closes #1271 .
2014-07-06 19:55:03 +02:00
Holger Weiss
ae24aaeefb
Use FindBin consistently across Perl plugins
...
Use Perl's FindBin module to locate the path to utils.pm in
check_file_age.pl and check_mssql.pl, just as we do in other Perl
plugins.
2014-06-18 18:45:10 +02:00