Lorenz Kästle
74d61bbf8a
check_real: implement modern output
2025-12-05 12:28:26 +01:00
Lorenz Kästle
802e46f8ea
Run clang-format again
2025-09-15 12:59:37 +02:00
Lorenz Kästle
065ed65a87
Fix types in perfdata functions
2025-03-07 15:57:46 +01:00
Lorenz Kästle
0645c9fc2c
Implement new output functionality
2025-02-18 21:58:34 +01:00
Lorenz Kästle
6eb5be9e30
Fix argument order of calloc on several occasions
2024-11-09 10:49:21 +01:00
Lorenz Kästle
08d9932c13
plugins/utils.c: update copyright
2024-10-31 14:35:09 +01:00
Lorenz Kästle
dde0e519ff
plugins/utils.c: clang-format
2024-10-31 14:34:06 +01:00
Lorenz Kästle
d3faf13961
check_disk: Fail on missing arguments for --warning and --critical and fix a test case ( #1935 )
...
* check_disk: Fail on missing arguments for --warning and --critical
* Add new test function for percentage expressions and use it in check_disk
* Add error abort in tests if they fail to parse output
* Fix typo in test which probably broke the test since forever :-(
2024-03-27 00:36:41 +01:00
RincewindsHat
1b06060cbc
Fix logic in is_uint64_t to fix type-limit warning
2023-11-23 00:07:02 +01:00
RincewindsHat
07f9c438f3
Fixes for -Wsign-compare
2023-10-19 12:10:55 +02:00
RincewindsHat
369d98cc36
plugins/utils: Use C99 booleans
2023-10-18 20:51:23 +02:00
RincewindsHat
7fd0e6f36d
Rework maxfd/open_max to avoid unused variables
2023-09-22 15:22:57 +02:00
Andreas Baumann
eb2dfdd5c2
fixed two PRId64 to PRIu64 in perfdata_uint64 ( #1802 )
2022-10-27 22:48:18 +02:00
Andreas Baumann
817ac2e5da
using PRId64 and PRIu64 instead of %ld directly ( #1800 )
2022-10-21 18:31:12 +02:00
RincewindsHat
1c53c4f541
homogenize perfdata function and fix small bug with missing semicolon
2021-11-17 15:45:17 +01:00
RincewindsHat
4c8ab67dd3
Fix my own errors for real this time and add some comments, so I wont do them again
2021-10-26 21:09:55 +02:00
RincewindsHat
73ed8109e5
Re-add separation semicolons for perfdata, which I deleted
2021-10-26 20:47:28 +02:00
RincewindsHat
d3af7a353e
Remove useless lines and fix some formatting
2021-10-26 17:07:09 +02:00
RincewindsHat
46c5327e34
Revert to poor man's logic
2021-10-02 23:37:12 +02:00
rincewind
66e2453759
Introduce new perfdata functions and stuff for using (u)int64_t
2021-09-25 23:24:34 +02:00
Sven Nierlein
e8325b39c4
fix maxfd being zero
...
If _SC_OPEN_MAX is available then maxfd was zero initialized and never set to the value from sysconf.
This leads to segfaults with free(): invalid size introduced by commit 7cafb0e845 .
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2019-05-24 14:51:10 +02:00
Sven Nierlein
7cafb0e845
check_by_ssh: fix child process leak on timeouts
...
When check_by_ssh runs into a timeout it simply exits keeping all child processes running.
Simply adopting the kill loop from runcmd_timeout_alarm_handler() fixes this.
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2019-02-15 10:36:28 +01:00
John C. Frickson
a5983eda69
check_users not correctly detecting thresholds
...
Fix for issue https://github.com/nagios-plugins/nagios-plugins/issues/81
check_users now uses the standard warning and critical ranges parser and
a standard perdata output routine.
2016-11-07 21:36:25 +01:00
Sven Nierlein
13d9c31b17
Merge pull request #1315 from waja/utils_remove_unused_variable
...
utils: remove unused variable
2015-10-02 16:01:24 +02:00
Gerhard Lausser
81be2afd95
add sperfdata function which can handle threshold ranges
2015-04-21 19:11:56 +02:00
Sebastian Herbszt
4383f39cd5
utils: remove unused variable
...
Remove unused variable.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
2014-12-27 15:30:18 +01:00
Monitoring Plugins Development Team
63734f52ab
Project rename initial commit.
...
This is an initial take at renaming the project to Monitoring Plugins.
It's not expected to be fully complete, and it is expected to break
things (The perl module for instance). More testing will be required
before this goes mainline.
2014-01-19 14:18:47 -05:00
Holger Weiss
5b0e00782d
Move global variables from .h to .c files
...
Simplify things by moving the definition of global variables into .c
files, where they belong.
2013-09-10 22:45:45 +02:00
Anders Kaseorg
028d50d6f9
Die when asprintf fails
...
Fixes many instances of
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-06-29 13:39:11 +02:00
Thomas Guyot-Sionnest
c459ca0770
Make alarm handler customisable
2009-03-20 02:19:42 -04:00
Thomas Guyot-Sionnest
6fbd14fea5
Removing CVS/SVN tags and replacing with git-based versioning
...
For contrib/, full tags have been imported from subversion
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-23 05:38:47 +00:00
Thomas Guyot-Sionnest
184ce9f6a3
Bump plugins/ to GPLv3 (non-plugind files)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1918 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-31 11:27:22 +00:00
Thomas Guyot-Sionnest
caca7a50fd
Add a max_state_alt function that put UNKNOWN and DEPENDENT ahead of OK.
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1829 f882894a-f735-0410-b71e-b25c423dba1c
2007-11-23 04:18:16 +00:00
Matthias Eble
ea6f0f5a6e
Changed output order of print_revision
...
print_revision now uses clean_revstring
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1752 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-07 12:02:45 +00:00
Holger Weiss
fd329a1e91
Don't try to print `optarg' (which will be a NULL pointer) if an unknown
...
command line option was used, as this leads to a segfault on some
systems. The unknown option will be printed by getopt(3) anyway. So,
simply call print_usage() and exit UNKNOWN via the new usage5() instead.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28 21:46:41 +00:00
Ton Voon
548083b2ea
Move new util_* functions to lib/
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1451 f882894a-f735-0410-b71e-b25c423dba1c
2006-07-13 12:50:23 +00:00
Ton Voon
6b9cc76d0a
Using coreutils' base_name function because of portability issues with
...
Tru64
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1450 f882894a-f735-0410-b71e-b25c423dba1c
2006-07-13 08:54:57 +00:00
Benoit Mortier
f9394308c9
updating help and usage and license
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1434 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-18 19:36:48 +00:00
Ton Voon
34cb16d283
Internal version of basename if one not found in system
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1383 f882894a-f735-0410-b71e-b25c423dba1c
2006-04-27 13:25:10 +00:00
Ton Voon
2e7a39ae55
Stop coredump on Solaris if arg not specified (Jason Kau - 1465288)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1370 f882894a-f735-0410-b71e-b25c423dba1c
2006-04-06 10:08:57 +00:00
Ton Voon
f5c1cf6dd4
New function to for escaped strings from command line for send/quit.
...
Adapted from Sebastian Wiesinger's patch (1292404)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1365 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-29 16:33:36 +00:00
Ton Voon
e0688a6911
Clearly defined thresholds & ranges in docs. Added get_status routine. Added
...
set_thresholds routine. Tests enhanced to check new routines
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1304 f882894a-f735-0410-b71e-b25c423dba1c
2006-01-30 22:24:31 +00:00
Ton Voon
795100ae51
Added libtap tests for utils.c library functions. Removed redundant
...
test files
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1303 f882894a-f735-0410-b71e-b25c423dba1c
2006-01-30 16:10:50 +00:00
M. Sean Finney
ceebd58040
initial merging of ae's np_runcmd code into selected plugins.
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1260 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-24 11:10:29 +00:00
Benoit Mortier
e9ccc6b21a
various fixes for localization
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-25 23:17:46 +00:00
Benoit Mortier
5d420d68fa
removing support fonction
...
removing warranty from print_revision
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@993 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 19:20:35 +00:00
Benoit Mortier
234481163f
More internationalization work
...
new usage4 function to permit localisation of think like check_ssh: xxxxx
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@979 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02 16:51:25 +00:00
Benoit Mortier
d19edd4043
standardize localization string
...
standardize unknow arguments
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-01 23:54:51 +00:00
Karl DeBisschop
7d7ca121bc
begin writing some perfdata as float
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@841 f882894a-f735-0410-b71e-b25c423dba1c
2004-03-03 12:33:15 +00:00
Karl DeBisschop
7ba54264fb
add perfdata function for floats to complement ints, also spell fix "received"
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@817 f882894a-f735-0410-b71e-b25c423dba1c
2004-02-20 05:21:21 +00:00