Stats for Telegram
- Python (tested with 3.7)
- Elasticsearch (tested with 6.2.4)
- Kibana (tested with 6.2.4)
- Filebeat (tested with 6.2.4)
Fill in your Telegram account details into
messages.pyand redirect its output to a file:
PYTHONUNBUFFERED=1 python messages.py > messages.log
Note: You need to run
messages.py at least once first to set up your Telegram session on a new device with the code that will be sent to you.
filebeat.ymland add your message log path under
pathsfor the log input:
# Paths that should be crawled and fetched. Glob based paths. paths: - /path/to/your/log/file
- Start Filebeat and set the config path to the
filebeat -e --path.config $PWD
-e flag tells Filebeat to log to standard error.
Inside Kibana, create an index pattern for
timestampas the Time Filter field name.
After creating a new index pattern, go to the "Management" tab and select "Index Patterns". The ID of the newly-created index pattern will be in the address bar just behind
indices/. Copy it.
visualisations.json, replace all IDs under
kibanaSavedObjectMeta.searchSourceJSON.indexwith your index ID.
Go to "Saved Objects" under the "Management" tab and import your modified