The entire purpose of monitoring, is making sure your systems and services are functioning as expected. As expected to who though? The point of view matters quite a bit here, both to a potential service end-user and to you as an administrator of said service.
Take a classic LAMP setup for instance. We need to make sure key components like Apache and MySQL are up and running. We also want to make sure they are responding correctly. All of this can be achieved using the Zabbix Agent and Simple Checks. A few item examples could be:
- Check for running processes (Zabbix Agent)
- proc.num[httpd]
- proc.num[mysqld]
- Check HTTP response and performance (Simple check)
- net.tcp.service[http]
- net.tcp.service.perf[http]
The Point of View
These are all very interesting things to keep an eye on from an administrators perspective. “net.tcp.service.perf” even tells you a little bit about end-user performance as well. Ultimately though, these checks are great to keep an eye on, but do not tell you much with regards to the experience of the end-user. We only know that the back-end is running correctly, but can users actually view and use your website? Are they receiving data in a timely fashion?
In the case of LAMP services monitoring, Zabbix has a feature called Web Monitoring. With Web Monitoring we can set up scenarios where we try to reach a website and monitor the results. With Web Monitoring we can get information like download speed, response time and response code for specific URLs on your site. A simple scenario could be trying to access “http://www.your-website.com/” an monitoring if the attempt was successful or not, the time it took the website to respond, if a certain string was received and so on. The Zabbix documentation also has examples of far more advanced scenarios here.
This allows us to keep an eye on how our LAMP setup is performing from the Point of View of the end-user, the person who often matters the most to us. Ensuring Apache and MySQL is up and running is important, but validating that content can be served is vital and by far the most important metric to monitor regularly. A lot of things can interrupt a service, like improperly configured network equipment, a faulty storage system or too few resources being available.
As an added note, utilizing remotely located Zabbix Proxies can further ensure you get a realistic view of how your services are performing to remote users.
Make sure not only to monitor what you expect of your services, but also what your users expect of those services!