136
General Discussion / Re: NUT alerts through Monit?
« on: July 22, 2022, 06:34:16 pm »
Ok, finally got this to work. Took a bit of tinkering but wasn't too bad once I got going. I created three tests as variation of the below with on battery, low battery, and on line. That way I get an alert on each status change.
Test -
Name: UPS on battery
Condition: content = “UPS CyberPowerUPS on battery” **Adjust this content based on your log entry, this is just what mine is called
Action: Alert
Service -
Name: UPS_Status_Change
Type: File
Path: /var/log/system/latest.log
Tests: UPS on battery **choose any others that you created
Test -
Name: UPS on battery
Condition: content = “UPS CyberPowerUPS on battery” **Adjust this content based on your log entry, this is just what mine is called
Action: Alert
Service -
Name: UPS_Status_Change
Type: File
Path: /var/log/system/latest.log
Tests: UPS on battery **choose any others that you created


I was just lazy and hoping someone had already figured it out to save me digging around in the logs. I'll figure it out this weekend and post up my results.