Skip to main content
Ben Nadel at InVision In Real Life (IRL) 2018 (Hollywood, CA) with: Scott Van Hess
Ben Nadel at InVision In Real Life (IRL) 2018 (Hollywood, CA) with: Scott Van Hess

Adding Service Check Support For My DataDog / DogStatsD ColdFusion Component

By
Published in

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

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel