https://rancher.com/ logo
Title
s

square-engine-61315

04/11/2023, 7:48 AM
Is there a way to get notified (e.g. via e-mail) when
system-upgrade-controller
performs an update? I need some kind of audit trail + notification system.
c

creamy-pencil-82913

04/11/2023, 9:26 AM
No, that would probably best be a job for a logging+alerting system
s

square-engine-61315

04/11/2023, 9:27 AM
OK, do you know of any good ones that I should look into?
c

creamy-pencil-82913

04/11/2023, 9:27 AM
The SUC pod will log when it takes action, you could trigger an alert off that
👀 1
q

quick-dentist-45681

04/13/2023, 8:41 AM
I have made a prepare step that sends a pushover notification when it starts upgrading. You could do something like that, but it's not really elegant 🙂
s

square-engine-61315

04/13/2023, 8:42 AM
I don't understand what you mean by "prepare step".
q

quick-dentist-45681

04/13/2023, 8:44 AM
SUC is not really well documented, but a plan can have a
prepare
step, which runs a command in an image. The k3s-upgrade plans use a prepare step in the agent plan, but not on the server plan. So I added my own prepare step to the server plan that just runs a scripts that sends a pushover notification.
s

square-engine-61315

04/13/2023, 8:46 AM
Oh, I see. So it's kind of like an unused hook. I see why it's not elegant, and why it works. Thanks for the tip! It would be awesome to be able to add our own "pre-upgrade" hooks that do not override the
prepare
step.
1
If I go with the log-scraping route that @creamy-pencil-82913 suggested, which software solutions exist for that? I would love to learn something new here, but I don't have time to evaluate too many different options (assuming there are multiple options).