40 lines
1.3 KiB
Bash
Executable File
40 lines
1.3 KiB
Bash
Executable File
#!/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
|