Quantcast
Channel: Severalnines
Viewing all articles
Browse latest Browse all 1480

How to use the ClusterControl REST API to automate your Database Cluster

$
0
0
March 11, 2014
By Severalnines

For ops folks with multiple environments and instances to manage, a fully programmable infrastructure is the basis for automation. ClusterControl exposes all functionality through a REST API. The web UI also interacts with the REST API to retrieve monitoring data (cluster load, alarms, backup status, etc.) or to send management commands (add/remove nodes, run backups, upgrade a cluster, add/remove load balancer, etc.). The API is written in PHP and runs under Apache. The diagram below illustrates the architecture of ClusterControl.

Figure: ClusterControl - Agentless Architecture

 

In this blog post, we will show you how to interact directly with the ClusterControl API to retrieve monitoring data or to perform management tasks.

All requests against ClusterControl API URL should include the ClusterControl API Token as HTTP header (CMON_TOKEN) for authentication. The ClusterControl API URL and token can be retrieved from the Cluster Registrations page in the ClusterControl UI.

 

Retrieving Monitoring Data

 

The request URI with query strings should be in the following format:

<ClusterControl API URL>/<API group>.json?clusterid=<Cluster ID>&_dc=<Unix Timestamp>&<options>

 

read more


Viewing all articles
Browse latest Browse all 1480

Trending Articles