/var/log/net-snmpd.log {
compress
dateext
maxage 365
rotate 99
size=+1024k
notifempty
missingok
create 600 root root
su root root
sharedscripts
postrotate
/usr/bin/systemctl try-restart snmpd.service >/dev/null
/usr/bin/systemctl try-restart snmptrapd.service >/dev/null
endscript
}