Hello
If your decoder matches a program name in the pre-decoder, you need to add the reference to it in the parent decoder.
Next, you can use a prematch in the parent decoder additional to the program name. But the pre-match keyword needs to be from the log(excluding syslog header)
For your log, the part that is decoded by the pre-decoder is the syslog header.
May 11 14:26:59 pmc-ib-a dhcpd[2660669]:
The rest is the log.
DHCPACK on [ip_address] to [mac_address] (S24-Ultra) via eth2 relay eth2 lease-duration 7200 (RENEW) uid [mac_address]
Ex:
<decoder name="infoblox-base">
<program_name>dhcpd</program_name>
<prematch>S24-Ultra</prematch>
</decoder>
For the decoders as well, you cannot write the decoder for the syslog header. You can only parse the value from the log.
You can test this decoder for reference.
<decoder name="infoblox-base">
<program_name>dhcpd</program_name>
</decoder>
<decoder name="infoblox-base-child">
<parent>infoblox-base</parent>
<regex>^(\.+)$</regex>
<order>log</order>
</decoder>
This is the test result.
**Messages:
INFO: (7202): Session initialized with token '8f4cb61e'
**Phase 1: Completed pre-decoding.
full event: 'May 11 14:26:59 pmc-ib-a dhcpd[2660669]: DHCPACK on [ip_address] to [mac_address] (S24-Ultra) via eth2 relay eth2 lease-duration 7200 (RENEW) uid [mac_address]'
timestamp: 'May 11 14:26:59'
hostname: 'pmc-ib-a'
program_name: 'dhcpd'
**Phase 2: Completed decoding.
name: 'infoblox-base'
log: 'DHCPACK on [ip_address] to [mac_address] (S24-Ultra) via eth2 relay eth2 lease-duration 7200 (RENEW) uid [mac_address]'
Let me know if you need any further information.