- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
10-18-2024 01:41 AM
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:
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.
11-01-2024 12:22 AM
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.
11-01-2024 12:22 AM
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.
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!