본문 바로가기

nagios5

Nagios check memory ### Memory Check 1. 모니터링 대상 서버 check memory 설정 cd /usr/local/nagios/libexec/ vi check_mem # Script to check real memory usage # L.Gill 02/05/06 - V.1.0 # ------------------------------------------ # ######## Script Modifications ########## # ------------------------------------------ # Who When What # --- ---- ---- # LGill 17/05/06 "$percent" lt 1% fix - sed edits dc result beggining with "." # .. 2023. 12. 23.
Nagios check cpu 확인 #### CPU Usage 확인 1. cpu check할 서버에서 check_cpu 생성 cd /usr/local/nagios/libexec vi check_cpu #!/bin/bash function usage { echo "$(basename $0) usage: " echo " -w warning_level Example: 80" echo " -c critical_level Example: 90" echo "" exit 1 } while [[ $# -gt 1 ]] do key="$1" case $key in -w) WARN="$2" shift ;; -c) CRIT="$2" shift ;; *) usage shift ;; esac shift done [ ! -z ${WARN} ] && [ ! -z ${.. 2023. 12. 23.
모니터링 대상 서버 nagios agent 설치 및 nrpe 설치 ### 모니터링 할 서버에 Nagios Agent 및 Nrpe 설치 ### Package Install yum install -y gcc glibc glibc-common gd gd-devel make openssl-devel net-snmp ### Nagios Plugin, NRPE Download cd /usr/local/src wget --no-check-certificate https://nagios-plugins.org/download/nagios-plugins-2.4.6.tar.gz wget --no-check-certificate https://github.com/NagiosEnterprises/nrpe/archive/nrpe-4.1.0.tar.gz ### Nagios Plugins Inst.. 2023. 12. 23.
Nagios Server 설치 ### Nagios Server 설치 ## 관련 패키지 설치 yum install -y httpd php gcc glibc glibc-common gd gd-devel openssl openssl-devel xinetd perl unzip # CentOS8 에서 설치 시, php-fpm으로 설치 해야 한다. ## Nagios Server Download cd /usr/local/src wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.12.tar.gz # 최신버전으로!! ## Plugin Download wget --no-check-certificate https://nagios-plugins.org/download/nagio.. 2023. 12. 23.