public

Custom Shell Check for Datadog Agents

One of the greatest things I've found aboutDatadog [https://datadoghq.com]agent is it's extensible nature.  While there are numerous OOB integrations, we often find an

7 years ago

Latest Post Unlocking Unlimited Observability: How groundcover’s eBPF Powers Full Visibility Without Limits by Mike Moore public

One of the greatest things I've found about Datadog agent is it's extensible nature.  While there are numerous OOB integrations, we often find an edge case or two that require some quick code and a custom check here and there.

This is one that had previously been put up in one of the repos but I found that as the agent had updated, this check to run shell commands and retrieve metrics relied on some code that was included with the agent that changed over some revisions. So... I re-wrote this to operate as a standalone.

This check allows you to run shell commands, retrieve a numeric value from them, and publish them to your Datadog account with the metric names shell.your_metric_name at the regular agent check interval.

You can find all of this code at the link above or just go to https://github.com/themsquared/datadog-checks/tree/master/shell and check it out!  You can find out more about the Datadog Agent and where these config and check files go by checking out the docs here:  https://docs.datadoghq.com/agent/

Questions? Feel free to post them below or hit me up on any of my social media channels!

Mike Moore

Published 7 years ago