Service Checks Submission: DogStatsD
Incident Management is now generally available! Incident Management is now generally available!

Service Checks Submission: DogStatsD

While StatsD accepts only metrics, DogStatsD accepts all three of the major Datadog data types: metrics, events, and service checks. This section shows typical use cases for service checks with code examples.


After installing DogStatsD, you can send service checks to Datadog with the following function:


Service check function parameters:

ParameterTypeRequiredDefault ValueDescription
<SERVICE_CHECK_NAME>StringYes-The name of the service check.
<STATUS>IntYes-A constant describing the service status: 0 for OK, 1 for WARN, 2 for CRITICAL, and 3 for UNKNOWN.
<TAGS>List of stringsNo-A list of tags to associate with the service check.
<HOSTNAME>StringNoCurrent hostThe hostname to associate with the service check.
<MESSAGE>StringNo-Additional information or a description of why the status occurred.

Code examples

Choose your language for a service check code example:

from datadog import initialize, statsd

options = {"statsd_host": "", "statsd_port": 8125}


    message="Application is OK",
require 'datadog/statsd'

statsd ='localhost', 8125)

statsd.service_check('application.service_check', 0, {'message' => 'Application is OK'})
package main

import (


func main() {

    dogstatsdClient, err := statsd.New("")

    if err != nil {

    for {
        dogstatsdClient.SimpleServiceCheck("application.service_check", 0)
        time.Sleep(10 * time.Second)
import com.timgroup.statsd.ServiceCheck;
import com.timgroup.statsd.NonBlockingStatsDClientBuilder;
import com.timgroup.statsd.StatsDClient;

public class DogStatsdClient {

    public static void main(String[] args) throws Exception {

        StatsDClient Statsd = new NonBlockingStatsDClientBuilder()

        ServiceCheck sc = ServiceCheck.builder()

using StatsdClient;

public class DogStatsdClient
    public static void Main()
        var dogstatsdConfig = new StatsdConfig
            StatsdServerName = "",
            StatsdPort = 8125,

        using (var dogStatsdService = new DogStatsdService())
            dogStatsdService.ServiceCheck("", 0, message: "Application is OK.", tags: new[] { "env:dev" });

require __DIR__ . '/vendor/autoload.php';

use DataDog\DogStatsd;

$statsd = new DogStatsd(
    array('host' => '',
          'port' => 8125,

$statsd->service_check('', 0);

After a service check is reported, use it to trigger a custom check monitor.

Further reading