Panorama Query Logs
Query Panorama Logs of types: traffic, threat, url, data-filtering and wildfire.
PAN-OS by Palo Alto Networks · 4 tasks · 13 inputs · 41 outputs
Details
| ID | Panorama Query Logs |
|---|---|
| From Version | 6.2.0 |
| Tasks | 4 |
README
Queries Panorama Logs of types: traffic, threat, URL, data-filtering and WildFire.
Dependencies
This playbook uses the following sub-playbooks, integrations, and scripts.
Sub-playbooks
This playbook does not use any sub-playbooks.
Integrations
This playbook does not use any integrations.
Scripts
This playbook does not use any scripts.
Commands
- pan-os-query-logs
Playbook Inputs
| Name | Description | Required |
|---|---|---|
| log_type | The log type to query. Can be, “traffic”, “threat”, “wildfire”, “url” or “data-filtering”. | Required |
| query | The query string by which to match the criteria for the logs. This is similar to the query provided in the web interface under the Monitor tab when viewing the logs. | Optional |
| time-generated | The time the log was generated from the timestamp and prior to it. For example, “2019/08/11 01:10:44”. | Optional |
| addr-src | The source address. | Optional |
| addr-dst | The destination address. | Optional |
| ip | The source or destination IP address. | Optional |
| zone-src | The source zone. | Optional |
| zone-dst | The destination zone. | Optional |
| action | The rule action. | Optional |
| port-dst | The destination port. | Optional |
| rule | The rule name. For example, “Allow all outbound”. | Optional |
| url | The URL. For example, “safebrowsing.googleapis.com”. | Optional |
| filedigest | The file hash (for WildFIre logs only). | Optional |
Playbook Outputs
| Path | Description | Type |
|---|---|---|
| Panorama.Monitor | The monitor logs object. | string |
| Panorama.Monitor.Logs.Action | The action taken for the session. Can be “alert”, “allow”, “deny”, “drop”, “drop-all-packets”, “reset-client”, “reset-server”, “reset-both”, or “block-url”. | string |
| Panorama.Monitor.Logs.Application | The application associated with the session. | string |
| Panorama.Monitor.Logs.Category | For URL subtype, it is the URL category. For WildFire subtype, it is the verdict on the file and is either “malicious”, “phishing”, “grayware”, or “benign”. For other subtypes, the value is “any”. | string |
| Panorama.Monitor.Logs.DeviceName | The hostname of the firewall on which the session was logged. | string |
| Panorama.Monitor.Logs.DestinationAddress | The original session destination IP address. | string |
| Panorama.Monitor.Logs.DestinationUser | The username of the user to which the session was sent. | string |
| Panorama.Monitor.Logs.DestinationCountry | The destination country or internal region for private addresses. The maximum length is 32 bytes. | string |
| Panorama.Monitor.Logs.DestinationPort | The destination port utilized by the session. | string |
| Panorama.Monitor.Logs.FileDigest | This is specific for the WildFire subtype, all other types do not use this field. The filedigest string shows the binary hash of the file sent to be analyzed by the WildFire service. |
string |
| Panorama.Monitor.Logs.FileName | The file name or file type when the subtype is “file”. The file name when the subtype is virus. The file name when the subtype is wildfire-virus. The file name when the subtype is wildfire. | string |
| Panorama.Monitor.Logs.FileType | The type of file that the firewall forwarded for WildFire analysis. This is relevant only for the WildFire subtype. All other types do not use this field. | string |
| Panorama.Monitor.Logs.FromZone | The zone from which the session originated. | string |
| Panorama.Monitor.Logs.URLOrFilename | The actual URI when the subtype is URL. Use file name or file type when the subtype is file. Use file name when the subtype is virus. Use file name when the subtype is wildfire-virus. Use file name when the subtype is wildfire. Use URL or file name when the subtype is vulnerability if applicable. | string |
| Panorama.Monitor.Logs.NATDestinationIP | Whether the destination NAT performed, the post-NAT destination IP address. | string |
| Panorama.Monitor.Logs.NATDestinationPort | The Post-NAT destination port. | string |
| Panorama.Monitor.Logs.NATSourceIP | The source NAT performed, the post-NAT source IP address. | string |
| Panorama.Monitor.Logs.NATSourcePort | The post-NAT source port. | string |
| Panorama.Monitor.Logs.PCAPid | The packet capture (pcap) ID is a 64 bit unsigned integral denoting an ID to correlate threat pcap files with extended pcaps taken as a part of that flow. All threat logs contain either a pcap_id of 0 (no associated pcap), or an ID referencing the extended pcap file. | string |
| Panorama.Monitor.Logs.IPProtocol | The IP address protocol associated with the session. | string |
| Panorama.Monitor.Logs.Recipient | The name of the receiver of an email that WildFire determined to be malicious when analyzing an email link forwarded by the firewall. Valid only for the WildFire subtype, all other types do not use this field. | string |
| Panorama.Monitor.Logs.Rule | The name of the rule that the session matched. | string |
| Panorama.Monitor.Logs.RuleID | The ID of the rule that the session matched. | string |
| Panorama.Monitor.Logs.ReceiveTime | The time the log was received at the management plane. | string |
| Panorama.Monitor.Logs.Sender | Specifies the name of the sender of an email that WildFire determined to be malicious when analyzing an email link forwarded by the firewall. This is valid only for the WildFire subtype, all other types do not use this field. | string |
| Panorama.Monitor.Logs.SessionID | The internal numerical identifier applied to each session. | string |
| Panorama.Monitor.Logs.DeviceSN | The serial number of the firewall on which the session was logged. | string |
| Panorama.Monitor.Logs.Severity | The severity associated with the threat. Can be, “informational”, “low”, “medium”, “high”, or “critical”. | string |
| Panorama.Monitor.Logs.SourceAddress | The original session source IP address. | string |
| Panorama.Monitor.Logs.SourceCountry | The source country or internal region for private addresses. The maximum length is 32 bytes. | string |
| Panorama.Monitor.Logs.SourceUser | The username of the user who initiated the session. | string |
| Panorama.Monitor.Logs.SourcePort | The source port utilized by the session. | string |
| Panorama.Monitor.Logs.Name | The Palo Alto Networks identifier for the threat. It is a description string followed by a 64-bit numerical identifier. | string |
| Panorama.Monitor.Logs.ID | The Palo Alto Networks ID for the threat. | string |
| Panorama.Monitor.Logs.ToZone | The zone to which the session was sent. | string |
| Panorama.Monitor.Logs.TimeGenerated | The time that the log was generated on the dataplane. | string |
| Panorama.Monitor.Logs.URLCategoryList | The list of URL filtering categories that the firewall used to enforce policy. | string |
| Panorama.Monitor.Logs.Vsys | Vsys on the firewall that generated the log. | string |
| Panorama.Monitor.JobID | The job ID of the log query. | unknown |
| Panorama.Monitor.Status | The status of the log query. | string |
| Panorama.Monitor.Message | The message of the log query. | string |
Playbook Image

Inputs
log_type— Log type to query. Can be: traffic, threat, wildfire, url or data-filtering.query— The query string by which to match criteria for the logs. This is similar to the query provided in the web interface under the Monitor tab when viewing the logs.time-generated— The time the log was generated from the timestamp and prior to it. For example: "2019/08/11 01:10:44".addr-src— Source address.addr-dst— Destination address.ip— Source or destination IP address.zone-src— Source zone.zone-dst— Destination zone.action— Rule action.port-dst— Destination port.rule— Rule name, for example: "Allow all outbound".url— URL, for example: "safebrowsing.googleapis.com".filedigest— File hash (for WildFIre logs only).
Outputs
Panorama.Monitor— Monitor logs object.Panorama.Monitor.Logs.Action— Action taken for the session. Can be "alert", "allow", "deny", "drop", "drop-all-packets", "reset-client", "reset-server", "reset-both", or "block-url".Panorama.Monitor.Logs.Application— Application associated with the session.Panorama.Monitor.Logs.Category— For URL subtype, it is the URL category; For WildFire subtype, it is the verdict on the file and is either ‘malicious’, ‘phishing’, ‘grayware’, or ‘benign’; For other subtypes, the value is ‘any’.Panorama.Monitor.Logs.DeviceName— The hostname of the firewall on which the session was logged.Panorama.Monitor.Logs.DestinationAddress— Original session destination IP address.Panorama.Monitor.Logs.DestinationUser— Username of the user to which the session was sent.Panorama.Monitor.Logs.DestinationCountry— Destination country or internal region for private addresses. Maximum length is 32 bytes.Panorama.Monitor.Logs.DestinationPort— Destination port utilized by the session.Panorama.Monitor.Logs.FileDigest— Only for WildFire subtype; all other types do not use this field. The filedigest string shows the binary hash of the file sent to be analyzed by the WildFire service.Panorama.Monitor.Logs.FileName— File name or file type when the subtype is file. File name when the subtype is virus. File name when the subtype is wildfire-virus. File name when the subtype is wildfire.Panorama.Monitor.Logs.FileType— Specifies the type of file that the firewall forwarded for WildFire analysis. Relevant only for the WildFire subtype; all other types do not use this field.Panorama.Monitor.Logs.FromZone— Zone from which the session originated.Panorama.Monitor.Logs.URLOrFilename— The actual URI when the subtype is url. File name or file type when the subtype is file. File name when the subtype is virus. File name when the subtype is wildfire-virus. File name when the subtype is wildfire. URL or file name when the subtype is vulnerability if applicable.Panorama.Monitor.Logs.NATDestinationIP— If destination NAT performed, the post-NAT destination IP address.Panorama.Monitor.Logs.NATDestinationPort— Post-NAT destination port.Panorama.Monitor.Logs.NATSourceIP— If source NAT performed, the post-NAT source IP address.Panorama.Monitor.Logs.NATSourcePort— Post-NAT source port.Panorama.Monitor.Logs.PCAPid— The packet capture (pcap) ID is a 64 bit unsigned integral denoting an ID to correlate threat pcap files with extended pcaps taken as a part of that flow. All threat logs contain either a pcap_id of 0 (no associated pcap), or an ID referencing the extended pcap file.Panorama.Monitor.Logs.IPProtocol— IP protocol associated with the session.Panorama.Monitor.Logs.Recipient— Specifies the name of the receiver of an email that WildFire determined to be malicious when analyzing an email link forwarded by the firewall. Valid only for the WildFire subtype; all other types do not use this field.Panorama.Monitor.Logs.Rule— Name of the rule that the session matched.Panorama.Monitor.Logs.RuleID— ID of the rule that the session matched.Panorama.Monitor.Logs.ReceiveTime— Time the log was received at the management plane.Panorama.Monitor.Logs.Sender— Specifies the name of the sender of an email that WildFire determined to be malicious when analyzing an email link forwarded by the firewall. Valid only for the WildFire subtype; all other types do not use this field.Panorama.Monitor.Logs.SessionID— An internal numerical identifier applied to each session.Panorama.Monitor.Logs.DeviceSN— The serial number of the firewall on which the session was logged.Panorama.Monitor.Logs.Severity— Severity associated with the threat. Can be "informational", "low", "medium", "high", or "critical".Panorama.Monitor.Logs.SourceAddress— Original session source IP address.Panorama.Monitor.Logs.SourceCountry— Source country or internal region for private addresses. Maximum length is 32 bytes.Panorama.Monitor.Logs.SourceUser— Username of the user who initiated the session.Panorama.Monitor.Logs.SourcePort— Source port utilized by the session.Panorama.Monitor.Logs.Name— Palo Alto Networks identifier for the threat. It is a description string followed by a 64-bit numerical identifier.Panorama.Monitor.Logs.ID— Palo Alto Networks ID for the threat.Panorama.Monitor.Logs.ToZone— The zone to which the session was sent.Panorama.Monitor.Logs.TimeGenerated— Time that the log was generated on the dataplane.Panorama.Monitor.Logs.URLCategoryList— A list of the URL filtering categories that the firewall used to enforce policy.Panorama.Monitor.Logs.Vsys— Vsys on the firewall that generated the log.Panorama.Monitor.JobID— Job ID of the log query.Panorama.Monitor.Status— Status of the log query.Panorama.Monitor.Message— Message of the log query.
Commands used
pan-os-query-logs
Flowchart
id: Panorama Query Logs version: -1 contentitemexportablefields: contentitemfields: {} name: Panorama Query Logs description: 'Query Panorama Logs of types: traffic, threat, url, data-filtering and wildfire.' starttaskid: "0" tasks: "0": id: "0" taskid: a0d6fdde-6ca0-4bfb-8fe1-b107ef3e0781 type: start task: id: a0d6fdde-6ca0-4bfb-8fe1-b107ef3e0781 version: -1 name: "" iscommand: false brand: "" description: "" nexttasks: '#none#': - "1" separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 50, "y": 50 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "1": id: "1" taskid: 8cc99b6c-6607-4ad3-8581-5526974c4bef type: condition task: id: 8cc99b6c-6607-4ad3-8581-5526974c4bef version: -1 name: Is Palo Alto Networks PAN-OS enabled? description: Checks if there is a valid instance of the Palo Alto Networks PAN-OS integration enabled. type: condition iscommand: false brand: "" nexttasks: '#default#': - "5" "yes": - "2" separatecontext: false conditions: - label: "yes" condition: - - operator: isExists left: value: complex: root: modules filters: - - operator: isEqualString left: value: simple: modules.brand iscontext: true right: value: simple: Panorama - - operator: isEqualString left: value: simple: modules.state iscontext: true right: value: simple: active accessor: brand iscontext: true continueonerrortype: "" view: |- { "position": { "x": 50, "y": 195 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "2": id: "2" taskid: e5880426-a2ca-4286-807c-23641388b07e type: regular task: id: e5880426-a2ca-4286-807c-23641388b07e version: -1 name: Panorama Query Logs description: Query logs script: '|||pan-os-query-logs' type: regular iscommand: true brand: "" nexttasks: '#none#': - "5" scriptarguments: action: complex: root: inputs.action addr-dst: complex: root: inputs.addr-dst addr-src: complex: root: inputs.addr-src filedigest: complex: root: inputs.filedigest ip: complex: root: inputs.ip log-type: complex: root: inputs.log_type polling: simple: "true" port-dst: complex: root: inputs.port-dst query: complex: root: inputs.query rule: complex: root: inputs.rule time-generated: complex: root: inputs.time-generated url: complex: root: inputs.url zone-dst: complex: root: inputs.zone-dst zone-src: complex: root: inputs.zone-src separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 162.5, "y": 370 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false "5": id: "5" taskid: 58850584-2a54-4ac5-80ec-268f5ed17c1a type: title task: id: 58850584-2a54-4ac5-80ec-268f5ed17c1a version: -1 name: Done type: title iscommand: false brand: "" description: "" separatecontext: false continueonerrortype: "" view: |- { "position": { "x": 50, "y": 545 } } note: false timertriggers: [] ignoreworker: false skipunavailable: false quietmode: 0 isoversize: false isautoswitchedtoquietmode: false system: true view: |- { "linkLabelsPosition": {}, "paper": { "dimensions": { "height": 560, "width": 492.5, "x": 50, "y": 50 } } } inputs: - key: log_type value: {} required: true description: 'Log type to query. Can be: traffic, threat, wildfire, url or data-filtering.' playbookInputQuery: - key: query value: {} required: false description: The query string by which to match criteria for the logs. This is similar to the query provided in the web interface under the Monitor tab when viewing the logs. playbookInputQuery: - key: time-generated value: {} required: false description: 'The time the log was generated from the timestamp and prior to it. For example: "2019/08/11 01:10:44".' playbookInputQuery: - key: addr-src value: {} required: false description: Source address. playbookInputQuery: - key: addr-dst value: {} required: false description: Destination address. playbookInputQuery: - key: ip value: {} required: false description: Source or destination IP address. playbookInputQuery: - key: zone-src value: {} required: false description: Source zone. playbookInputQuery: - key: zone-dst value: {} required: false description: Destination zone. playbookInputQuery: - key: action value: {} required: false description: Rule action. playbookInputQuery: - key: port-dst value: {} required: false description: Destination port. playbookInputQuery: - key: rule value: {} required: false description: 'Rule name, for example: "Allow all outbound".' playbookInputQuery: - key: url value: {} required: false description: 'URL, for example: "safebrowsing.googleapis.com".' playbookInputQuery: - key: filedigest value: {} required: false description: File hash (for WildFIre logs only). playbookInputQuery: outputs: - contextPath: Panorama.Monitor description: Monitor logs object. type: string - contextPath: Panorama.Monitor.Logs.Action description: Action taken for the session. Can be "alert", "allow", "deny", "drop", "drop-all-packets", "reset-client", "reset-server", "reset-both", or "block-url". type: string - contextPath: Panorama.Monitor.Logs.Application description: Application associated with the session. type: string - contextPath: Panorama.Monitor.Logs.Category description: For URL subtype, it is the URL category; For WildFire subtype, it is the verdict on the file and is either ‘malicious’, ‘phishing’, ‘grayware’, or ‘benign’; For other subtypes, the value is ‘any’. type: string - contextPath: Panorama.Monitor.Logs.DeviceName description: The hostname of the firewall on which the session was logged. type: string - contextPath: Panorama.Monitor.Logs.DestinationAddress description: Original session destination IP address. type: string - contextPath: Panorama.Monitor.Logs.DestinationUser description: Username of the user to which the session was sent. type: string - contextPath: Panorama.Monitor.Logs.DestinationCountry description: Destination country or internal region for private addresses. Maximum length is 32 bytes. type: string - contextPath: Panorama.Monitor.Logs.DestinationPort description: Destination port utilized by the session. type: string - contextPath: Panorama.Monitor.Logs.FileDigest description: |- Only for WildFire subtype; all other types do not use this field. The filedigest string shows the binary hash of the file sent to be analyzed by the WildFire service. type: string - contextPath: Panorama.Monitor.Logs.FileName description: |- File name or file type when the subtype is file. File name when the subtype is virus. File name when the subtype is wildfire-virus. File name when the subtype is wildfire. type: string - contextPath: Panorama.Monitor.Logs.FileType description: |- Specifies the type of file that the firewall forwarded for WildFire analysis. Relevant only for the WildFire subtype; all other types do not use this field. type: string - contextPath: Panorama.Monitor.Logs.FromZone description: Zone from which the session originated. type: string - contextPath: Panorama.Monitor.Logs.URLOrFilename description: |- The actual URI when the subtype is url. File name or file type when the subtype is file. File name when the subtype is virus. File name when the subtype is wildfire-virus. File name when the subtype is wildfire. URL or file name when the subtype is vulnerability if applicable. type: string - contextPath: Panorama.Monitor.Logs.NATDestinationIP description: If destination NAT performed, the post-NAT destination IP address. type: string - contextPath: Panorama.Monitor.Logs.NATDestinationPort description: Post-NAT destination port. type: string - contextPath: Panorama.Monitor.Logs.NATSourceIP description: If source NAT performed, the post-NAT source IP address. type: string - contextPath: Panorama.Monitor.Logs.NATSourcePort description: Post-NAT source port. type: string - contextPath: Panorama.Monitor.Logs.PCAPid description: The packet capture (pcap) ID is a 64 bit unsigned integral denoting an ID to correlate threat pcap files with extended pcaps taken as a part of that flow. All threat logs contain either a pcap_id of 0 (no associated pcap), or an ID referencing the extended pcap file. type: string - contextPath: Panorama.Monitor.Logs.IPProtocol description: IP protocol associated with the session. type: string - contextPath: Panorama.Monitor.Logs.Recipient description: |- Specifies the name of the receiver of an email that WildFire determined to be malicious when analyzing an email link forwarded by the firewall. Valid only for the WildFire subtype; all other types do not use this field. type: string - contextPath: Panorama.Monitor.Logs.Rule description: Name of the rule that the session matched. type: string - contextPath: Panorama.Monitor.Logs.RuleID description: ID of the rule that the session matched. type: string - contextPath: Panorama.Monitor.Logs.ReceiveTime description: Time the log was received at the management plane. type: string - contextPath: Panorama.Monitor.Logs.Sender description: |- Specifies the name of the sender of an email that WildFire determined to be malicious when analyzing an email link forwarded by the firewall. Valid only for the WildFire subtype; all other types do not use this field. type: string - contextPath: Panorama.Monitor.Logs.SessionID description: An internal numerical identifier applied to each session. type: string - contextPath: Panorama.Monitor.Logs.DeviceSN description: The serial number of the firewall on which the session was logged. type: string - contextPath: Panorama.Monitor.Logs.Severity description: Severity associated with the threat. Can be "informational", "low", "medium", "high", or "critical". type: string - contextPath: Panorama.Monitor.Logs.SourceAddress description: Original session source IP address. type: string - contextPath: Panorama.Monitor.Logs.SourceCountry description: Source country or internal region for private addresses. Maximum length is 32 bytes. type: string - contextPath: Panorama.Monitor.Logs.SourceUser description: Username of the user who initiated the session. type: string - contextPath: Panorama.Monitor.Logs.SourcePort description: Source port utilized by the session. type: string - contextPath: Panorama.Monitor.Logs.Name description: Palo Alto Networks identifier for the threat. It is a description string followed by a 64-bit numerical identifier. type: string - contextPath: Panorama.Monitor.Logs.ID description: Palo Alto Networks ID for the threat. type: string - contextPath: Panorama.Monitor.Logs.ToZone description: The zone to which the session was sent. type: string - contextPath: Panorama.Monitor.Logs.TimeGenerated description: Time that the log was generated on the dataplane. type: string - contextPath: Panorama.Monitor.Logs.URLCategoryList description: A list of the URL filtering categories that the firewall used to enforce policy. type: string - contextPath: Panorama.Monitor.Logs.Vsys description: Vsys on the firewall that generated the log. type: string - contextPath: Panorama.Monitor.JobID description: Job ID of the log query. - contextPath: Panorama.Monitor.Status description: Status of the log query. type: string - contextPath: Panorama.Monitor.Message description: Message of the log query. type: string tests: - Panorama Query Logs - Test fromversion: 6.2.0 supportedModules: - agentix - xsiam