티스토리 뷰
17년 5월 기준.
yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp unzip
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.2.0.tar.gz
wget http://nagios-plugins.org/download/nagios-plugins-2.1.2.tar.gz
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagios,nagcmd apache
tar -xzvf nagios-4.2.0.tar.gz
tar -xvzf nagios-plugins-2.1.2.tar.gz
cd nagios-4.2.0
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios start
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
cd nagios-plugins-2.1.2
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --add httpd
chkconfig --level 35 httpd on
http://192.168.100.239/nagios
nagiosadmin/admin
vi /usr/local/nagios/etc/objects/hosts.cfg
define host{
use linux-server
host_name 192.168.100.74
alias 192.168.100.74
address 192.168.100.74
}
// localhost.cfg의 group에 추가. localhost.cfg 참고해서 service 정의 추가.
vi /usr/local/nagios/etc/nagios.cfg
cfg_file=/usr/local/nagios/etc/objects/hosts.cfg
htpasswd /usr/local/nagios/etc/htpasswd.users test
// 계정 추가
https://labs.consol.de/nagios/check_logfiles/
// 로그파일 플러그인
'Study' 카테고리의 다른 글
Spring(스프링) csv 관련 (0) | 2024.01.10 |
---|---|
SNMP(에스엔엠피) 관련 (0) | 2024.01.10 |
Zabbix(자빅스) 관련 (0) | 2024.01.10 |
Splunk(스플렁크) 관련 (0) | 2024.01.10 |
OpenNMS(오픈엔엠에스) 관련 (0) | 2024.01.07 |