LAMP Stack Monitoring with Opsview - Part 1

LAMP stack monitoring

Background

Currently in Opsview and other monitoring solutions, the focus of the monitoring is the individual building blocks that an application comprises of – rather than the application itself.

This is good in situations where users only want to monitor an individual Apache or MySQL server, however when users need to combine these two, it can be a difficult and confusing experience – with either “overkill” information (250+ checks for MySQL, for example), making the data unreadable/unusable, or having too little information, i.e. “the apache2 / httpd process is running, but we don’t know how many current requests or response times, etc”.

With Opsview, the concept of "host templates" and “re-useable service checks” is well established, allowing users to simply “build” an application stack from the building blocks available, i.e. “add the Apache checks, add the MySQL checks, add the Linux checks” – however the templates didn’t always have the greatest details out of the box, and required some user involvement to modify them to the users exact environment.

Challenge

The challenge in Opsview 4.3 and onwards is to move away from a concept of system monitoring, and towards one of “service or application monitoring” instead. The potential issue however, is the multitude of potential stacks that could exist in customer’s environments, ranging from LAMP stacks running Drupal or Mediawiki/Wordpress, to WIMP stacks (Windows IIS MySQL/MS SQL/PHP) running other applications.

Cursory research shows that the most popular stack by far is the LAMP stack using MySQL as its database, so that would be the focus of the first 'Unified' Opspack.

Goal

To provide Opsview users out-of-the-box, a view from the top-down of their service or application; from application checks on Drupal ensuring everything is running well, to performance checks on Apache and MySQL (response times, processes, open files, current requests, etc), through to the underlying Linux system – such as CPU/RAM/File system usage. This view, bundled together, would allow a user to see and analyse every element of their LAMP stack in a single view.

How we did it

Whilst we already had MySQL and Apache functionalities in Opsview we felt that there was room for improvement. The challenge was to take the existing plugins shipped with Opsview (check_apache_performance and check_mysql_performance) and create service checks using the options available (a rather wide spectrum with the MySQL plugin giving us over 200+ options!).

Once these service checks where created and added to new host templates – “Application – Apache” (8 new checks) and “Database – MySQL Server” (39 new checks), we had 2 of the building blocks created for our LAMP stack (the *AMP) – as below:

MySQL Service Checks:

MSSQL service checks

Apache Service Checks:

Apache Service Checks

Next we had to look at the underlying operating system and how that is functioning from a CPU/FS/RAM etc perspective.

Once again, the plugins were already at our disposal, we just needed to create service checks to utilise them – from check_snmp_loadavg to check_snmp_fs_util (load average and FS utilisation, respectively).

We built service checks from these plugins, and bundled them into a new host template called “OS - SNMP Agentless” as below:

Linux host checks:

Linux Host Checks

Now complete, we have the full range of Linux-Apache-MySQL-PHP monitored – however they are still in individual host templates. This is quickly remedied, as we can easily apply all of these templates to a single host. However it would have rather a lot of host checks against it (around 60) making interpretation potentially difficult.

We needed to restrict this down to around 15-20 “core” host checks in a “LAMP – Drupal” host template – to which we can add our Drupal and other elements later. Thankfully in Opsview, the addition of these new checks is very simple and done via the GUI, allowing us to have our “LAMP – Drupal” host template completed within minutes.

A LAMP host was then added using our new template, giving us an end-to-end view as below:

LAMP host template:

Lamp Host Template

This is a great view into our LAMP stack, showing us everything from load and memory usage, through to in-depth MySQL statistics and finally in-depth apache statistics –and the best news is, if there is a check that you require that isnt in the template, you can simply modify it and add it using the Opsview GUI in a matter of clicks.

In the next post we'll show you how to add an application to the stack to give complete end-to-end monitoring.

Comments

jlukeadan's picture
19 February 2014 - 6:22am

Brilliant information being shared here with us, learned best examples from it to make myself more awared of with this situation

Does Walmart Sell Garcinia Cambogia
Best Garcinia Cambogia to Buy
Dr. Oz Garcinia Cambogia Where to Buy
Buy Garcinia Cambogia Pills
Where to Buy Garcinia Cambogia at Walmart

com2014's picture
10 March 2014 - 11:46am

Glad to visit your blog, I look forward to more good articles and I think we all like to thank so many good articles, blog to share with us.
Buffalo NY wordpress and Buffalo NY web design services

jlukeadan's picture
11 March 2014 - 5:31am

My reasearch work has just came to a conclusion after reading this brilliant masterpiece and i am making a wise decision to share it

Dr Oz Garcinia Cambogia
Xtreme Garcinia Cambogia
garcinia cambogia at walmart
whole body garcinia cambogia
ias coaching in delhi

Rq
Rq

Call us for a quote

866·662·4160

International numbers