syslogd create randomly unespected syslog events that must be discarded

Description

I found that some syslogd messages are generated also if the non matching uei are going to be discarded.

Here is the configuration:

<?xml version="1.0"?>
<syslogd-configuration>
<configuration
syslog-port="10514"
new-suspect-on-message="false"
forwarding-regexp="^((.+?) (.*))\n?$"
matching-group-host="2"
matching-group-message="3"
discard-uei="DISCARD-MATCHING-MESSAGES"
/>

<!-- Use the following to convert UEI ad-hoc -->
<ueiList>
<!-- Juniper syslog messages -->
<ueiMatch>
<match type="regex" expression="(?s).*EVENT\s+UpDown\s+([A-Za-z0-9/.-])\s+index\s([0-9])\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s
-&gt;\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+&lt;Broadcast\s+PointToPoint\s+Multicast\s+Localup&gt;.*"/>
<uei>uei.opennms.org/vendor/Juniper/syslog/mcast/ipv4/l3VpnDown</uei>
</ueiMatch>
<ueiMatch>
<match type="regex" expression="(?s).*EVENT\s+UpDown\s+([A-Za-z0-9/.-])\s+index\s([0-9])\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s
-&gt;\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+&lt;Broadcast\s+PointToPoint\s+Multicast&gt;.*"/>
<uei>uei.opennms.org/vendor/Juniper/syslog/mcast/ipv4/l3VpnDown</uei>
</ueiMatch>
<ueiMatch>
<match type="regex" expression="(?s).*EVENT\s+UpDown\s+([A-Za-z0-9/.-])\s+index\s([0-9])\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s
-&gt;\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+&lt;Up Broadcast\s+PointToPoint\s+Multicast&gt;.*"/>
<uei>uei.opennms.org/vendor/Juniper/syslog/mcast/ipv4/l3VpnUp</uei>
</ueiMatch>

<!-- Cisco syslog messages -->
<ueiMatch>
<match type="regex" expression="(?s).%EARL_L3_ASIC-(.?)-3-INTR_WARN😞.*)$" />
<uei>uei.opennms.org/vendor/cisco/syslog/earlL3AsicInterrupt</uei>
</ueiMatch>
<ueiMatch>
<match type="regex" expression="(?s).*%SYS-2-MALLOCFAIL:\s+(Memory\s+allocation\s+of\s+(\d+)\s+bytes\s+failed\s+from\s+((0x)?[0-9A-Fa-f]+)(,\s+po
ol\s+(.?))?,\s+alignment\s+(\d+)(.?Process\s*=\s*(.?)\s+ipl\s=\s*(\d+),\s*pid\s*=\s*(\d+))?).*" />
<uei>uei.opennms.org/vendor/cisco/syslog/mallocFailed</uei>
</ueiMatch>
<ueiMatch>
<match type="regex" expression="(?s).%(.?)(.*?).?-RESTART:\s(.*)" />
<uei>uei.opennms.org/vendor/cisco/syslog/restart</uei>
</ueiMatch>
<ueiMatch>
<match type="regex" expression="(?s).%OIR-\d-INSCARD\s:\s*(Card\s+inserted\s+in\s+slot\s+(\d+),\s+subcard\s+(\d+)).*" />
<uei>uei.opennms.org/vendor/cisco/syslog/cardInserted</uei>
</ueiMatch>
<ueiMatch>
<match type="regex" expression="(?s).%OIR-\d-INSCARD\s:\s*(Card\s+inserted\s+in\s+slot\s+(\d+),(\s)).*" />
<uei>uei.opennms.org/vendor/cisco/syslog/cardInserted</uei>
</ueiMatch>
<ueiMatch>
<match type="regex" expression="(?s).%SYS-\d-CONFIG_I\s:\s*(Configured\s+from\s+([a-zA-Z])\s+by\s([a-zA-Z])\s+on\s(.*))" />
<uei>uei.opennms.org/vendor/cisco/syslog/configChange</uei>
</ueiMatch>

<!-- Discard with no event any messages that did not match above -->
<ueiMatch>
<match type="regex" expression=".*"/>
<uei>DISCARD-MATCHING-MESSAGES</uei>
</ueiMatch>
</ueiList>

<hideMessage>
<hideMatch>
<match type="substr" expression="SECRET"/>
</hideMatch>
<hideMatch>
<match type="regex" expression=".(double|triple)secret."/>
</hideMatch>
</hideMessage>

</syslogd-configuration>

------------
As you can see all no matching events must be discarded.

------------
Well we have a lot of random generated syslogd events:

uei.opennms.org/syslogd/local5/Info
uei.opennms.org/syslogd/local5/Notice
uei.opennms.org/syslogd/local5/Warning

Environment

Operating System: All Platform: All

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Former user August 3, 2009 at 6:29 AM

This is caused by https://opennms.atlassian.net/browse/NMS-3137#icft=NMS-3137 . Resolved in trunk with r14192.

Former user July 30, 2009 at 3:34 PM

BEN,
I guess was the same trouble! the 3079!

Former user July 30, 2009 at 3:05 PM

No it is with 1.7.5!

Formally 14008!

Anyway the changes I've done is only and else.....if the regular expression is not matched

Benjamin Reed July 30, 2009 at 3:02 PM

Antonio, could this be related to https://opennms.atlassian.net/browse/NMS-3137#icft=NMS-3137 – maybe you're getting unexpected messages because of the packet race condition?

If you still saw the issue after r14192 then never mind. 🙂

Former user July 30, 2009 at 2:46 PM

The latter commit is a work around, I did not have understand what the real trouble is.
I catch strange habits and discard the messages

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

PagerDuty

Created July 30, 2009 at 2:36 PM
Updated March 24, 2011 at 9:18 AM
Resolved October 1, 2009 at 2:06 PM

Flag notifications