Quantcast

creating a custom poller for PaloAlto to Monitor VPN Tunnels

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

creating a custom poller for PaloAlto to Monitor VPN Tunnels

Kirk Reeves
looking for guidance.  I am trying to create a Poller for Monitoring VPN Tunnels Tunnels on a PaloAlto Firewall.   

Palo has an API that will query the state of a tunnel

https://hostname/api/?type=op&key=authkey&cmd=<show><vpn><flow><name>TUNNELNAME<%2Fname><%2Fflow><%2Fvpn><%2Fshow>

response  is an xml document
formatted like so:  (This not all of the xml tree)
<response>
        <result>
                <dp>dp0</dp>
                <IPSEC>
                    <entry>
                        <monitor>
                                <status>False</status>
                        </monitor>
                        <state>active</state>
                        <pkt-lifesize>0</pkt-lifesize>
                        <type>IPSec</type>
                    </entry>
                </IPSec>
        </result>
</response>

the key attribute I am trying to capture is state.

I know there is a http Poller, but I was looking for one dealing specifically with one expecting XML as a response, so I can possibly grab multiple parameters.  If I must  I can probably use the HTTP poller with a regular expression, but I was just looking for something a little more elegant.

Thanks

Kirk


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: creating a custom poller for PaloAlto to Monitor VPN Tunnels

Jeff Gehlbach
On 02/21/2017 05:04 PM, Kirk Reeves wrote:

> I know there is a http Poller, but I was looking for one dealing
> specifically with one expecting XML as a response, so I can possibly
> grab multiple parameters.  If I must  I can probably use the HTTP poller
> with a regular expression, but I was just looking for something a little
> more elegant.

As of now, a regex with the HttpMonitor or maybe the PageSequenceMonitor
is probably your best bet. Admittedly it's pretty awful.

Ultimately I'd like to have a poller monitor that implements a subset of
the XmlCollector's functionality, and is configured in an equivalent
way. That way you'd be able to use an XPath expression to describe your
expectations for the document. The XmlCollector can also handle JSON
documents if you configure an alternate handler, which would be nice in
the poller too.

We periodically kick around the idea of re-architecting the poller and
collector class hierarchies to enable better code reuse, but that's a
very big and disruptive project. If you feel like having a swing at
writing an XmlMonitor, you'll find able assistance on this list and on
the "OpenNMS Development" channel of https://chat.opennms.com/.

-jeff


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: creating a custom poller for PaloAlto to Monitor VPN Tunnels

Kirk Reeves
Thanks for the input.

I will probably start with the HTTPS Monitor, and if that is successfull  I may play around with creating an XMLMonitor.   If I get the HTTPS Montinor working I paste it to the list so any PaloAlto users can try it.

Thanks

Kirk

On Wed, Feb 22, 2017 at 3:35 PM, Jeff Gehlbach <[hidden email]> wrote:
On 02/21/2017 05:04 PM, Kirk Reeves wrote:

> I know there is a http Poller, but I was looking for one dealing
> specifically with one expecting XML as a response, so I can possibly
> grab multiple parameters.  If I must  I can probably use the HTTP poller
> with a regular expression, but I was just looking for something a little
> more elegant.

As of now, a regex with the HttpMonitor or maybe the PageSequenceMonitor
is probably your best bet. Admittedly it's pretty awful.

Ultimately I'd like to have a poller monitor that implements a subset of
the XmlCollector's functionality, and is configured in an equivalent
way. That way you'd be able to use an XPath expression to describe your
expectations for the document. The XmlCollector can also handle JSON
documents if you configure an alternate handler, which would be nice in
the poller too.

We periodically kick around the idea of re-architecting the poller and
collector class hierarchies to enable better code reuse, but that's a
very big and disruptive project. If you feel like having a swing at
writing an XmlMonitor, you'll find able assistance on this list and on
the "OpenNMS Development" channel of https://chat.opennms.com/.

-jeff


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel
Loading...