Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at Ellen's Stardust Diner (New York City) with: Colin Silverberg and Carol Loffelmann and Daniel Silverberg
Ben Nadel at Ellen's Stardust Diner (New York City) with: Colin Silverberg , Carol Loffelmann ( @Mommy_md ) , and Daniel Silverberg

Adding Service Check Support For My DataDog / DogStatsD ColdFusion Component

By Ben Nadel on
Tags: ColdFusion

This morning, I added DogStatsD event support to StatsDGateway.cfc - my StatsD client for ColdFusion. Now, I'm rounding out the DogStatsD extensions to the core StatsD protocol with service check support. Service checks allow your application to report service health back to DataDogHQ where it can be used visualize, monitor, and send alerts. At least, that's the idea - I've never actually used it before.

View the StatsDGatway.cfc project on my GitHub account.

This update adds the serviceCheck() method to the DogStatsDClient.cfc ColdFusion component. The serviceCheck() method requires the name of the service and its status; but, it also allows for a number of optional arguments:

  • name - Required. I am the name of the service whose status being reported.
  • status - Required. I am the status of the given service. Possible values:
    • "ok" - DogStatsDClient.STATUS.OK
    • "warning" - DogStatsDClient.STATUS.WARNING
    • "critical" - DogStatsDClient.STATUS.CRITICAL
    • "unknown" - DogStatsDClient.STATUS.UNKNOWN
  • timestamp - I am the UTC seconds of the service check (default is now).
  • hostname - I am the hostname of the service check.
  • tags - I am the collection of tags associated with the service check.
  • message - I am a message to associate with the service check.

Like I said above, I've haven't really used this feature yet - but I wanted to support it. In order to make sure that it was working, I send a "Blog" service check when my website is initialized. And, as you can see, it shows up in DataDogHQ as healthy:


 
 
 

 
Sending service health checks back to DataDogHQ using StatsDGateway.cfc in ColdFusion.  
 
 
 

As I've been building out support for DogStatsD in ColdFusion, it's really made me see how robust DataDog is. It's an intense platform; and I clearly only scratched the surface of it. It will be exciting to learn more about it.




Reader Comments

Post A Comment

You — Get Out Of My Dreams, Get Into My Comments
Live in the Now
Oops!
Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.