cd /usr/local/smokeping/ mkdir cache data var #需要自行创建这几个目录 touch /var/log/smokeping.log #创建日志文件 chown apache:apache cache data var #阿帕奇权限配置 chown apache:apache /var/log/smokeping.log #阿帕奇权限配置 chmod 600 /usr/local/smokeping/etc/smokeping_secrets.dist #必须给600权限 cd /usr/local/smokeping/htdocs mv smokeping.fcgi.dist smokeping.fcgi cd /usr/local/smokeping/etc mv config.dist config
Alias /cache "/usr/local/smokeping/cache/" Alias /cropper "/usr/local/smokeping/htdocs/cropper/" Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi" <Directory "/usr/local/smokeping"> AllowOverride None Options All AddHandler cgi-script .fcgi .cgi Order allow,deny Allow from all DirectoryIndex smokeping.fcgi </Directory>
+ Other menu = 网络监控 title = 监控统计 ++ PhiWeb menu = PhiWeb网络状态 title = PhiWeb网络监控 +++ Master menu = Phi主控 title = Phi主控 alerts = someloss host = 12.34.56.78 +++ SlaveServer02 menu = PhiServer02 title = PhiServer02 alerts = someloss host = 12.34.56.78 +++ SlaveServer03 menu = PhiServer03 title = PhiServer02 alerts = someloss host = 12.34.56.78
+是第一层,++是第二层,+++ 是第三层,根据实际情况修改
启动SmokePing
1
/usr/local/smokeping/bin/smokeping
现在查看网页会发现乱码
修改配置文件,指定字符集
1
vim /usr/local/smokeping/etc/config
在Presentation下添加charset = utf-8 安装字体包
1
yum -y install wqy-zenhei-fonts
修改 Graphs.pm
1
vim /usr/local/smokeping/lib/Smokeping/Graphs.pm
在148行附近寻找,增加这一行 ‘–font TITLE:20””‘,
SmokePing有个问题,无法重载配置,只能手动Kill掉进程再启动
1 2 3 4 5 6 7 8 9
[root@localhost etc]# /usr/local/smokeping/bin/smokeping Note: logging to syslog as local0/info. ERROR: I Quit! Another copy of /usr/local/smokeping/bin/smokeping (87268) seems to be running. Check /usr/local/smokeping/var/smokeping.pid [root@localhost etc]# kill 87268 [root@localhost etc]# /usr/local/smokeping/bin/smokeping Note: logging to syslog as local0/info. Daemonizing /usr/local/smokeping/bin/smokeping ... [root@localhost etc]#