Skip to content

Commit 666739f

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

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

examples/typescript/monitoring-post-metric.ts

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
import mt = require("oci-monitoring");
@@ -49,22 +51,22 @@ monitoringClient.endpoint = "https://telemetry-ingestion.us-phoenix-1.oracleclou
4951
*/
5052

5153
const MetricDataDetails: Array<mt.models.MetricDataDetails> = [{
52-
namespace: "mushopnamespace",
53-
resourceGroup: "mushop-rg",
54+
namespace: "<your_namespace_here>",
55+
resourceGroup: "<your_resourcegroup_here>",
5456
compartmentId: compartmentId,
55-
name: "mushop-401-http-error",
57+
name: "<your_name_of_the_metric_here>",
5658
dimensions: {
57-
"appName": "Mushop",
58-
"podName": "mushop-storefront"
59+
"appName": "<your_dimensions>",
60+
"podName": "<your_dimensions>"
5961
},
6062
metadata: {
6163
"unit": "count",
62-
"displayName": "MuShop Authorization errors"
64+
"displayName": "<your_display_name>"
6365
},
6466
datapoints: [{
6567
"timestamp": dateutc,
66-
"value": 43,
67-
"count": 43
68+
"value": "<your_datapoint_value>",
69+
"count": "<your_datapoint_count>"
6870
}
6971
]
7072
}]

0 commit comments

Comments
 (0)