I have NXLog setup and forwarding messages to my Graylog server but I want to filter and only send a few event ID’s. I have tried configuring as follows but now I get nothing sent.
# Check the size of our log file hourly, rotate if larger than 5MB
<Schedule>
Every 1 hour
Exec if (file_exists('%LOGFILE%') and \
(file_size('%LOGFILE%') >= 5M)) \
file_cycle('%LOGFILE%', 8);
</Schedule>
# Rotate our log file every week on Sunday at midnight
<Schedule>
When @weekly
Exec if file_exists('%LOGFILE%') file_cycle('%LOGFILE%', 8);
</Schedule>
Below is piece of working config (nxlog is quite old: v2.9.1716), which selects all security events and also Application SRP event 865. Just copy this event line four times, change Application to System and all EventID values. There are six more lines - to notice new anomalies and errors or analyze trends, often it is worth to collect all System and Application events, except for level:6 May be not the shortest syntax, but works well.
Forum distorts config tags , so will put it as a picture (Host intentionally replaced):