OnApp Services Monitoring Tool

OnApp introduces the special service - Monit - that will be monitoring services running in OnApp cloud - on Control Panel and Hypervisors. It will automatically restart the services which will be down.

Enable Monit

Monit is enabled by default.

ENABLE_MONIT=1 is set in the /onapp/onapp-cp.conf for the Control Panel and in the /etc/onapp.conf - for Static Hypervisors. 
To disable, set the value to 0

List of monitored services

Control Panel:

  • host's uptime, load average, CPU, memory and swap usage

  • crond

  • ntpd

  • onapp_daemon

  • sshd

  • redis

  • mysql

  • mariadb

  • syslogd

  • rsyslog

Corresponded configuration files .conf are placed into /etc/monit.d directory during the onapp-cp-monit package install/upgrade

Static Hypervisor:

  • host's uptime load average, CPU, memory and swap usage

  • crond

  • libvirtd

  • ntpd

  • snmpd

  • sshd

  • storageAPI

  • syslogd

  • rsyslog

  • tgtd

  • xend

Corresponded configuration files .conf are placed into /etc/monit.d directory during the onapp-hv-monit package install/upgrade


Local and remote services

Service's configuration files' templates .conf.tmpl and .conf.tmpl.local are placed into the /onapp/onapp-monit directory. There are some, named as .tmpl and .tmpl.local, for the same services:


This indicates, the configuration tool supports both local and remote instances of MySQL, MariaDB and Redis services. The configuration tool determines the services location from config/database.yml for the MySQL/MariaDB, and from config/redis.yml - for the Redis server. The result monit configuration file .conf is generated respectively from one of these templates. 

Customising configuration files for the monitored services

The configuration files' templates (.tmpl and .tmpl.local in the /onapp/onapp-monit) are replaced with default ones, every time the monit RPM package for OnApp is upgraded.

To customise configuration file for any of monitored services (for example with new monitoring parameters/events), just copy/or create new template named as <service>.conf.tmpl.custom or <service>.conf.tmpl.local.custom in the /onapp/onapp-monit directory. Replace <service> with the name of one of monitored services. For example redis.conf.tmpl.local.custom.

Edit the .custom file according to your needs. When done, run monit configuration tools for OnApp:

Control Panel

# /onapp/onapp-monit/onapp-cp-monit.sh

Static Hypervisor

# /onapp/onapp-monit/onapp-hv-monit.sh

Do not put any extra configuration files into /etc/monit.d directory. The configuration tool just remove all *.conf from there, and place new generated from templates.


Monitoring the status using a command line

To get a short status summary for the the monitored services run:

# monit summary

The output will be similar to the below (Control Panel services example):

The Monit daemon 5.5 uptime: 1h 42m 

System 'example.com'                Resource limit matched
Process 'sshd'                      Running
Process 'syslogd'                   Running
Process 'redis-server'              Running
File 'redis_bin'                    Accessible
File 'redis_rc'                     Accessible
Process 'onapp_daemon'              Running
File 'onapp_daemon_rc'              Accessible
Process 'ntpd'                      Running
Process 'MySQL'                     Running
File 'mysql_bin'                    Accessible
File 'mysql_rc'                     Accessible
Process 'crond'                     Running
File 'crond_rc'                     Accessible

Please note, the Monit version could different.


To print the status information for each service run:

# monit status

Use linux man pages for more monit command line tool options.

OnApp CP interface

Service monitoring can be accessed and managed from OnApp CP > Sysadmin tools > Availability check.

There you can perform the following:

  • see its status

  • Reload

  • Disable

  • Enable

  • Check status

Monit web interface


The Monit's web interface is disabled by default. To enable, just edit the /etc/monit.conf and set:

set httpd port 2812 and
    use address BOX_PUBLIC_IP   # only accept connection from BOX_PUBLIC_IP
    allow xxx.xxx.xxx.xxx        # allow xxx.xxx.xxx.xxx to connect to the server and
    allow admin:********  # require user 'admin' with password ********
    allow @monit           # allow users of group 'monit' to connect (rw)
    allow @users readonly  # allow users of group 'users' to connect readonly

Restart the monit service.

Using the Monit web interface you can select the processes which are being monitored and see their details:


To restart monit:

# service monit restart

To stop the monit service, and disable OnApp related services monitoring, run:

# service monit stop
It is required to stop Monit before stopping OnApp services (during update/install processes). Otherwise Monit will restart the services.