monit
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
CONTENTS
#contents
----
Lastmodified &lastmod;
----
*Monit [#rdd4c6ef]
【参考URL】http://freebsd.fkimura.com/monit-a0.html
Monitとは、プロセスを監視して、例えばApacheのプロセス監視...
設定や監視プロセスの状態はGUIで確認できる。
https://FQDN:portNo ← portNoは
設定ファイル:/usr/local/etc/monitrc で設定したもの。デ...
*** monit のGUIページへのアクセス [#e5b3175d]
https://piano2nd.smb.net:2812/
&ref(monit.PNG);
**作業履歴 [#vf2096ec]
999 8:42 locate monit
1000 8:55 portinstall sysutils/monit
1001 8:58 cp /usr/local/etc/monitrc.sample /usr/loc...
monit_enable="YES" to rc.conf file
1003 9:06 /usr/local/etc/rc.d/monit start
1006 9:37 top
1007 9:39 /usr/local/etc/rc.d/monit restart
1012 9:55 /usr/local/etc/rc.d/monit restart
1014 10:11 apachectl -v
**/usr/local/etc/monitrc 【Monit:設定ファイル】 [#ye605e...
ssl化:letsencryptで取得した.pem を chmod 600 として利用...
########################################################...
## Monit control file
########################################################...
set daemon 30 # check services at 30 secon...
set logfile syslog
set mailserver localhost # primary mailserver
set alert root@smb.net # receive all alerts
set httpd port 2812 and
SSL ENABLE
PEMFILE /usr/local/etc/letsencrypt/live/piano2nd.smb.ne...
#use address localhost # only accept connection fro...
allow localhost
allow 192.168.1.139
allow 219.117.246.193/27
allow 210.255.122.209/28 # allow localhost to connect...
#allow admin:monit # require user 'admin' with ...
allow foo:hogehoge
########################################################...
## Services
########################################################...
### Apache ###
check process apache with pidfile /var/run/httpd.pid
start program = "/usr/local/etc/rc.d/apache24 start" wit...
stop program = "/usr/local/etc/rc.d/apache24 stop"
### amavisd ###
check process amavisd with pidfile /var/amavis/amavisd.pid
start program = "/usr/local/etc/rc.d/amavisd start" with...
stop program = "/usr/local/etc/rc.d/amavisd stop"
### clamav ###
check process clamav-clamd with pidfile /var/run/clamav/...
start program = "/usr/local/etc/rc.d/clamav-clamd start"...
stop program = "/usr/local/etc/rc.d/clamav-clamd stop"
### freshclam ###
check process clamav-freshclam with pidfile /var/run/cla...
start program = "/usr/local/etc/rc.d/clamav-freshclam st...
stop program = "/usr/local/etc/rc.d/clamav-freshclam stop"
### munin ###
check process munin with pidfile /var/run/munin/munin-no...
start program = "/usr/local/etc/rc.d/munin-node start" w...
stop program = "/usr/local/etc/rc.d/munin-node stop"
### named bind ###
check process bind with pidfile /var/run/named/pid
start program = "/usr/local/etc/rc.d/named start" with t...
stop program = "/usr/local/etc/rc.d/named stop"
# /usr/local/etc/rc.d/monit restart
* Monit の起動順 [#maeeecbc]
サーバを再起動した際、monitの起動が、監視プロセスよりも早...
ということで、
/usr/local/etc/rc.d/monit の # REQUIRE: NETWORKING SERVE...
#!/bin/sh
#
# $FreeBSD: head/sysutils/monit/files/monit.in 340872 20...
#
# PROVIDE: monit
# REQUIRE: NETWORKING SERVERS postfix apache24 cron
# BEFORE: DAEMON
# KEYWORD: shutdown
*NICが落ちると [#s974fc01]
console log
Jun 5 04:17:59 sun1 kernel: Jun 5 04:17:59 sun1 monit[...
Jun 5 04:17:59 sun1 kernel: Jun 5 04:17:59 sun1 monit[...
* The control file '/usr/local/etc/monitrc' permission 06...
Jan 22 07:50:57 kernel: The control file '/usr/local/etc...
Jan 22 07:50:57 kernel: Jan 22 07:50:57 kuji monit[838]:...
Jan 22 07:50:57 kernel: /etc/rc: WARNING: failed to star...
オリジナルマシンの設定をコピペしてクローン機に移したとき...
----
Total access &counter(total);:本日 &counter(today);:昨...
#counter([total|today|yesterday]);
終了行:
CONTENTS
#contents
----
Lastmodified &lastmod;
----
*Monit [#rdd4c6ef]
【参考URL】http://freebsd.fkimura.com/monit-a0.html
Monitとは、プロセスを監視して、例えばApacheのプロセス監視...
設定や監視プロセスの状態はGUIで確認できる。
https://FQDN:portNo ← portNoは
設定ファイル:/usr/local/etc/monitrc で設定したもの。デ...
*** monit のGUIページへのアクセス [#e5b3175d]
https://piano2nd.smb.net:2812/
&ref(monit.PNG);
**作業履歴 [#vf2096ec]
999 8:42 locate monit
1000 8:55 portinstall sysutils/monit
1001 8:58 cp /usr/local/etc/monitrc.sample /usr/loc...
monit_enable="YES" to rc.conf file
1003 9:06 /usr/local/etc/rc.d/monit start
1006 9:37 top
1007 9:39 /usr/local/etc/rc.d/monit restart
1012 9:55 /usr/local/etc/rc.d/monit restart
1014 10:11 apachectl -v
**/usr/local/etc/monitrc 【Monit:設定ファイル】 [#ye605e...
ssl化:letsencryptで取得した.pem を chmod 600 として利用...
########################################################...
## Monit control file
########################################################...
set daemon 30 # check services at 30 secon...
set logfile syslog
set mailserver localhost # primary mailserver
set alert root@smb.net # receive all alerts
set httpd port 2812 and
SSL ENABLE
PEMFILE /usr/local/etc/letsencrypt/live/piano2nd.smb.ne...
#use address localhost # only accept connection fro...
allow localhost
allow 192.168.1.139
allow 219.117.246.193/27
allow 210.255.122.209/28 # allow localhost to connect...
#allow admin:monit # require user 'admin' with ...
allow foo:hogehoge
########################################################...
## Services
########################################################...
### Apache ###
check process apache with pidfile /var/run/httpd.pid
start program = "/usr/local/etc/rc.d/apache24 start" wit...
stop program = "/usr/local/etc/rc.d/apache24 stop"
### amavisd ###
check process amavisd with pidfile /var/amavis/amavisd.pid
start program = "/usr/local/etc/rc.d/amavisd start" with...
stop program = "/usr/local/etc/rc.d/amavisd stop"
### clamav ###
check process clamav-clamd with pidfile /var/run/clamav/...
start program = "/usr/local/etc/rc.d/clamav-clamd start"...
stop program = "/usr/local/etc/rc.d/clamav-clamd stop"
### freshclam ###
check process clamav-freshclam with pidfile /var/run/cla...
start program = "/usr/local/etc/rc.d/clamav-freshclam st...
stop program = "/usr/local/etc/rc.d/clamav-freshclam stop"
### munin ###
check process munin with pidfile /var/run/munin/munin-no...
start program = "/usr/local/etc/rc.d/munin-node start" w...
stop program = "/usr/local/etc/rc.d/munin-node stop"
### named bind ###
check process bind with pidfile /var/run/named/pid
start program = "/usr/local/etc/rc.d/named start" with t...
stop program = "/usr/local/etc/rc.d/named stop"
# /usr/local/etc/rc.d/monit restart
* Monit の起動順 [#maeeecbc]
サーバを再起動した際、monitの起動が、監視プロセスよりも早...
ということで、
/usr/local/etc/rc.d/monit の # REQUIRE: NETWORKING SERVE...
#!/bin/sh
#
# $FreeBSD: head/sysutils/monit/files/monit.in 340872 20...
#
# PROVIDE: monit
# REQUIRE: NETWORKING SERVERS postfix apache24 cron
# BEFORE: DAEMON
# KEYWORD: shutdown
*NICが落ちると [#s974fc01]
console log
Jun 5 04:17:59 sun1 kernel: Jun 5 04:17:59 sun1 monit[...
Jun 5 04:17:59 sun1 kernel: Jun 5 04:17:59 sun1 monit[...
* The control file '/usr/local/etc/monitrc' permission 06...
Jan 22 07:50:57 kernel: The control file '/usr/local/etc...
Jan 22 07:50:57 kernel: Jan 22 07:50:57 kuji monit[838]:...
Jan 22 07:50:57 kernel: /etc/rc: WARNING: failed to star...
オリジナルマシンの設定をコピペしてクローン機に移したとき...
----
Total access &counter(total);:本日 &counter(today);:昨...
#counter([total|today|yesterday]);
ページ名: