look at the dynastats capability, it lets you addd stats that will show up in
impstats and add to them as needed
https://www.rsyslog.com/doc/configuration/dyn_stats.html
David Lang
On Tue, 11 Mar 2025, John Chivian via rsyslog wrote:
Date: Tue, 11 Mar 2025 15:11:36 -0500
From: John Chivian via rsyslog <rsyslog@lists.adiscon.com>
To: rsyslog-users <rsyslog@lists.adiscon.com>
Cc: John Chivian <jchiv...@chivian.com>
Subject: Re: [rsyslog] Metrics for filtered "stop" messages?
Create a ruleset called “do_discard” as follows…
ruleset(name=“do_discard”) { action(type=“omfile” file=“/dev/null”
name=“events_discarded”) stop }
Use that ruleset (call do_discard) instead of the “stop” directive elsewhere in
the configuration.
Enable impstats and look for name=“events_discarded”. The statistics will show
the number of messages “processed” by the ruleset.
Yes, it is a little extra processing, but I think it’s the only way to get what
you’re after. The maintainers will know for sure.
Regards,
On Mar 11, 2025, at 12:43, Johan Ryberg via rsyslog <rsyslog@lists.adiscon.com>
wrote:
Hi,
Is there any way of collecting metrics of messages that have been filtered
"stop"?
I suppose I can compare the amount of incoming and outgoing messages but it
would be nice to know exactly how many that was discarded by choice.
Best regards Johan
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.