The Graph API includes a number of interfaces for managing a graph representing a given service function chain, a.k.a. a media service. This includes endpoints for creating and deleting various parts of the graph as well as running data queries, e.g. round trip time query. Ultimately, we use these to perform graph-based monitoring which includes the following steps:
1) convert from time-series data to graph nodes and relationships
2) build a temporal graph, that is a graph which represents the status of the media service in a given time range
3) query the temporal graph for round-trip time measurements
4) save the new measurements into InfluxDB
5) delete the temporal graph
6) repeat after a user-defined time period, e.g. 30 seconds
All of this is automated in what is called the graph pipeline bash script located at **scripts/clmc-service/graph-pipeline.sh**. Whenever graph-based monitoring is requested through the CLMC service API, this script is ran in the background in a child process (the CLMC application server is the parent process). The graph API allows certain level of control operations over this process - start, stop and fetch status.
#### Implementation details of the Alerts API
The Alerts API is implemented on top of the Kapacitor HTTP API and includes the following main parts: