Closed ionescu77 closed 4 years ago
Hi,
thanks for doing all the work. It's a cool implementation.
I had to escape another quote though, cause I was getting an error:
2020-02-28 14:50:34,465 fail2ban.utils [8497]: ERROR 7f01ae0cf430 -- exec: curl -s -o /dev/null -X POST --data-urlencode "payload={\"text\": \"Fail2Ban (sshd) jail has started\", "channel\": \"#notifications\" }" 'https://hooks.slack.com/services/some-token-for-slack' 2020-02-28 14:50:34,466 fail2ban.utils [8497]: ERROR 7f01ae0cf430 -- stderr: '/bin/sh: -c: line 0: unexpected EOF while looking for matching `"\'' 2020-02-28 14:50:34,466 fail2ban.utils [8497]: ERROR 7f01ae0cf430 -- stderr: '/bin/sh: -c: line 1: syntax error: unexpected end of file' 2020-02-28 14:50:34,466 fail2ban.utils [8497]: ERROR 7f01ae0cf430 -- returned 1 2020-02-28 14:50:34,466 fail2ban.actions [8497]: ERROR Failed to start jail 'sshd' action 'slack-notify': Error starting action Jail('sshd')/slack-notify: 'Script error'
So in slack-notify.conf, just escape the double-quote for channel, so
slack-notify.conf
, "channel\":
becomes
, \"channel\":
Best regards,
Raz
Hi,
thanks for doing all the work. It's a cool implementation.
I had to escape another quote though, cause I was getting an error:
So in
slack-notify.conf
, just escape the double-quote for channel, sobecomes
Best regards,
Raz