|
8 | 8 | * <li>The first argument is the OCID of the compartment.</li> |
9 | 9 | * </ul> |
10 | 10 | * 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/). |
11 | 13 | */ |
12 | 14 |
|
13 | 15 | const mt = require("oci-monitoring"); |
@@ -48,22 +50,22 @@ monitoringClient.endpoint = "https://telemetry-ingestion.us-phoenix-1.oracleclou |
48 | 50 | */ |
49 | 51 |
|
50 | 52 | const MetricDataDetails = [{ |
51 | | - "namespace": "mushopnamespace", |
52 | | - "resourceGroup": "mushop-rg", |
| 53 | + "namespace": "<your_namespace_here>", |
| 54 | + "resourceGroup": "<your_resourcegroup_here>", |
53 | 55 | "compartmentId": compartmentId, |
54 | | - "name": "mushop-401-http-error", |
| 56 | + "name": "<your_name_of_the_metric_here>", |
55 | 57 | "dimensions": { |
56 | | - "appName": "Mushop", |
57 | | - "podName": "mushop-storefront" |
| 58 | + "appName": "<your_dimensions>", |
| 59 | + "podName": "<your_dimensions>" |
58 | 60 | }, |
59 | 61 | "metadata": { |
60 | 62 | "unit": "count", |
61 | | - "displayName": "MuShop Authorization errors" |
| 63 | + "displayName": "<your_display_name>" |
62 | 64 | }, |
63 | 65 | "datapoints": [{ |
64 | 66 | "timestamp": dateutc, |
65 | | - "value": 43, |
66 | | - "count": 43 |
| 67 | + "value": "<your_datapoint_value>", |
| 68 | + "count": "<your_datapoint_count>" |
67 | 69 | } |
68 | 70 | ] |
69 | 71 | }] |
|
0 commit comments