2019-09-30 21:30:18 +02:00
|
|
|
#!/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
|
2021-04-10 08:00:46 +02:00
|
|
|
if [ -f /etc/zorval/env_check_load ] ; then
|
|
|
|
source /etc/zorval/env_check_load
|
2019-09-30 21:30:18 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# Chargement des éventuels surcharges des seuils
|
|
|
|
|
|
|
|
# Load WARN
|
|
|
|
CHECK_LOAD_WLOAD1=${CHECK_LOAD_WLOAD1:=8}
|
|
|
|
CHECK_LOAD_WLOAD5=${CHECK_LOAD_WLOAD5:=4}
|
|
|
|
CHECK_LOAD_WLOAD15=${CHECK_LOAD_WLOAD15:=2}
|
|
|
|
|
|
|
|
# Load CRIT
|
|
|
|
CHECK_LOAD_CLOAD1=${CHECK_LOAD_CLOAD1:=16}
|
|
|
|
CHECK_LOAD_CLOAD5=${CHECK_LOAD_CLOAD5:=8}
|
|
|
|
CHECK_LOAD_CLOAD15=${CHECK_LOAD_CLOAD15:=4}
|
|
|
|
|
|
|
|
/usr/lib/nagios/plugins/check_load \
|
|
|
|
--warning=$CHECK_LOAD_WLOAD1,$CHECK_LOAD_WLOAD5,$CHECK_LOAD_WLOAD15 \
|
|
|
|
--critical=$CHECK_LOAD_CLOAD1,$CHECK_LOAD_CLOAD5,$CHECK_LOAD_CLOAD15
|