1
23.1 Legacy Series / Re: telegram api or otherwise.. smtp2telegram
« on: October 01, 2023, 10:55:22 pm »
Hopefully this thread isn't too old, but I have managed to get this working, sort of. I've gotten all the way to the last part, adding the 2 lines to the config file.
"check file nginx.pid with path /var/run/nginx.pid
if changed pid then exec "/usr/local/bin/monit2telegram"
The first problem is, nginx.pid doesn't exist. There is a monit.pid file, and if I enter that instead, I still get an error in the monit log "syntax error 'pid' " for line 2.
Also, the monit2telegram file has a line
"/usr/local/bin/sendtelegram -c /etc/telegramrc -m "Monit $MONIT_SERVICE - $MONIT_EVENT at $MONIT_DATE on $MONIT_HOST: $MONIT_ACTION $MONIT_DESCRIPTION.""
If i manually trigger monit2telegram, the message I get is "Monit - at on :" so obviously those $MONIT commands or whatever either are wrong, or are different in Opnsense. I'm not really clear where that data is actually supposed to be pulled from. Any help would be greatly appreciated! Thanks in advance!
"check file nginx.pid with path /var/run/nginx.pid
if changed pid then exec "/usr/local/bin/monit2telegram"
The first problem is, nginx.pid doesn't exist. There is a monit.pid file, and if I enter that instead, I still get an error in the monit log "syntax error 'pid' " for line 2.
Also, the monit2telegram file has a line
"/usr/local/bin/sendtelegram -c /etc/telegramrc -m "Monit $MONIT_SERVICE - $MONIT_EVENT at $MONIT_DATE on $MONIT_HOST: $MONIT_ACTION $MONIT_DESCRIPTION.""
If i manually trigger monit2telegram, the message I get is "Monit - at on :" so obviously those $MONIT commands or whatever either are wrong, or are different in Opnsense. I'm not really clear where that data is actually supposed to be pulled from. Any help would be greatly appreciated! Thanks in advance!