https://github.com/bonifield/elasticsearch-ingest-pipeline-mapper
Visually diagrams Elasticsearch ingest pipelines using Python and Graphviz
https://github.com/bonifield/elasticsearch-ingest-pipeline-mapper
beats data-engineering elastic elastic-agent elasticsearch filebeat graphviz heartbeat ingest-pipeline logstash metricbeat packetbeat pygraphviz python python3 winlogbeat
Last synced: 5 months ago
JSON representation
Visually diagrams Elasticsearch ingest pipelines using Python and Graphviz
- Host: GitHub
- URL: https://github.com/bonifield/elasticsearch-ingest-pipeline-mapper
- Owner: bonifield
- License: gpl-3.0
- Created: 2024-08-25T03:42:08.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-08-25T04:30:57.000Z (11 months ago)
- Last Synced: 2025-02-01T22:01:39.274Z (5 months ago)
- Topics: beats, data-engineering, elastic, elastic-agent, elasticsearch, filebeat, graphviz, heartbeat, ingest-pipeline, logstash, metricbeat, packetbeat, pygraphviz, python, python3, winlogbeat
- Language: Python
- Homepage:
- Size: 126 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Elasticsearch Ingest Pipeline Mapper
Visually diagrams Elasticsearch ingest pipelines using Python and GraphvizUses basic authentication (username and password) to request the `_ingest/pipeline` Elasticsearch endpoint
## Usage
Defaults to creating `/tmp/graph.dot` (text dotfile) and `/tmp/dot.png` (graph image)
```
python3 pipeline-mapper.py
```## Example Output
graph

dotfile
```
digraph "" {
graph [rankdir=LR];
"packetbeat-8.14.3-routing" -> "packetbeat-8.14.3-cassandra";
"packetbeat-8.14.3-routing" -> "packetbeat-8.14.3-dhcpv4";
"packetbeat-8.14.3-routing" -> "packetbeat-8.14.3-dns";
"packetbeat-8.14.3-routing" -> "packetbeat-8.14.3-flow";
"packetbeat-8.14.3-routing" -> "packetbeat-8.14.3-http";
"packetbeat-8.14.3-routing" -> "packetbeat-8.14.3-icmp";
"packetbeat-8.14.3-routing" -> "packetbeat-8.14.3-memcached";
...
```## Prerequisites
From the [PyGraphviz Installation Documentation](https://pygraphviz.github.io/documentation/stable/install.html)
```
sudo apt-get install graphviz graphviz-dev
python3 -m pip install pygraphviz
```## Default Values
If no arguments are given, the following are default values:
- `-u, --user`: `elastic`
- `-p, --password`: `abcd1234`
- `-s, --server`: `https://elasticsearch.local:9200/_ingest/pipeline`
- `-d, --dotfile`: `/tmp/graph.dot`
- `-o, --outfile`: `/tmp/dot.png`