Capturing entry from /var/log/messages

I have a large /var/log/messages file which gets rotated. I would like to get log entries which only have
‘rsyslogd was HUpped’ and put them into telegraf.

How would I achieve this?

I would recommend using filtering rules in rsyslog.conf (or rsyslog.d/*)


I don’t have access to syslog (rsyslog) config. I only have access to /var/log/messages.
Besides, /var/log/messages, I have other similar log files I need to apply something similar. How can I do that?

Does anyone have an idea?