Skip to content

Visually diagrams Elasticsearch ingest pipelines using Python and Graphviz

License

Notifications You must be signed in to change notification settings

bonifield/elasticsearch-ingest-pipeline-mapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Elasticsearch Ingest Pipeline Mapper

Visually diagrams Elasticsearch ingest pipelines using Python and Graphviz

Uses 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

example

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

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