The CustomSyslogParser class's parse method will fail to parse the process name from a syslog message that contains brackets in the regular message text.
The code in question is at line 186 in opennms-services/src/main/java/org/opennms/netmgt/syslogd/CustomSyslogParser.java:
The code assumes all message bodies (after removing the header) look like:
But if the message looks like:
where there is no process id with the process name, but the actual message text contains bracket characters, then the code will fail to parse the name because it's assuming that the only valid bracket pair that can exist in the entire message are those housing the process ID. When brackets exist elsewhere in the message, the name isn't parsed.
I propose the following change:
In order to allow the code to ignore the existence of brackets elsewhere in the message text and to continue with the parsing of the process name.