cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Who rated this article

L3 Networker
100% helpful (3/3)

PAN-OS 8.0 HTTP Log Integration with Slack

 

This document assumes that you have already created a Slack team. This sample integration was done with a free Slack account. 

 

Once you have created your Slack team, login to your slack account and add an “Incoming Webhooks” custom integration on the slack website.  During that configuration, you will select the channel where the message will be broadcast (#general in this example).  You will also receive a Webhook URL, and an opportunity to customize the Name and Icon for the source of the message. 

 

Here’s a screenshot of the Incoming Webhooks configuration on the slack website: 

 

 

Slack Integration Settings.png

  

Next, configure an HTTP Server Profile in PAN-OS 8.0.  Use the first part of the Webhooks URL in the “Address” field.  In this example, it is “hooks.slack.com” using HTTPS on 443 with the POST HTTP method.  Username/Password are not required for this particular integration. 

HTTP Server Profile Entry Name.png

 

 Personally, I was interested in specific “system” events, so this document focuses on the system-level logs.  Similar integrations could easily be done with traffic, threat, and/or URL logs. 

HTTP Server Profile Payload Format.png

  

This is what the System format looks like:

Slack System Payload Format.png

 

 

In the URI Format box, provide the URI portion of the Slack-provided Incoming Webhooks URL, beginning with /service

 

The content-type must be application/json

 

Leave the Parameters field blank.

 

The Payload input box accepts the default Slack-preferred JSON format as documented here:  https://api.slack.com/incoming-webhooks

 

No additional escaping is required to add the PAN-OS provided variables to the payload.  In this example, I’m using a rich-formatted “attachments” message from Slack, although the basic format works perfectly as well. 

 

Here are two samples that you should be able to cut and paste:

 

Rich Format Message:

 

{

    "attachments": [

        {

            "fallback": "$time_generated $device_name reports $severity $subtype event:\n $opaque\n--------",

            "text": "$time_generated: <https://pa0.example.com|pa0> reports $severity $subtype event:\n$opaque",

            "color": "danger"

        }

    ]

}

 

 

Simple Format Message:

 

{

    "text": "$time_generated $device_name reports $severity $subtype event:\n $opaque\n--------"

}

 

Since I was mainly interested in system-level events, I tied it all together in the Device / Log Settings tab.  I haven’t narrowed-down exactly what I want to see in the slack channel, but for the purposes of this test, I wanted to see non-informational ha or crypto events, so used the following system log filter:

 

(( subtype eq ha ) or (subtype eq crypto)) and ( severity neq informational )

 

I matched that with the “Slack System Event 1” created earlier.  The configuration looks like this:Log Settings System Configuration.png

 

Here’s what I see on my desktop in the Slack app when I initiate a manual HA state change via the PAN-OS GUI:Slack app notification from PAN-OS.png

 

 

Looks good on the phone too:Slack app Mobile View.pngCreated by Jared Valentine - Systems Engineer

Rate this article:
(3)
Who rated this article