Adding Service Check Support For My DataDog / DogStatsD ColdFusion Component
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:
|
|
|
||
|
|
|||
|
|
|
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