Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Using Monit to Email a Notification when script is ran
« previous
next »
Print
Pages: [
1
]
Author
Topic: Using Monit to Email a Notification when script is ran (Read 787 times)
xxavvv123
Newbie
Posts: 2
Karma: 0
Using Monit to Email a Notification when script is ran
«
on:
December 26, 2023, 03:59:42 pm »
Merry day after Christmas to everyone!
I have email notifications setup and working as expected in Monit.
I have a crontab setup to run a certain script 1-2 times a month.
How can I have monit send out an email everytime this script is ran?
«
Last Edit: December 26, 2023, 04:41:43 pm by xxavvv123
»
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: Using Monit to Email a Notification when script is ran
«
Reply #1 on:
December 29, 2023, 07:22:33 pm »
Hi
I would try to add logging to a file to the script (something like “super-duper script completed successfully/with an error”), then add log-file monitoring (
https://docs.opnsense.org/manual/monit.html#example-3
) in monit for “super-duper” content: in this case the line from the log will be sent to your email
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Using Monit to Email a Notification when script is ran