Last active
October 5, 2021 08:25
-
-
Save 23Pstars/50278fdbc8188f46408e7ce7bc1661c8 to your computer and use it in GitHub Desktop.
apache logs to telegram notifications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type=Single | |
ptype=RegExp | |
pattern=\[php7\: | |
desc=$0 | |
action=shellcmd /path/to/dir/tg-send.sh "$0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sec -conf=/path/to/dir/php7err.conf -input=/path/to/apache2/error.log -detach |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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