RedditPP Mascot

RedditPP

r/truenas • … • u/ajtaggart

How to trigger custom alerts?

Hello everyone!

I am trying to trigger custom alerts via shell/python scripts and could use some help. I started by trying to create and trigger a custom alert in python using the middlewared package but did not succeed.

I have since started to try and trigger alerts via the midclt cli tool. I have not found much success with this either... but I was able to run the following command (trying to just trigger an existing alert class):

midclt call alert.oneshot\_create ZpoolCapacityNoticeAlertClass

This ran but does not trigger an alert, I may have to pass some configs to the class, so I will keep searching around. But if anyone knows how to or can point me in a direction to either create and trigger alerts via python or bash/shell or using the midclt tool.. I would greatly appreciate it <3

— 0