- Template name:
telegram.message - Content:
{{- /* Telegram message to use: {{ template "telegram.message2" . }} */ -}} {{ define "__alerts_list" -}} {{ range . }} {{if ne (index .Labels "alertname") "" -}} {{ if eq .Status "firing" }}🔴{{ else }}🟢{{ end }} {{- if ne (index .Labels "severity") "" -}} <u><b>P{{ index .Labels "severity" }}</b></u> {{ end -}}
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
| ipam: | |
| operator: | |
| clusterPoolIPv4PodCIDRList: "10.42.0.0/16" | |
| kubeProxyReplacement: "strict" | |
| ingressController: | |
| enabled: true | |
| loadbalancerMode: "dedicated" | |
| default: true |
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
| # Debian 10 | |
| apt-get -y update | |
| apt-get -y upgrade --without-new-pkgs | |
| apt-get -y full-upgrade | |
| cat > /etc/apt/sources.list <<"EOF" | |
| deb http://deb.debian.org/debian/ bullseye main | |
| deb-src http://deb.debian.org/debian/ bullseye main | |
| deb http://security.debian.org/bullseye-security bullseye-security/updates main | |
| deb-src http://security.debian.org/bullseye-security bullseye-security/updates main |
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
| apk --no-cache add curl | |
| curl -L -Ss "https://github.com/cloverstd/tcping/releases/download/v0.1.1/tcping-linux-amd64-v0.1.1.tar.gz" -o "/tmp/tcping-linux.tgz" | |
| tar zxf /tmp/tcping-linux.tgz -C /usr/local/bin && cd /usr/local/bin/ && chown root.root tcping && chmod 755 tcping |
- Go to Grafana > Alerting > Notification channels > New channel.
- Type: Telegram. It will ask you for a Bot API Token and a Chat ID.
- Open a chat with BotFather on Telegram.
- Type
/newbot - Type your bots name. e.g.
Grafana Bot - Type your bots username. e.g.
a_new_grafana_bot - You get your Bot API Token. Paste it on Grafana.
- Before making getUpdates (in the next step) you should add your bot into your telegram client and run
/start. Thus you start chatting with the bot and this room is assigned chat id. (Thanks to @KES777)
Last updated: 2021-02-21, tested with socket.io v3.1.1
This is the simplest implementation you will find for a client/server WebSockets architecture using socket.io.
To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.
If you're looking for examples using frameworks, check these links:
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
| input { | |
| file { | |
| type => "IISLog" | |
| path => "C:/inetpub/logs/LogFiles/W3SVC*/*.log" | |
| start_position => "beginning" | |
| } | |
| } | |
| filter { |