Skip to content
Snippets Groups Projects
Commit 3c8ed17b authored by Nikolay Stanchev's avatar Nikolay Stanchev
Browse files

Extends CLMC dev guide with an example on how to request graph-based monitoring on the sandpit

parent 7c9f4f3c
Branches clmc-service
No related tags found
No related merge requests found
......@@ -447,11 +447,41 @@ Since the Neo4j browser uses an adhoc port number (7687) we need a second tunnel
Then by opening the URL above, the Neo4j browser will ask about credentials:
Host: localhost (the port forwarding will forward port 7687 on localhost to port 7687 on the CLMC)
Username: neo4j
Password: admin
Then we can execute Cypher queries against the Neo4j graph, the most useful one: ` MATCH (n) return n;` which will render the full graph.
After the network topology graph is built, a media service provider can request graph-based monitoring. An example of how to request this, assuming that the SFC **sandpit-experiment** has been deployed (TOSCA files and LXD image included in sandpit repository in folder itinnov):
JSON configuration:
```json
{
"query_period": 30,
"results_measurement_name": "graph_measurements",
"service_function_chain": "sandpit-experiment",
"service_function_chain_instance": "sandpit-experiment_1",
"service_functions": {
"sandstorage": {
"response_time_field": "(max(processing_time) - min(processing_time)) / ((max(request_count) -min(request_count))*1000)",
"request_size_field": "(max(bytes_received) - min(bytes_received)) / (max(request_count) - min(request_count))",
"response_size_field": "(max(bytes_sent) - min(bytes_sent)) / (max(request_count) - min(request_count))",
"measurement_name": "tomcat_connector"
}
}
}
```
Then, in chronograf we can view measurement called **graph_measurements** which will be populated from the CLMC graph monitoring pipeline.
curl POST request:
`curl -X POST http://localhost:9000/clmc/clmc-service/graph/monitor -d '{"query_period": 30, "results_measurement_name": "graph_measurements", "service_function_chain": "sandpit-experiment", "service_function_chain_instance": "sandpit-experiment_1", "service_functions": {"sandstorage": {"response_time_field": "(max(processing_time) - min(processing_time)) / ((max(request_count) -min(request_count))*1000)", "request_size_field": "(max(bytes_received) - min(bytes_received)) / (max(request_count) - min(request_count))", "response_size_field": "(max(bytes_sent) - min(bytes_sent)) / (max(request_count) - min(request_count))", "measurement_name": "tomcat_connector"}}}'`
#### Implementation details of the Alerts API
The Alerts API is implemented on top of the Kapacitor HTTP API and includes the following main parts:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment