By the time of writing, OpenShift V3 comes with poor monitoring capabilities. The build-in monitoring only checks the metrics of Memory/CPU/Network, and it does not even support alerting! And the lowest granular level only down to last hour. So you have to build your own monitoring if you want to keep close eyes on your services running on OpenShift.
I wrote a Nagios plugin to monitor the persistent storage usage. Here are a few things you need to know:
– The pods come and go, and the volumes are changeable, so the plugin is self-discovery for the given project. It means you only need to provide the project name when config in Nagios.
– The volume checks are per each project, not per each volume. If any one of the volume in the project is over 80%/90% usage, Nagios will trigger warning/critical alerts.
define service{ use generic-service host_name www.mysite.com service_description Openshift Volume Checks servicegroups openshift-site-checks check_command check-openshift-pv-size!my-site-project contact_groups devops }