Monitor OpenShift Performance Metrics
Congratulations. You have successfully deployed your application on OpenShift. Now you want to monitor it like the rest of your infrastructure without turning it into a week-long project.
With Datadog’s newest OpenShift performance metrics integration, all your gears will show up automatically in Datadog, where you can easily set up graphs and alerts to fit your needs.
The Datadog cartridge lets you install the Datadog Agent on your gears and collect metrics from your apps. This cartridge supports both scalable and non-scalable apps.
What you need
Read on for a step-by-step installation guide.
See all your gears (and more) on a single page
Datadog collects metrics from OpenShift gears and any other servers running on-premise or on other cloud environments. These can all be seen on the same page and then filtered through based on metrics or tags related to these servers.
Here’s a clip from an infrastructure page, filtered to focus on two OpenShift gears running alongside 260 other servers:
Get alerted when your gears misbehave
Immediately after the Datadog agent is installed on an OpenShift gear, all system metrics will begin to flow into Datadog and be available for graphing and alerting.
You can set up alerts on any metric coming from your gears. If you have enabled Datadog integrations in the agents running on your gears, you can use these metrics too.
Here’s a simple example of an alert that will trigger when CPU usage goes above 10% for a specific gear:
In addition to generating events in your stream, alerts can be set to go through email, HipChat, PagerDuty, and other endpoints defined through our WebHooks integration.
Here is what happens when the alert in the example above triggers:
Interested in learning more about alerting? We have a guide to alerting.
See more: enable integrations
Datadog will not only collect system metrics from your gears, but also the metrics and events from all of the systems in your environment. Here is an example of a MySQL dashboard after adding the MySQL cartridge to an OpenShift application:
It’s a simple matter of editing a few yaml files in the agent configuration directory (
Correlate Openshift performance with the rest of your infrastructure
You can then overlay the events from other systems over the collected OpenShift performance metrics to determine whether another system or piece of infrastructure may have impacted OpenShift gears.
For example, here are some graphs from the integration with overlaid events. Notice an event announcing the beginning of the load test that is highlighted in purple and overlaid on the graphs:
Monitoring that scales with your app
If you’re running a scalable app, you probably don’t care so much about individual gears. Your monitoring scales with the application thanks to:
The Datadog cartridge automatically deployed on all your gears
Graphs and dashboards that support arbitrary large number of gears
Alerts that monitor aggregate performance when you don’t care about specific gears. For more information about advanced features, please consult our guides.
Get your Datadog API key here and define the
DATADOG_API_KEYenvironment variable in your OpenShift app:
rhc set-env DATADOG_API_KEY=your_api_key -a myapp
Add the cartridge to your gear:
rhc cartridge-add http://cartreflect-claytondev.rhcloud.com/github/datadog/datadog-openshift -a myapp
sshto your gear to work with the agent:
ssh XXXXXXXXX@myapp.rhcloud.com. If you have trouble connecting to your gear, read this guide. You can use several commands to interact with the Agent:
$OPENSHIFT_DATADOG_DIR/bin/control start|stop|restart|status|info. Extra configuration files are located at
At this point, the Agent should be running on the gear and appear on the Infrastructure Overview:
You can configure integrations to monitor other important parts of your stack, such as data stores, caches, web servers, and more. Here is the list of the available integrations.
If you’d like to get this visibility into your OpenShift environment, sign up for a 14 day free trial of Datadog, and then install the Datadog Agent on your OpenShift gears. The agent is completely open source, so you can read through every line of it, before installing it on your OpenShift gears or other servers.