Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

Inability to Prisma Access SD-WAN Metrics via API Endpoints

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Inability to Prisma Access SD-WAN Metrics via API Endpoints

L0 Member

I am experiencing issues accessing Prisma SD-WAN metrics through the API on multiple versions.

While certain API endpoints, such as those related to site and device configurations, are functioning correctly, I am unable to retrieve data from metrics-related endpoints.

 

Here are the specifics:

  1. Working API Example:
    • Endpoint: GET /v4.10/api/sites/{site-id}
    • Command: curl -L 'https://api.sase.paloaltonetworks.com/sdwan/v4.10/api/sites/xxx' -H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' -s| jq -r '._status_code'
    • Command Output: 200
    • A successful 200 OK status with details for a specific site (id: xxx), including its configuration and location, confirms that my token and other configuration aspects are correct.
  2. Failing API Example 1:
  3. Failing API Example 2:
    • Endpoint: GET /v2.1/api/monitor/aiops/aggregates
    • Command: curl -L 'https://api.sase.paloaltonetworks.com/sdwan/v2.1/api/monitor/aiops/aggregates' -H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' | jq
    • Command Output: { "_status_code": "404", "_info": [ { "code": "ROUTE_NOT_FOUND_0001", "message": "ROUTE_NOT_FOUND_0001: /v2.1/api/tenants/xxx/monitor/aiops/aggregates" } ] }

 

These errors suggest that either the routes for metrics APIs are unavailable or misconfigured.

I have checked the relevant documentation https://pan.dev/sdwan/api/metrics/ and confirmed my implementation matches the expected usage.

 

Please advise on any steps to resolve this or confirm whether these API endpoints are functional in the current release.

1 accepted solution

Accepted Solutions

L0 Member

I've found that metrics-related API endpoints are functional using the POST method instead of GET.

Here’s an example that successfully retrieves metrics data:

url="https://api.sase.paloaltonetworks.com/sdwan/monitor/v2.0/api/monitor/sys_point_metrics"
token="YOUR_BEARER_TOKEN"
site_id="YOUR_SITE_ID"
element_id="YOUR_ELEMENT_ID"
current_time=$(date -u -d '-5 minutes' +"%Y-%m-%dT%H:%M:%S.000Z")

curl -X POST "$url" \
  -H "Authorization: Bearer $token" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "x-panw-region: europe" \
  -d '{
    "start_time": "'"$current_time"'",
    "interval": "5min",
    "metrics": [
      {
        "name": "MemoryUsage",
        "unit": "percentage"
      }
    ],
    "filter": {
      "site": "'"$site_id"'",
      "elements": [
        "'"$element_id"'"
      ]
    },
    "view": {}
  }'

This command sends a POST request with the necessary payload to retrieve the MemoryUsage metric for the specified site and element.

 

View solution in original post

1 REPLY 1

L0 Member

I've found that metrics-related API endpoints are functional using the POST method instead of GET.

Here’s an example that successfully retrieves metrics data:

url="https://api.sase.paloaltonetworks.com/sdwan/monitor/v2.0/api/monitor/sys_point_metrics"
token="YOUR_BEARER_TOKEN"
site_id="YOUR_SITE_ID"
element_id="YOUR_ELEMENT_ID"
current_time=$(date -u -d '-5 minutes' +"%Y-%m-%dT%H:%M:%S.000Z")

curl -X POST "$url" \
  -H "Authorization: Bearer $token" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "x-panw-region: europe" \
  -d '{
    "start_time": "'"$current_time"'",
    "interval": "5min",
    "metrics": [
      {
        "name": "MemoryUsage",
        "unit": "percentage"
      }
    ],
    "filter": {
      "site": "'"$site_id"'",
      "elements": [
        "'"$element_id"'"
      ]
    },
    "view": {}
  }'

This command sends a POST request with the necessary payload to retrieve the MemoryUsage metric for the specified site and element.

 

  • 1 accepted solution
  • 321 Views
  • 1 replies
  • 1 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!