Grok filters supports multiple expressions (there's an example in the docs). The expressions will be tried one by one in the order you list them. I think it'll work for you if you list the longer expression first so that Logstash only falls back to the more generic expression if the first one doesn't match.
See, here the syslogprog field is shifted to another position. Whenever I am adding this new filter configuration logstash throws error in its log.
Always tell us exactly what you tried and exactly what error you get.
First filter works fine, But when I add the second filter I get an error like this
[2017-08-25T01:57:35,869][ERROR][logstash.agent] Pipeline aborted due to error {:exception=>#<Grok::PatternError: pattern %{SYSLOGUSER:systemuser} not defined>
Your Logstash and its plugins doesn't support a SYSLOGUSER pattern. Maybe that pattern was introduced in later versions. You can use another pattern instead, e.g. WORD or NOTSPACE.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.