Does anyone know of a bash or similar script that will pull stats from a Linux server and display them on a centralized web page or send a report via email every "x" hours?
I've found services that offer something close but they are cost prohibitive and missing some of the stats I'd want and some functions just don't work, etc.
The idea would be to pull:
- CPU load
- RAM and SWAP
- Disk used / free
- TX and RX for a given time period (year to date, month, week and day)
- Active processes
- IPs attempting login (failures from secure log on my CentOS boxes)
I'd like to pull the reports to a central server and display them on a web page but having the reports emailed on a timed basis would be better than nothing.
Another software you could use is munin. You can do everything you want with munin but for some parts it needs some complex configuration. We have munin running for several years and are very happy with it.
Have you tried the free server monitoring in New Relic ?
I use ganglia.
Here's an example demo site for wikimedia.
You get many of your requested metrics for free. Gmetric provides a quick interface to graph arbitrary metrics as well.
Nagios is an open source project that should do 90% of what you're looking for in your list of requirements. Like most monitoring tools Nagios uses ICMP and SNMP to monitor remote systems, however, it also has an add-on called the Nagios Remote Plugin Executor (NRPE). NRPE is essentially an agent running on the machine you want to monitor; from the Nagios monitoring system you issue commands to the NRPE process on the monitored system and feedback is presented thorugh the Nagios web interface. I use NRPE to monitor everything in your requirements list but the CentOS failed logins; for this I use OSSEC.
Nagios screenshot:
OSSEC is an open source project that I would consider for watching your secure log on the CentOS machines. This tool is an agent/server based architecture that can monitor your Windows or Linux systems for a variety security related events, to include failed logins. The functionality goes beyond log monitoring though, check out the file and registry integrity checking, anomaly detection, reporting and active response.
It will take some time to learn these two tools but I believe it will be time well spent. Both projects have been around for years and will remain for years to come.
Most monitoring tools can do this. Either by pulling the values via snmp or with ab agent that will collect that data.
Building something custom out of mrtg is a common practice, although kind of handwork. OVH has built something like that for their dedicated servers. See : ftp://ftp.ovh.net/made-in-ovh/mrtg-sys
Most small-to-medium companies will use Nagios with Centreon or any other kind of consolidation tool. Also see Canopsis for building Hypervision over supervised servers