Disable StatsD with REST API Service Endpoints

To disable the StatsD service in an existing deployment using REST API service calls, perform the following steps:

  1. Stop the deployment:
    curl -k -u username:password \
    -d '{"status": "stopped","enabled": true}' \
    -X PATCH https://hostname:port/services/v2/deployments/deployment_name
  2. Disable StatsD:
    curl -svu username:password \
    -X PATCH http://hostname:port/services/v2/deployments/deployment_name \
    --data '{
           "metrics": 
                         {
                               "enabled":false, 
                                "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.