No description
Find a file
2025-04-06 14:24:45 +03:00
bot-data Initial commit 2025-04-05 17:18:01 +03:00
src initial commit or smth 2025-04-06 00:01:03 +03:00
.env.example Initial commit 2025-04-05 17:18:01 +03:00
.gitignore initial commit or smth 2025-04-06 00:01:03 +03:00
docker-compose.yaml Initial commit 2025-04-05 17:18:01 +03:00
Dockerfile use multistage docker image build 2025-04-06 14:24:45 +03:00
eslint.config.js initial commit or smth 2025-04-06 00:01:03 +03:00
keywords.yml.example initial commit or smth 2025-04-06 00:01:03 +03:00
package.json initial commit or smth 2025-04-06 00:01:03 +03:00
pnpm-lock.yaml use multistage docker image build 2025-04-06 14:24:45 +03:00
README.md fix readme 2025-04-06 00:23:10 +03:00
tsconfig.json Initial commit 2025-04-05 17:18:01 +03:00

mtproto_exporter

mtcute powered Prometheus metrics exporter

this exporter is mostly useful only with userbot

Available Metrics

messenger_dialog_info{peerId, peerType, displayName}

Dialog information exposed as labels

messenger_dialog_messages_count{peerId}

Messages count since exporter startup

messenger_dialog_unread_messages_count{peerId}

Number of unread messages in dialogs

messenger_dialog_keywords_count{peerId}

Number of keywords found in messages since exporter startup

messenger_dialog_words_count{peerId}

Number of words in messages since exporter startup

This metric is disabled by default because it will produce a lot of unique time series (more info here)

This will expose each word in each message in each chat as unique metric.

This metric can be enabled with command line flag --words-counter

CLI Options

--bind-host, -b - ip address where http server will be listening on

--port, -p - port where http server will be listening on

--words-counter - enable each word counting metric

--keywords-file, -k - path to yaml file with keywords and patterns (see keywords.yml.example)

Environment Variables

API_ID - Telegram api id used for mtproto connection (see mtcute.dev)

API_HASH - Telegram api hash used for mtproto connection (see mtcute.dev)

Development

pnpm install --frozen-lockfile
cp .env.example .env
# edit .env
pnpm start

generated with @mtcute/create-bot