# Custom Shell Check for Datadog Agents

> A custom Datadog check that executes shell commands and publishes results as metrics.

- Canonical URL: https://webofmike.com/custom-shell-check-for-datadog-agents/
- Author: Mike Moore (https://webofmike.com/about/)
- Published: 2019-01-04
- Last modified: 2019-01-04
- Tags: Datadog, Monitoring, Tutorials, Code
- Cite as: Mike Moore, "Custom Shell Check for Datadog Agents", Web of Mike (webofmike.com), 2019-01-04. https://webofmike.com/custom-shell-check-for-datadog-agents/


The Datadog agent stands out for its extensibility. While many out-of-the-box integrations exist, edge cases often require custom solutions.

This article presents a standalone custom check that executes shell commands and retrieves numeric values from their output, publishing results to Datadog as metrics named `shell.your_metric_name` at regular agent check intervals.

The check overcomes versioning challenges where previous implementations relied on agent-included code that changed across updates. This rewritten version operates independently.

The complete code is available at the GitHub repository: [themsquared/datadog-checks/shell](https://github.com/themsquared/datadog-checks/tree/master/shell). For configuration and implementation guidance, consult the official Datadog Agent documentation.

