参考配置 为了方便配置SrvReport,用户可以从其软件压缩包的/DOC目录中查看一份名为EXAMPLE.HTML的完整的srvreport.conf文件的配置清单。以下就是笔者按照“EXAMPLE.HTML”所配置的一份srvreport.conf配置清单,以粗体显示的变量可以根据Linux服务器和网络的实际情况进行修改。
## Configuration File for SrvReport
# Receiver of the mail-report(接收srvreport报告的电子邮件地址)
MailReport = webmaster@myschool.org
# filename for saving the html-report(保存HTML报告的文件名)
# may contain %%YYYY, %MM, %DD, which will be replaced with
# the apropriate values
(%YYYY, %MM, %DD分别表示年、月、日。一般由srvreport自动生成)
FileReport = ../web/html/%%YYYY-%%MM-%%DD.html
# path where the images are located(图片文件所保存的路径)
FileReportImgPath = ../../images/
# If you want an up-to-date file, then you should set this to 1
(如果你需要最新的文件报告,可以将FileReportCreateAlways和ReportWithTime的值设置为1)
FileReportCreateAlways = 1
ReportWithTime = 1
# This defines the order of the report
(定义srvreport所要监控的Linux服务器所提供的服务)
order = Traffic CPUUsage WebServer FTPServer
FTPLogs Postfix Warnings LastLogins ChkRootKit |
除了修改电子邮件地址和以加粗显示的几项参数之外,配置清单中大多数默认参数都是不需要修改的。当然,假设用户的Linux服务器中没有提供FTP服务,那么删除配置清单的[FTPServer]这个模块即可。