Control Plane API
Snowplow Mini Control Plane API is created for controlling and configuring the Snowplow Mini instance without ssh to it.
You can use control plane from Snowplow Mini dashboard or you can send a request to a specific endpoint of the API with any HTTP client e.g. cURL
Authentication#
The Control Plane uses HTTP basic access authentication.
This means that you need to add "-u username:password" to all curl commands, where username and password are as you specified in the Snowplow Mini setup.
Current Methods#
Service restart
/control-plane/restart-services
Example using curl:
$ curl -XPUT http://${snowplow_mini_ip}/control-plane/restart-services \ -u username:password
Restarts all the services running on the Snowplow Mini, including Stream Collector, Stream Enrich, Elasticsearch Loader.
This API call blocks until all the services have been restarted.
Return status 200 means that services have been successfully restarted.
Resetting Elasticsearch indices
As of 0.13.0, it is possible to reset Elasticsearch indices, along with the corresponding index patterns in Kibana, through Control Plane API.
curl -L \
-X POST '<mini-address>/control-plane/reset-service' \
-u '<username>:<password>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'service_name=elasticsearch'
Note that resetting deletes not only indices and patterns but also all events stored so far.
Restart services individually
As of 0.13.0, it is possible to restart services one by one.
curl -L \
-X PUT '<mini-address>/control-plane/restart-service' \
-u '<username>:<password>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'service_name=<service_name>'
where service_name can be one of the following: collector, enrich, esLoaderGood, esLoaderBad, iglu, kibana, elasticsearch.