OpenShift V3 Persistent Storage Nagios Plugin


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.

sample config:
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
        }
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s