39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
|
#!/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
|
||
|
|
||
|
# 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
|