What tools do you use to monitor a Ubuntu web server? More specifically, I'd like to monitor server uptime, resource usage (RAM, CPU, bandwidth, etc.), Apache, MySQL and PHP.
What tools do you use to monitor a Ubuntu web server? More specifically, I'd like to monitor server uptime, resource usage (RAM, CPU, bandwidth, etc.), Apache, MySQL and PHP.
Nagios is my favorite tool for monitoring. It can monitor web servers,services,hosts and so on. It is highly customizable and there are lot plugins available for various purpose.
Some features of nagios:
Here is an online demo: http://nagioscore.demos.nagios.com/
munin
and its plugins are all you need.It checks resources (like the others do) but unlike them, it's completely non-interactive. It writes out a batch of HTML files and graphs each time it updates. You can automatically zip these up and email them to you (the script would have to be your work but it would be simple) or you can make them available through Apache et al (just bind a virtualhost's root to
/var/www/munin/
).The huge advantage over other (interactive) avenues is it's not a security risk. Running Webmin (as one example) means there's a process running that people can communicate with. That's an attack vector into your system. And being a fairly popular application means it's well targeted by people that script-hack servers.
It might be a bit "tinfoil hat" but security really is much easier to work with when you've only got a couple of vectors to cover.
For a live view i would login using ssh and then run
htop
(for cpu, mem) andnload
for network load.both htop and nload are available in the Ubuntu repositories.
It depends on the needs. But this is my monitoring stack
sar
,top
,uptime
,iostat
,vmstat
,netstat
etc in files. But managing that huge logs was becoming impossible for me. SeaLion execute all these commands and show it in a beautiful timeline format. Also to mention that installation is so damn easy and simple.If you need a quick and simple information, ubuntu has a tool called
landscape-sysinfo
This will print out: system load, hard-disk usage, memory usage, no of processes, and ip addresses of you box
Just enter in your console:
I like to use a package that most people will probably use called Webmin
It's a web based program that allows you to monitor almost any server stats, it allows you to change power options (like shutdown, restart). You can add users, start/stop services and almost anything you would need to do for a server. I recommend you give it a try!
Here is a good tutorial to install it
It says Jaunty, but should work with any version of Ubuntu :)
Webmin is considered highly insecure, however.
If you need something that scales (in other words, you may end up monitoring multiple webservers, dns servers, etc), then I recommend Cacti.
It has steeper-than-most learning curve, but I've used it in the past to collect 800+ statistics every minute from various sources. The collection process, since it's threaded, completes in about 40 seconds.
It uses RRDtool to graph the sources. It's web based and it's in the repositories.
"What tools do you use to monitor a Ubuntu web server?"
I prefer homegrown solutions to the big, bulky packages like Nagios, which have the tendency to inundate my already inundated inbox. I have a little Ubuntu Linux box running on my local network:
http://www.newegg.com/Product/Product.aspx?Item=N82E16856119070
It collects information from other boxes (including web servers) using custom-built scripts and then sends an e-mail to a local user. It runs Postfix (SMTP) and Dovecot (POP3) so Postfix receives the e-mail and delivers it to Dovecot. Then I use Thunderbird on my desktop to point at Dovecot and retrieve the messages that are generated.
I've found that unless I do the custom-built thing, I end up receiving a zillion messages that I just ignore even if there is a problem that I need to look at. Pretty graphs are nice, but being told precisely what the problem is happens to be way better. However, refined control like this is only possible with custom-built software.
http://packages.ubuntu.com/serverstat
It's some PHP scripts that drives rrdtools and doesn't require MySQL like cacti.