Skip to content

Commit 9f5806c

Browse files
committed
Updating json values to generic
1 parent e319969 commit 9f5806c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

examples/javascript/monitoring-post-metric.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
* <li>The first argument is the OCID of the compartment.</li>
99
* </ul>
1010
* Refer https://docs.cloud.oracle.com/en-us/iaas/api/#/en/monitoring/20180401/MetricData/PostMetricData for more details.
11+
* This example uses phoenix metric endpoint https://telemetry-ingestion.us-phoenix-1.oraclecloud.com
12+
* we can change this to a different region (refer https://docs.cloud.oracle.com/en-us/iaas/api/#/en/monitoring/20180401/).
1113
*/
1214

1315
const mt = require("oci-monitoring");
@@ -48,22 +50,22 @@ monitoringClient.endpoint = "https://telemetry-ingestion.us-phoenix-1.oracleclou
4850
*/
4951

5052
const MetricDataDetails = [{
51-
"namespace": "mushopnamespace",
52-
"resourceGroup": "mushop-rg",
53+
"namespace": "<your_namespace_here>",
54+
"resourceGroup": "<your_resourcegroup_here>",
5355
"compartmentId": compartmentId,
54-
"name": "mushop-401-http-error",
56+
"name": "<your_name_of_the_metric_here>",
5557
"dimensions": {
56-
"appName": "Mushop",
57-
"podName": "mushop-storefront"
58+
"appName": "<your_dimensions>",
59+
"podName": "<your_dimensions>"
5860
},
5961
"metadata": {
6062
"unit": "count",
61-
"displayName": "MuShop Authorization errors"
63+
"displayName": "<your_display_name>"
6264
},
6365
"datapoints": [{
6466
"timestamp": dateutc,
65-
"value": 43,
66-
"count": 43
67+
"value": "<your_datapoint_value>",
68+
"count": "<your_datapoint_count>"
6769
}
6870
]
6971
}]

0 commit comments

Comments
 (0)