Add check: check_disk
This commit is contained in:
parent
c5a613f6bf
commit
00defc4231
@ -16,6 +16,7 @@
|
||||
|
||||
command[check_available_conntrack] = /usr/local/bin/check_available_conntrack
|
||||
command[check_cpu] = /usr/local/bin/check_cpu
|
||||
command[check_disk] = /usr/local/bin/check_disk
|
||||
command[check_memory] = /usr/local/bin/check_memory
|
||||
command[check_systemd] = /usr/local/bin/check_systemd
|
||||
|
||||
|
39
conf/usr/local/bin/check_disk
Executable file
39
conf/usr/local/bin/check_disk
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# BSD 3-Clause License
|
||||
#
|
||||
# Copyright (c) 2019, Alban Vidal <alban.vidal@zordhak.fr>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Please see license file on root of this directory
|
||||
################################################################################
|
||||
|
||||
# !! GIT FILE !!
|
||||
# https://framagit.org/zorval/scripts/check-nrpe
|
||||
|
||||
################################################################################
|
||||
|
||||
# If environnement file exist, we load it
|
||||
if [ -f /etc/env_check_nrpe ] ; then
|
||||
source /etc/env_check_nrpe
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
|
||||
# Chargement des éventuels surcharges des seuils
|
||||
# Volumétrie restante :
|
||||
CHECK_DISK_WARN=${CHECK_DISK_WARN:=20%}
|
||||
CHECK_DISK_CRIT=${CHECK_DISK_CRIT:=10%}
|
||||
# inodes restants :
|
||||
CHECK_DISK_INODE_WARN=${CHECK_DISK_INODE_WARN:=20%}
|
||||
CHECK_DISK_INODE_CRIT=${CHECK_DISK_INODE_CRIT:=10%}
|
||||
# Types de FS exclus
|
||||
CHECK_DISK_EXCLUDE_TYPE=${CHECK_DISK_EXCLUDE_TYPE:="--exclude-type=tmpfs --exclude-type=devtmpfs --exclude-type=tracefs"}
|
||||
|
||||
/usr/lib/nagios/plugins/check_disk \
|
||||
--warning=$CHECK_DISK_WARN \
|
||||
--critical=$CHECK_DISK_CRIT \
|
||||
--iwarning=$CHECK_DISK_INODE_CRIT \
|
||||
--icritical=$CHECK_DISK_INODE_CRIT \
|
||||
$CHECK_DISK_EXCLUDE_TYPE
|
Loading…
Reference in New Issue
Block a user