Enable StatsD with REST API Service Endpoints

If you did not enable StatsD service while setting up the deployment and Service Manager using OGGCA, then use the following steps to enable StatsD using REST API service calls.

  1. Stop the deployment:
    curl -k -u username:password \
    -d '{"status": "stopped","enabled": false}' \
    -X PATCH https://hostname:port/services/v2/deployments/deployment_name
  2. Enable StatsD:
    curl -svu username:password \
    -X PATCH http://hostname:port/services/v2/deployments/deployment_name \
    --data '{
           "metrics": 
                         {
                               "enabled":true, 
                                "servers": 
                                       [
                                                   {      
                                                          "type":"pmsrvr", 
                                                            "protocol":"uds"
                                                    }, 
                                                     {      
                                                           "type":"statsd", 
                                                            "host":"<statsd_host>"
                                                    }
                                      ]
                         }
                 }'
  3. Start the deployment:
    curl -k -u username:password \
    -d '{"status": "running","enabled": true}' \
    -X PATCH https://hostname:port/services/v2/deployments/deployment_name

Also see Update a Deployment.