Oliver Skibbe
d03a2a82b3
Revert "check_disk - show all disks if state is ok and option error only is used"
2016-11-21 13:26:28 +01:00
Oliver Skibbe
4430b63b0f
Merge pull request #1436 from riskersen/check_disk_iss1420
...
check_disk - show all disks if state is ok and option error only is used
2016-11-19 16:35:50 +01:00
Sven Nierlein
5ebc24d998
Merge pull request #1312 from waja/check_disk_remove_unused_variables
...
check_disk: remove unused variables
2016-11-07 23:07:16 +01:00
Oliver Skibbe
5663b03717
check_disk - show all disks if state is ok and option error only is used
...
This fix changes output of check_disk in case of --error-only/-e option
is used and state is ok
- Old output: DISK OK
- New output: DISK OK - free space: / 159731 MB (83% inode=61%);
/dev/shm 2926 MB (100% inode=99%); /boot 58 MB (32% inode=99%);
Resolves : #1420
2016-11-04 11:35:12 +01:00
Holger Weiss
11c5796d0a
Revert "Don't let check_disk hang on hanging file systems"
...
This reverts commit 6986aa1d0a . That
commit leads to issues on non-Linux systems, and it seems to not
(always) work as expected on Linux, either.
Conflicts:
plugins/Makefile.am
plugins/check_disk.c
Closes #1377 and closes #1329 .
2015-10-12 11:07:02 +02:00
Sven Nierlein
edca257e20
use unknown exit code for help/version in plugins
...
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-04 19:24:30 +02:00
Sebastian Herbszt
81b33d4514
check_disk: remove unused variables
...
Remove unused variables.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
2014-12-27 15:20:57 +01:00
Holger Weiss
0d14645cb0
check_disk: Seperate declarations from code
2014-11-30 11:33:20 +01:00
Holger Weiss
c0e6a6935b
check_disk: Remove unused status variable
...
We didn't actually use the exit status provided by pthread_join(3) for
anything.
2014-11-30 11:30:36 +01:00
Holger Weiss
66f43f9934
check_disk: Fix pthread start routine type
...
The function pointer passed as third argument to pthread_create(3) must
be of type void *(*)(void *).
2014-11-28 23:55:03 +01:00
Gerhard Lausser
6986aa1d0a
Don't let check_disk hang on hanging file systems
2014-11-28 22:08:08 +01:00
Jan Wagner
cbb507c89f
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-07-29 22:06:25 +02:00
Gunnar Beutner
1b3890572e
Make check_disk work on Windows.
2014-04-27 19:59:06 +02:00
Jan Wagner
cb99931e43
check_disk: precise the help output
...
Clarifying in the help output that we need either a device or mount point
listed by the mount(8) command.
(Closes : #1118 )
(Closes : #1170 )
2014-01-28 12:07:48 +01:00
Thomas Guyot-Sionnest
11cf54ca78
Merge branch 'rename'
2014-01-21 07:59:07 -05:00
Spenser Reinhardt
66544851f7
plugins/*.c: Non-network timeout changes
...
Changes to non-network checks for clarity on timeout value. Adapted from pull request #1209 tracker from user awiddersheim. (Closes : #1209 )
Files: check_apt.c, check_disk.c, check_procs.c, negate.c
2014-01-21 11:35:07 +01:00
Spenser Reinhardt
212575b858
plugins/*.c: Alterations for timeout messages.
...
.c file changes for misleading timeout messages in help functions. Solution to pull request #1209 tracker by awiddersheim.
Files: plugins/check_apt.c, plugins/check_by_ssh.c, plugins/check_dbi.c, plugins/check_dig.c, plugins/check_disk.c, plugins/check_dns.c, plugins/check_game.c, plugins/check_http.c, plugins/check_ldap.c, plugins/check_ntp.c, plugins/check_ntp_peer.c, plugins/check_ntp_time.c, plugins/check_nwstat.c, plugins/check_overcr.c, plugins/check_pgsql.c, plugins/check_ping.c, plugins/check_procs.c, plugins/check_radius.c, plugins/check_real.c, plugins/check_smtp.c, plugins/check_snmp.c, plugins/check_ssh.c, plugins/check_tcp.c, plugins/check_time.c, plugins/check_ups.c, plugins/negate.c
2014-01-21 11:33:45 +01:00
Holger Weiss
c3e756a855
Capitalize "Monitoring" when it's the first word
2014-01-20 03:12:50 +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
Sven Nierlein
982cbeea00
check_disk: get_fs_usage hasn't been run if using groups
...
the reason why it still worked sometimes was fsu_blocks beeing uninitialized
which resulted in a true test sometimes.
2013-09-16 15:30:56 +02:00
Holger Weiss
efa9b0fc08
Merge branch 'master' of https://github.com/bugness-chl/nagios-plugins
...
* 'master' of https://github.com/bugness-chl/nagios-plugins :
check_disk: option to ignore reserved space
Conflicts:
plugins/check_disk.c
2013-08-26 23:23:55 +02:00
Richard Leitner
10a4de3c4c
Fixed SF.net bug 3560976, added --include-type/-N option
2013-03-25 23:47:12 +01:00
chl
a6ff5d4489
check_disk: option to ignore reserved space
...
This commit add a runtime option to ignore the root-reserved space
when calculating perfdata.
Before / after:
./check_disk -w 2% -c 1% /home
./check_disk -w 2% -c 1% -f /home
DISK CRITICAL - free space: /home 272 MB (1% inode=83%);| /home=17551MB;18401;18589;0;18777
DISK CRITICAL - free space: /home 272 MB (1% inode=83%);| /home=17551MB;17466;17644;0;17823
Well, it doesn't really give me more space :) but the perfdata are a
little bit more coherent.
Note that there are still a rounding issue on the percent calculation
(cf calculate_percent() comments, taken from coreutils 'df' command).
272/17823 -> 1.526%
Since the warning/critical/min/max data are usually not saved in RRD DB,
you can activate the option without seeing landslides in the graphs.
2012-10-12 15:55:38 +02:00
Gianluca Varisco
2672e95bca
Update plugins/check_disk.c
...
CRITCAL -> CRITICAL typo
2012-09-25 17:45:12 +03: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
Matthias Eble
77f2c84d2f
Fix check_disk free space calculation if blocksizes differ within a disk group (Bekar - #2973603 )
...
Various values (dused_pct, dfree_pct, inodes_free, inodes_total, ...) are now carried in
the parameter_list structure. Assignments have been moved to a subroutine preventing
code redundancies.
Group metrics are now calculated based on units rather than blocks. This fixes freespace calculation
when blocksizes differ within a group.
2010-11-15 23:59:35 +01:00
Ton Voon
02f9207ebe
Fix examples in check_disk, where it implied was possible to suffix unit values to warn/crit parameters
2010-07-07 11:03:24 +01:00
Thomas Guyot-Sionnest
eaf3cb27f4
Add newline after "Usage:" in --help
2010-04-22 08:57:14 -04:00
Thomas Guyot-Sionnest
884aee0667
Standardize the extra-opts notes
2010-04-21 23:29:18 -04:00
Thomas Guyot-Sionnest
25d1ee331d
Fix translations when extra-opts aren't enabled
...
Bug #2832884 reported problem with translations outputting pot file
headers. This is caused by "" matching the header of the translation
files.
This patch moves gettext macros inside utils macros and update some
french translations.
2010-04-14 08:33:06 -04:00
Ton Voon
430d093a6f
Fixed typo in check_disk
2009-05-07 22:28:56 +01: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
56cf151ae9
Add comment to recent check_disk patch
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2088 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-20 08:14:41 +00:00
Thomas Guyot-Sionnest
caa8bd6423
Bulk EOL cleanup
...
$ git diff --ignore-space-change|diffstat
0 files changed
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19 06:45:18 +00:00
Thomas Guyot-Sionnest
5305852212
check_disk: rerpopulate the mount list after doing a stat() on paths specified with -p for better automount support.
...
NB: There's a memory leak here - properly freeing the mount list would invlove
much more work - there's many other places where leaks can happen so it
should be a project on its own.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2085 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19 05:59:22 +00:00
Thomas Guyot-Sionnest
4e366f82de
Fix long options parsing in check_disk, check_dns, check_mrtg and check_mrtgtraf (check_tcp was done in an earlier commit)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2078 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-08 16:33:15 +00:00
Thomas Guyot-Sionnest
b336798e4c
Verbose should not have to exceed 3 as per developement guidelines
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2025 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-10 10:03:55 +00:00
Thomas Guyot-Sionnest
44f8455b2c
Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07 10:02:42 +00:00
Thomas Guyot-Sionnest
ed62784a0b
--help output cleanup (plus removal of spaces on blank lines)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-27 14:35:26 +00:00
Matthias Eble
2f9ee337cf
Fix --local argument handling (Jan Wagner #1878971 )
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1933 f882894a-f735-0410-b71e-b25c423dba1c
2008-02-13 19:14:37 +00:00
Thomas Guyot-Sionnest
4868143e4e
Fix broken intending (The whole file use spaces only except my last patch and 1-3 other places).
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1932 f882894a-f735-0410-b71e-b25c423dba1c
2008-02-13 15:10:53 +00:00
Thomas Guyot-Sionnest
fe2e5f4aec
set_thresholds now let the user free the thresolds. (P.S.: When you set twice the thresholds for a path in check disk (like using -C followed by -p ) it overrides them. All new elements are created with np_add_parameter which initialises the thresholds to NULL.)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1930 f882894a-f735-0410-b71e-b25c423dba1c
2008-02-13 11:05:44 +00:00
Thomas Guyot-Sionnest
fa4efcdf6d
Bump plugins/ to GPLv3 (check_apt to check_nwstat)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1916 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-30 10:53:47 +00:00
Thomas Guyot-Sionnest
b7676a7e6d
Fix check_disk disk usage calculation when using --group=NAME (related to bug #1348746 )
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1907 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-15 11:34:15 +00:00
Thomas Guyot-Sionnest
dbc22e1acd
Fix check_disk reporting OK if disk usage grows over 100% (bug #1348746 ).
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1848 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-08 16:34:05 +00:00
Matthias Eble
6483a72b16
Removed some c99 style comments
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1793 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-23 12:29:36 +00:00
Matthias Eble
9e64dc2d7f
Fixed bug: stat was called on remote fs even if -l was given
...
Added -L option to call stat on remote fs but without threshold comparison
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1789 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-23 10:58:09 +00:00
Matthias Eble
bb32ecb79c
substituted bool/true/false with int/TRUE/FALSE (discussed on np-devel)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1787 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-22 17:48:33 +00:00
Matthias Eble
d23b17e656
Added -i/-I to ignore pathes/partitions based on regular expressions
...
Added check_disk -A selecting all filesystems
-E option must now be passed before -p or -r/-R
Passing -E after -p or -r results in UNKNOWN state
Fixed bug when mixing case sensitive and insensitive regexes
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1786 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-22 17:40:35 +00:00
Thomas Guyot-Sionnest
7a70525129
My solaris box needs %llu to display 64bits integers.
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1783 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-21 05:05:58 +00:00