When I try to push a custom metric to the Oracle Cloud Monitoring service using the Oracle Cloud CLI, I receive the following error:

```
ServiceError:
{
    "code": "NotAuthorizedOrNotFound",
    "message": "Authorization failed or requested resource not found.",
    "opc-request-id": "request id",
    "status": 404
}

```

This occurs when using the Administrator account and when using an instance principal which has monitoring permission.

Here is the JSON that I am pushing to the Monitoring service:

```
[
    {
        "namespace": "myFirstNamespace",
        "compartmentId": "tenant id",
        "resourceGroup": "myFirstResourceGroup",
        "name": "successRate",
        "dimensions": {
            "resourceId": "ocid1.exampleresource.region1.phx.exampleuniqueID",
            "appName": "myAppA"
        },
        "metadata": {
            "unit": "percent",
            "displayName": "MyAppA Success Rate"
        },
        "datapoints": [
            {
                "timestamp": "2021-06-01T22:19:20Z",
                "value": 83.0
            }
        ]
    }
]

```

The CLI command that I am using is:

```
oci monitoring metric-data post --metric-data file://metric-data.json

```