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.
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
host's uptime, load average, CPU, memory and swap usage
Corresponded configuration files .conf are placed into /etc/monit.d directory during the onapp-cp-monit package install/upgrade
host's uptime load average, CPU, memory and swap usage
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:
Monitoring the status using a command line
To get a short status summary for the the monitored services run:
The output will be similar to the below (Control Panel services example):
Please note, the Monit version could different.
To print the status information for each service run:
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
Monit web interface
The Monit's web interface is disabled by default. To enable, just edit the /etc/monit.conf and set:
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:
To stop the monit service, and disable OnApp related services monitoring, run: