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