Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 13

NPM and Palo Monitoring

The last couple of days I've been playing with the Palo REST API and got some really useful output that Solarwinds doesn't currently display.

I've tried using the SAM API poller but that just errors every time I add a PALO API request and assume this is only for servers and applications.

Is there any other way of displaying Palo API calls in Solarwinds?



0 Kudos
2 Replies
Level 10

@jonchill What error are you getting?

Have you tried SAM 2020.2 version? There is many more authorization types, so hopefully your use case is covered: 


Let us know if you still have issues in configuring API Poller.

0 Kudos
Level 10

I use PowerShell for a majority of my calls. This is a script that I use for HA Sync Status.



[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type)
$certCallback = @"
    using System;
    using System.Net;
    using System.Net.Security;
    using System.Security.Cryptography.X509Certificates;
    public class ServerCertificateValidationCallback
        public static void Ignore()
            if(ServicePointManager.ServerCertificateValidationCallback ==null)
                ServicePointManager.ServerCertificateValidationCallback += 
                        Object obj, 
                        X509Certificate certificate, 
                        X509Chain chain, 
                        SslPolicyErrors errors
                        return true;
    Add-Type $certCallback

Function SecureStringToString($value){
    [System.IntPtr] $bstr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($value);
$swCredentials = Get-Credential -credential ${CREDENTIAL}
[string] $credUsername = $swCredentials.Username
[string] $credPassword = SecureStringToString $swCredentials.Password

$paIpAddress = '${IP}'

$paApiKeyObj = Invoke-WebRequest -Uri "https://$paIpAddress/api/?type=keygen&user=$credUsername&password=$credPassword" -UseBasicParsing
$paApiKey = $([xml]$paApiKeyObj.Content).response.result.key

$paDetailsRaw = Invoke-WebRequest -Uri "https://$paIpAddress/api/?type=op&cmd=<show><high-availability><state><%2Fstate><%2Fhigh-availability><%2Fshow>&key=$paApiKey" -UseBasicParsing
$paHAEnabled = $([xml]$paDetailsRaw).response.result.enabled

If ($paHAEnabled -eq 'yes') 
    $paDetails = $([xml]$paDetailsRaw)
    $paMode = $paDetails.mode
    $paSyncStatus = $paDetails.'running-sync'

    Write-Host "Statistic.HAEnabled: 1"
    Write-Host "Message.HAEnabled: HA is enabled (HAEnabled = $paHaEnabled)"

    If ($paSyncStatus -eq 'synchronized') { Write-Host "Statistic.RunningSync: 1" }
    Else { Write-Host "Statistic.RunningSync: 0" }
    Write-Host "Message.RunningSync: Mode - $paMode, Status - $paSyncStatus"
    Write-Host "Statistic.HAEnabled: 0"
    Write-Host "Message.HAEnabled: HA is disabled (HAEnabled = $paHAEnabled)"
    Write-Host "Statistic.RunningSync: 9"
    Write-Host "Message.RunningSync: HA is disabled!"




0 Kudos