티스토리 뷰
아래는 퍼온것들... 조금 변형해서 사용하면 될듯함
# Sample Mon Configuration File
#
# mon.cf,v 1.1
#
# This mon.cf file relies on these monitors and alerts:
#
# jabber.alert (jabber_alert.pl)
# jabber.monitor
# dns.alert
#
# Available at http://www.jabberdoc.org/tools
#
#
alertdir = /etc/mon/alert.d
mondir = /etc/mon/mon.d
logdir = /var/log/mon.d
dtlogfile = /var/log/mon.d/dt.log
dtlogging = yes
statedir = /var/lib/mon.d
serverport = 2583
trapport = 2583
maxprocs = 20
histlength = 100
randstart = 60s
#
# define groups of hosts to monitor
#
hostgroup local_net ip.to.local.gateway
hostgroup boxes ip.of.a.server
hostgroup webservers www.domain1.com www.domain2.com www.domain3.com
hostgroup jabberservers jabber.domain1.com
hostgroup nameservers ns1.domain1.com ns1.domain2.com
hostgroup emailservers mail.domain1.com
# Check every minute if local connection is up.
# Log alert to log file if connection is down.
# Log alert every 2 hours if connection remains down.
watch local_net
service Ping_Check
interval 1m
monitor fping.monitor -r 5 -t 2000
period wd {Mon-Sun} hr {0am-24pm}
alertafter 1
alertevery 2h
alert file.alert /var/log/mon.d/ping_check.log
# Ping server every 2 minutes, alert only if local_net is up.
# Note the "depend" on "local_net:Ping_Check" above. If this
# test fails, "watch boxes" will not send an alert. This
# prevents "watch boxes" from sending alerts because the
# local connection is down.
watch boxes
service Ping_Check
interval 2m
monitor fping.monitor -r 5 -t 2000
depend local_net:Ping_Check
period wd {Mon-Sun} hr {0am-24pm}
alertafter 1
alertevery 2h
alert jabber.alert -e user@jabber.domain4.com -n user@jabber.domain4.com -o 5223 -k 1 -w mypasswd
# Test webservers (HTTP GET) every 5 minutes.
# Note that all below entries have a dependency on
# "boxes:Ping_Check" above. Thus if the entire box
# goes down, alerts below are suppressed.
# Note also that tests below require 2 consecutive
# failures before an alert is sent.
watch webservers
service HTTP_Server_Check
interval 5m
monitor http.monitor -p 80 -t 30
depend boxes:Ping_Check
period wd {Mon-Sun} hr {0am-24pm}
alertafter 2
alertevery 2h
alert mail.alert user@domain4.com
alert jabber.alert -e user@jabber.domain4.com -n user@jabber.domain4.com -o 5223 -k 1 -w mypasswd
# Test Jabber Server
watch jabberservers
service Jabberd_Server_Check
interval 5m
monitor jabber.monitor -p 5222
depend boxes:Ping_Check
period wd {Mon-Sun} hr {0am-24pm}
alertafter 2
alertevery 2h
alert mail.alert user@domain4.com
alert jabber.alert -e user@jabber.domain4.com -n user@jabber.domain4.com -o 5223 -k 1 -w mypasswd
# Test nameservers.
# Note that the SRV records are checked for
# for the jabber server. This check requires
# the modified dns.monitor. See above.
watch nameservers
service DNS_Record_Check
interval 5m
monitor dns.monitor -caching_only \
-query www.domain1.com:A \
-query www.domain2.com:A \
-query www.domain3.com:A \
-query _jabber._tcp.jabber.domain1.com:SRV \
-query _xmpp-client._tcp.jabber.domain1.com:SRV \
-query _xmpp-server._tcp.jabber.domain1.com:SRV
depend boxes:Ping_Check
period wd {Mon-Sun} hr {0am-24pm}
alertafter 2
alertevery 2h
alert mail.alert user@domain4.com
alert jabber.alert -e user@jabber.domain4.com -n user@jabber.domain4.com -o 5223 -k 1 -w mypasswd
# Test email servers.
watch emailservers
service POP_Server_Check
interval 5m
monitor pop3.monitor
depend boxes:Ping_Check
period wd {Mon-Sun} hr {0am-24pm}
alertafter 2
alertevery 2h
alert mail.alert user@domain4.com
alert jabber.alert -e user@jabber.domain4.com -n user@jabber.domain4.com -o 5223 -k 1 -w mypasswd
service SMTP_Server_Check
interval 5m
monitor smtp.monitor
depend boxes:Ping_Check
period wd {Mon-Sun} hr {0am-24pm}
alertafter 2
alertevery 2h
alert mail.alert user@domain4.com
alert jabber.alert -e user@jabber.domain4.com -n user@jabber.domain4.com -o 5223 -k 1 -w mypasswd
# See http://search.cpan.org/~pryan/Period-1.20/Period.pm for notes on Time::Period
'Linux' 카테고리의 다른 글
리눅스 lsyncd (실시간 동기화) (0) | 2015.06.04 |
---|---|
리눅스 alias 개념 (0) | 2015.06.04 |
cron (crontab) (0) | 2015.06.04 |
MON tools 설치 (0) | 2015.06.04 |
rsync 동기화 설정 (0) | 2015.06.04 |
- Total
- Today
- Yesterday
- WAF
- 리눅스
- kvm
- gitlab
- softether
- virtualbox
- cURL
- glusterfs
- 인증서
- centos8
- HAProxy
- ssh
- GeoIP
- OpenVPN
- pptp
- NGINX
- yum
- MySQL
- L2TP
- ntp
- 베이어다이나믹
- mod_security
- php
- centOS7
- IPSEC
- iptables
- Apache
- SSL
- mariadb
- galera
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |