Integration Services
Call Us @ +91.9620800090

Monitoring moodle server with nagios

As we know that we can run Moodle on any traditional system running windows or any flavor of Linux. But the question arise how do you monitor the health of the server hosting Moodle. As a Moodle hosting providing company we have to consider the monitoring a vital aspect of the solution and service we are providing to our customer. So, how we are monitoring the Moodle hosting server? The answer is like any other windows and Linux server. I will share some of the key aspects you have to monitor using nagios as a monitoring system.

Nagios is a popular open source computer system and network monitoring software application. It watches hosts and services, alerting users when things go wrong and again when they get better. Nagios offers complete monitoring and alerting for servers, switches, applications, and services.

There are plenty of ways you can monitor a server using nagios for example through ssh, nrpe or snmp. In this blog post I will be explaining monitoring parameters of an Ubuntu server running Moodle. Following are the parameters we will be monitoring in Ubuntu server:-

  1. Disk usage (Depends upon the kind of content uploaded and the disk available)
  2. Web server (in our case it is Apache)
  3. APT Updates   ( To get the critical updates)
  4. CPU Load
  5. Memory (Very important because Moodle is memory intensive sometime take more than 50mb per user as mentioned by Moodle and observer depend upon the kind of operation)
  6. MySQL Server
  7. Ping (Connectivity)
  8. Swap File usage
  9. Total Process
  10. Users (For Security)

How to’s

  1. Install nrpe agent on Ubuntu server.
  2. Add a firewall rule to access the port 5666 from the remote Nagios server.
  3. Edit the file /etc/nagios/nrpe.d/agent.cfg and add the following 2 lines
  4. dont_blame_nrpe=1
  5. allowed_hosts=ip address of your nagios server (192.168.1.1)
  6. This will allow the Nagios server to probe Moodle server through nrpe.
  7. Also check the plugins available under /usr/lib/nagios/plugins and copy any custom Plugin you want to incorporate along with it.
  8. List of plugins required for monitoring the above parameters are:
    1. check_disk
    2. check_httpd
    3. check_apt
    4. check_load
    5. check_memory
    6. check_mysql
    7. check_ping
    8. check_swap
    9. check_procs
    10. check_users
  9. Start the service /etc/init.d/nagios-nrpe-server start
  10. Now check the status of the services from the nagios server.

You will get some of the graphs like below.

 

moodle nagios monitoring

 

Also you can have escalation in case of any parameter failure through email or sms.

Hope this post help you; please feel free to ask questions so that I will try to compose something more useful.

Leave a Reply

Testimonial

"I am very happy to work with Xeo as the value they provide on Open Source, helps me run our business with world class systems in a fraction of the price."
- Arpan, Director InfoSpace

Connect with us

Xeo Info Soft Pvt. Ltd.
Contact:Vikramjeet Singh
Mobile: +91-9620800090
Email: info@xeois.com
Bangalore, India