Skip to content

Instantly share code, notes, and snippets.

@23Pstars
Last active Oct 5, 2021
Embed
What would you like to do?
apache logs to telegram notifications
type=Single
ptype=RegExp
pattern=\[php7\:
desc=$0
action=shellcmd /path/to/dir/tg-send.sh "$0"
#!/bin/bash
sec -conf=/path/to/dir/php7err.conf -input=/path/to/apache2/error.log -detach
#!/bin/bash
CHAT_ID={{channel-id}}
TOKEN={{telegram-token}}
curl -s "https://api.telegram.org/bot$TOKEN/sendMessage?chat_id=$CHAT_ID" --data-urlencode "text=[domain.com] $1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment