我想要创建一个工具,我们可以用它来管理server.There,在这个问题中有两个问题:
- use a watch over access log(in case of apache) and then count the number of times the notification occurs and note down the time simultaneously
- Parse access.log file every time and then generate the output(but access.log file can be very big, so not sure about this idea)我对apache很熟悉,因此上面的想法是基于apache的访问日志的,我不知道其他类似于nginx之类的东西。
因此,我想知道,我是否可以采用上述程序,或是否有其他可能的方法。
发布于 2014-10-13 21:32:48
要监视web服务器,最简单的方法可能是使用一些现有的工具,比如webalizer。http://www.webalizer.org/
为了监控CPU和内存的使用情况,我建议与mrtg等其他工具一起使用snmpd。http://oss.oetiker.ch/mrtg/
如果您认为webalizer不经常用它的小时统计数据对数据进行采样,但是mrtg在5分钟内的采样时间会更好,那么还可以通过编写snmpd扩展来提供更多的snmpd数据。这样的扩展可以用相当少的代码解析apache日志文件,并为您提供不需要mrtg或其他工具处理snmp数据的所有图形化功能。
https://stackoverflow.com/questions/26348631
复制相似问题