Henrik Hudson
10/31/2025, 7:28 PMparsers:
#parse the initial syslog message first
#Palo Alto system (deviceinfo) logs
- name: syslog-rfc3164-paloalto_system
format: regex
#same parser as the traffic logs; but keep seperate just in case
regex: '/^(\<[0-9]+\>)?[\S]+[\s]+[\S]+[\s]+[\S]+[\s]+(?<Computer>[\S]+)[^\|]+?\|(?<message>.*)$/'
#useful for troubleshooting the "raw" message
#regex: /^(?<message>.*)$/
#we don't care about the log time here
#time_key LogTime
#time_format:: %b %d %H:%M:%S
#time_keep: On
#PaloAlto - System Logs
- name: paloalto_system_cef4AzureLogAnalytics
format: regex
regex: '^(?<DeviceVendor>[^\|]+)\|(?<DeviceProduct>[^\|]+)\|(?<DeviceVersion>[^\|]+)\|(?<DeviceEventClassID>[^\|]+)\|(?<Activity>[^\|]+)\|(?<LogSeverity>[^\|]+)\|(?=rt=)rt=(?<ReceiptTime>.*)(?=[\s]+deviceExternalId=)[\s]+deviceExternalId=(?<DeviceExternalID>.*)(?=[\s]+cs3Label=)[\s]+cs3Label=(?<DeviceCustomString3Label>.*)(?=[\s]+cs3=)[\s]+cs3=(?<DeviceCustomString3>.*)(?=[\s]+fname=)[\s]+fname=(?<DeviceCustomString4>.*)(?=[\s]+flexString2Label=)[\s]+flexString2Label=(?<FlexString2Label>.*)(?=[\s]+flexString2=)[\s]+flexString2=(?<FlexString2>.*)(?=[\s]+msg=)[\s]+msg=\\"(?<Message>[^\\"]+)\\"(?=[\s]+externalId=)[\s]+externalId=(?<ExtID>.*)(?=[\s]+cat=)[\s]+cat=(?<DeviceEventCategory>.*).*$'
time_key: ReceiptTime
time_format: '%b %d %Y %H:%M:%S %Z'
#time_offset: -0800
time_keep: True
The input / output pipeline:
pipeline:
inputs:
- name: syslog
alias: paloalto_system
tag: paloalto_system
parser: syslog-rfc3164-paloalto_system
listen: '0.0.0.0'
port: 16013
mode: tcp
buffer_chunk_size: '16M'
buffer_max_size: '256M'
threaded: true
#input stream processors
#none matching parsers just fall through
processors:
logs:
- name: parser
match: paloalto_system
key_name: message
parser: paloalto_system_cef4AzureLogAnalytics
preserve_key: Off
reserve_data: On
- name: parser
match: paloalto_system
key_name: message
parser: paloalto_system_config_cef4AzureLogAnalytics
preserve_key: Off
reserve_data: On
outputs:
- name: file
match: paloalto_system
format: plain
path: '/data/temp/'
The file in '/data/temp/' has the input parser data correct in "computer" and "message", but "message" contains the \" like so:
{
"Computer": "fqdnname",
"message": "Palo Alto Networks|PAN-OS|11.1.8|vpn|SYSTEM|1|rt=Oct 30 2025 21:52:44 GMT deviceExternalId=013201013048 cs3Label=Virtual System cs3= fname= flexString2Label=Module flexString2=general msg=\"unknown ikev2 peer\" externalId=7495426648376344696 cat=ike-generic-event"
}
So, when the processor parsers see that do they actually see the \" string literal or is that removed when they get it? The input parser parses the initial syslog string fine it seems. This exact workflow works fine for 2 different syslog inputs running on different ports with different parsers, but same idea. Their "plain output" check is fully parsed out JSON as per their processor parsers.