Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at Scotch On The Rocks (SOTR) 2011 (Edinburgh) with: Cyril Hanquez
Ben Nadel at Scotch On The Rocks (SOTR) 2011 (Edinburgh) with: Cyril Hanquez@Fitzchev )

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.

Looking For A New Job?

Ooops, there are no jobs. Post one now for only $29 and own this real estate!

100% of job board revenue is donated to Kiva. Loans that change livesFind out more »

Reader Comments

Post A Comment

You — Get Out Of My Dreams, Get Into My Comments
Live in the Now
NEW: Some basic markdown formatting is now supported: bold, italic, blockquotes, lists, fenced code-blocks. Read more about markdown syntax »
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.