aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_disk.c
AgeCommit message (Collapse)Author
2022-09-11Check disk compiler warnings (#1758)Gravatar Lorenz
* Use unused variable * Proper format strings for printf * Use proper functions for absolute values * Remove and add comments at some places
2022-01-30Description for -M was the wrong way around (#1746)Gravatar Lorenz
Using -M should show the mountpoint instead of the device the file system originated from. Seems like this was not the case for a long time and now the default is to show the mount point. Using `-M` reverts to showing the (block) device instead. The usage Description was adjusted with this commit.
2022-01-22Trivial printf fix and a little bit of code style (#1695)Gravatar Lorenz
* Fix several warnings (and some downright bugs probably) with formating in check_disk Update to master * Fix merge error, I forgot the last time * Fix indentation Co-authored-by: rincewind <rincewind@vulgrim.de>
2021-11-24More wrong printf formattingGravatar RincewindsHat
2021-11-24Fix CodeQL checksGravatar RincewindsHat
2021-10-27Replace tabs with spaces and do some formattingGravatar RincewindsHat
2021-10-27Remove whitespace at the end of linesGravatar RincewindsHat
2021-10-26Reform some arithmetical operations for more clarityGravatar RincewindsHat
2021-10-26hopefully fix warning high tide with percentageGravatar RincewindsHat
2021-10-26Switch to uint64_tGravatar RincewindsHat
2021-10-26Reformat a little bit for easier readingGravatar RincewindsHat
2021-10-26Recognice IEC binary units and format accordingly to base2 (always)Gravatar RincewindsHat
2021-08-24Merge pull request #1388 from waja/check_proc_consumption_1357Gravatar Sven Nierlein
check_disk: Fixing the stuff that is broken on btrfs
2019-04-09include -P switch in helpGravatar Christopher Odenbach
2018-12-08[check_disk] add support to display inodes usage in perfdataGravatar Vincent Danjean
This is not enabled by default It can be enabled with the -P (--iperfdata) option
2016-11-21Revert "check_disk - show all disks if state is ok and option error only is ↵Gravatar Oliver Skibbe
used"
2016-11-19Merge pull request #1436 from riskersen/check_disk_iss1420Gravatar Oliver Skibbe
check_disk - show all disks if state is ok and option error only is used
2016-11-07Merge pull request #1312 from waja/check_disk_remove_unused_variablesGravatar Sven Nierlein
check_disk: remove unused variables
2016-11-04check_disk - show all disks if state is ok and option error only is usedGravatar Oliver Skibbe
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
2015-10-28Fixing the stuff that is broken on btrfsGravatar Klaus Ethgen
(Closes #1357)
2015-10-12Revert "Don't let check_disk hang on hanging file systems"Gravatar Holger Weiss
This reverts commit 6986aa1d0a352d8d02eed4896034631fffd25a27. 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-04use unknown exit code for help/version in pluginsGravatar Sven Nierlein
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-12-27check_disk: remove unused variablesGravatar Sebastian Herbszt
Remove unused variables. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
2014-11-30check_disk: Seperate declarations from codeGravatar Holger Weiss
2014-11-30check_disk: Remove unused status variableGravatar Holger Weiss
We didn't actually use the exit status provided by pthread_join(3) for anything.
2014-11-28check_disk: Fix pthread start routine typeGravatar Holger Weiss
The function pointer passed as third argument to pthread_create(3) must be of type void *(*)(void *).
2014-11-28Don't let check_disk hang on hanging file systemsGravatar Gerhard Lausser
2014-07-29check_disk: show troubled partition in verbose modeGravatar Jan Wagner
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-04-27Make check_disk work on Windows.Gravatar Gunnar Beutner
2014-01-28check_disk: precise the help outputGravatar Jan Wagner
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-21Merge branch 'rename'Gravatar Thomas Guyot-Sionnest
2014-01-21plugins/*.c: Non-network timeout changesGravatar Spenser Reinhardt
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-21plugins/*.c: Alterations for timeout messages.Gravatar Spenser Reinhardt
.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-20Capitalize "Monitoring" when it's the first wordGravatar Holger Weiss
2014-01-19Project rename initial commit.Gravatar Monitoring Plugins Development Team
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.
2013-09-16check_disk: get_fs_usage hasn't been run if using groupsGravatar Sven Nierlein
the reason why it still worked sometimes was fsu_blocks beeing uninitialized which resulted in a true test sometimes.
2013-08-26Merge branch 'master' of https://github.com/bugness-chl/nagios-pluginsGravatar Holger Weiss
* 'master' of https://github.com/bugness-chl/nagios-plugins: check_disk: option to ignore reserved space Conflicts: plugins/check_disk.c
2013-03-25Fixed SF.net bug 3560976, added --include-type/-N optionGravatar Richard Leitner
2012-10-12check_disk: option to ignore reserved spaceGravatar chl
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-09-25Update plugins/check_disk.cGravatar Gianluca Varisco
CRITCAL -> CRITICAL typo
2012-06-29Die when asprintf failsGravatar Anders Kaseorg
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>
2010-11-15Fix check_disk free space calculation if blocksizes differ within a disk ↵Gravatar Matthias Eble
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-07-07Fix examples in check_disk, where it implied was possible to suffix unit ↵Gravatar Ton Voon
values to warn/crit parameters
2010-04-22Add newline after "Usage:" in --helpGravatar Thomas Guyot-Sionnest
2010-04-21Standardize the extra-opts notesGravatar Thomas Guyot-Sionnest
2010-04-14Fix translations when extra-opts aren't enabledGravatar Thomas Guyot-Sionnest
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.
2009-05-07Fixed typo in check_diskGravatar Ton Voon
2008-11-23Removing CVS/SVN tags and replacing with git-based versioningGravatar Thomas Guyot-Sionnest
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-20Add comment to recent check_disk patchGravatar Thomas Guyot-Sionnest
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2088 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19Bulk EOL cleanupGravatar Thomas Guyot-Sionnest
$ 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