Add check: check_load
This commit is contained in:
parent
00defc4231
commit
621e2045e7
@ -17,6 +17,7 @@
|
|||||||
command[check_available_conntrack] = /usr/local/bin/check_available_conntrack
|
command[check_available_conntrack] = /usr/local/bin/check_available_conntrack
|
||||||
command[check_cpu] = /usr/local/bin/check_cpu
|
command[check_cpu] = /usr/local/bin/check_cpu
|
||||||
command[check_disk] = /usr/local/bin/check_disk
|
command[check_disk] = /usr/local/bin/check_disk
|
||||||
|
command[check_load] = /usr/local/bin/check_load
|
||||||
command[check_memory] = /usr/local/bin/check_memory
|
command[check_memory] = /usr/local/bin/check_memory
|
||||||
command[check_systemd] = /usr/local/bin/check_systemd
|
command[check_systemd] = /usr/local/bin/check_systemd
|
||||||
|
|
||||||
|
38
conf/usr/local/bin/check_load
Executable file
38
conf/usr/local/bin/check_load
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/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
|
Loading…
Reference in New Issue
Block a user