Get Prometheus metrics per nsr_id - sonata-nfv/tng-analytics-engine GitHub Wiki

3. Get Prometheus metrics per nsr_id

Scope: This functionality is used for fetching all available analytic services on behalf of the profiler

REST - API: http://profiler_server_IP_address/services/vnv/{nsr_id}/metrics

The result of such a call is a JSONArray that contains all Prometheus metrics of the specific network service record id

nsr_id: the network service record id

A response example should be:

{
"data": ["cacheSysVMsize{project_id='88b0d545-3701-45c0-9a0b-f8deb1a36hh7',resource_id='0e6dc98b-5ed1-4fb5-85fa-34af5b2e0269'}", 
	"haproxy_Uptime_sec{project_id='88b0d545-3701-45c0-9a0b-f8deb1a36hh7',resource_id='12b0d56b-3701-45c0-9a0b-f8deb1a36bf0'}", 
	"haproxy_backend_actsrvs{project_id='88b0d545-3701-45c0-9a0b-f8deb1a36hh7',resource_id='12b0d56b-3701-45c0-9a0b-f8deb1a36bf0'}", 
	"haproxy_backend_bin{project_id='88b0d545-3701-45c0-9a0b-f8deb1a36hh7',resource_id='12b0d56b-3701-45c0-9a0b-f8deb1a36bf0'}", 
	"haproxy_backend_bout{project_id='88b0d545-3701-45c0-9a0b-f8deb1a36hh7',resource_id='12b0d56b-3701-45c0-9a0b-f8deb1a36bf0'}", 
	"haproxy_backend_downtime{project_id='88b0d545-3701-45c0-9a0b-f8deb1a36hh7',resource_id='12b0d56b-3701-45c0-9a0b-f8deb1a36bf0'}", 
	"haproxy_backend_rate{project_id='88b0d545-3701-45c0-9a0b-f8deb1a36hh7',resource_id='12b0d56b-3701-45c0-9a0b-f8deb1a36bf0'}", 
	"haproxy_backend_scur{project_id='88b0d545-3701-45c0-9a0b-f8deb1a36hh7',resource_id='12b0d56b-3701-45c0-9a0b-f8deb1a36bf0'}", 
	"haproxy_backend_sespsrv{project_id='88b0d545-3701-45c0-9a0b-f8deb1a36hh7',resource_id='12b0d56b-3701-45c0-9a0b-f8deb1a36bf0'}", 
	"haproxy_frontend_scur{project_id='88b0d545-3701-45c0-9a0b-f8deb1a36hh7',resource_id='12b0d56b-3701-45c0-9a0b-f8deb1a36bf0'}"],
"status": "success"
}