AIOps - How to export Services Health data using a REST API?
book
Article ID: 233491
calendar_today
Updated On:
Products
DX Operational Intelligence
Issue/Introduction
How to export Services health available from DX Operational Intelligence Service Analytics page using any of the available REST APIs?
Environment
Release : 21.3
Component : DX Dashboards
Resolution
Below is an example how to use query Metric REST API to export information from NASS datastore
https://apmgw.dxi-na1.saas.broadcom.com/atc/metric/queryMetric
{
"querySpecifier": {
"op": "SPEC",
"sourceNameSpecifier": {
"op": "REGEX",
"pattern": "(.*)SERVICES(.*)"
},
"attributeNameSpecifier": {
"ignoreCase": false,
"op": "REGEX",
"pattern": ".*\\:service_health"
}
},
"queryRange": {
"endTime": 0,
"rangeSize": 120,
"frequency": 120
}
}
///
{
"metrics": [
{
"id": "3ms-AAB-6M-RKplU0BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "020a375f-a064-4701-98c9-025c2d12060e:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "t_sergio1",
"displayName": "service_health",
"service_id": "020a375f-a064-4701-98c9-025c2d12060e",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:020a375f-a064-4701-98c9-025c2d12060e"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "8AaB-AAB-6M-McuO73BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "40ac4568-eb40-4b4f-b7ca-d3aabf37e219:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "My_Service_01",
"displayName": "service_health",
"service_id": "40ac4568-eb40-4b4f-b7ca-d3aabf37e219",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:40ac4568-eb40-4b4f-b7ca-d3aabf37e219"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "Uh6B-AAB-6M-kvFZe1BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "c35f88ab-530f-44af-bd96-2ced49114550:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "My_ASM",
"displayName": "service_health",
"service_id": "c35f88ab-530f-44af-bd96-2ced49114550",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:c35f88ab-530f-44af-bd96-2ced49114550"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "Z9_B-AAB-6M-J9kVy2BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "c072f612-fbfa-4bf8-ac69-665ec31a67b9:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "My_ASM2",
"displayName": "service_health",
"service_id": "c072f612-fbfa-4bf8-ac69-665ec31a67b9",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:c072f612-fbfa-4bf8-ac69-665ec31a67b9"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "GyBC-AAB-6M-EZa6j3BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "8b115d19-3472-431f-bc2c-20503c5718a0:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "BroadcomIT",
"displayName": "service_health",
"service_id": "8b115d19-3472-431f-bc2c-20503c5718a0",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:8b115d19-3472-431f-bc2c-20503c5718a0"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "KXOC-AAB-6M-FHY_42BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "8c510c91-415b-4e57-8f62-618dc857fc72:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "My_host_Service",
"displayName": "service_health",
"service_id": "8c510c91-415b-4e57-8f62-618dc857fc72",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:8c510c91-415b-4e57-8f62-618dc857fc72"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "no0C-AAB-6M-6EA9y2BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "99b25ec0-0110-4b74-8afa-1b1112ec3d30:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "ASMTEST",
"displayName": "service_health",
"service_id": "99b25ec0-0110-4b74-8afa-1b1112ec3d30",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:99b25ec0-0110-4b74-8afa-1b1112ec3d30"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "030C-AAB-6M-h0YRC2BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "ef74f832-de3b-4afd-bb21-91e38ab70b72:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "ASMTEST2",
"displayName": "service_health",
"service_id": "ef74f832-de3b-4afd-bb21-91e38ab70b72",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:ef74f832-de3b-4afd-bb21-91e38ab70b72"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "F80C-AAB-6M-mlmAv1BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "4ece4725-6cc6-4af0-988d-47e4b588680e:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "ASMTEST3",
"displayName": "service_health",
"service_id": "4ece4725-6cc6-4af0-988d-47e4b588680e",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:4ece4725-6cc6-4af0-988d-47e4b588680e"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "A.0C-AAB-6M-yLO_Q2BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "5b15e33f-ff61-454f-80cf-6742ee01ebc1:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "ASMTEST4",
"displayName": "service_health",
"service_id": "5b15e33f-ff61-454f-80cf-6742ee01ebc1",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:5b15e33f-ff61-454f-80cf-6742ee01ebc1"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "N_6C-AAB-6M-SLZac1BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "d0fe7f49-3f76-441e-96f0-83ea41b596d2:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "AllAlarmsTest1",
"displayName": "service_health",
"service_id": "d0fe7f49-3f76-441e-96f0-83ea41b596d2",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:d0fe7f49-3f76-441e-96f0-83ea41b596d2"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "R38C-AAB-6M-1dUjZ1BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "4f2967b4-8054-48b0-accd-b94cf7819bd1:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "AllAlarms1",
"displayName": "service_health",
"service_id": "4f2967b4-8054-48b0-accd-b94cf7819bd1",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:4f2967b4-8054-48b0-accd-b94cf7819bd1"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "h9CD-AAB-6M-gJdyz1BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "99952219-3f87-4825-b62e-45673293ae13:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "AvailbilityTest",
"displayName": "service_health",
"service_id": "99952219-3f87-4825-b62e-45673293ae13",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:99952219-3f87-4825-b62e-45673293ae13"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
0,
0,
0,
2
]
]
},
{
"id": "SK_D-AAB-6M-29Pyi3BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "3b5a085a-08ff-41d1-b3d3-813d619545b5:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "VM12345",
"displayName": "service_health",
"service_id": "3b5a085a-08ff-41d1-b3d3-813d619545b5",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:3b5a085a-08ff-41d1-b3d3-813d619545b5"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "VK_D-AAB-6M-L3Mz82BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "5ccd0051-91d7-45da-ab13-e067d953fbae:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "All Device Service 12345",
"displayName": "service_health",
"service_id": "5ccd0051-91d7-45da-ab13-e067d953fbae",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:5ccd0051-91d7-45da-ab13-e067d953fbae"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
},
{
"id": "GElE-AAB-6M-jpWzQ2BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "c2accd41-90b0-42f4-93f9-bc9ca486275e:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "cheese",
"service_id": "c2accd41-90b0-42f4-93f9-bc9ca486275e",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:c2accd41-90b0-42f4-93f9-bc9ca486275e"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
0,
0,
0,
2
]
]
},
{
"id": "JElE-AAB-6M-29JwQ3BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "74768886-91e7-436d-8f0e-93eaf30ce7f3:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "web",
"service_id": "74768886-91e7-436d-8f0e-93eaf30ce7f3",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:74768886-91e7-436d-8f0e-93eaf30ce7f3"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
0,
0,
0,
2
]
]
},
{
"id": "MK_E-AAB-6M-3.izY3BB",
"source": "OI|SA|SERVICES|ALL",
"attribute": "b611b23a-a5d2-4093-aff5-864d95e1cfcd:service_health",
"attributes": {
"metric_unit": "percentage",
"metric_name": "service_health",
"service_name": "myTest20",
"displayName": "service_health",
"service_id": "b611b23a-a5d2-4093-aff5-864d95e1cfcd",
"external_ids": [
"SA:9855C300-3B3F-498E-B896-5E74B043310F:b611b23a-a5d2-4093-aff5-864d95e1cfcd"
]
},
"type": 4096,
"values": [
[
1642675800,
120,
100,
100,
100,
2
]
]
}
]
}
Feedback
thumb_up
Yes
thumb_down
No