A Python script designed to read output from pmacct daemons, to process it and to store it into ElasticSearch.
pmacct-to-elasticsearch is a python script designed to read output from pmacct daemons, to process it and to store it into ElasticSearch. It works with both memory and print plugins and, optionally, it can perform manipulations on data (such as to add fields on the basis of other values).
- pmacct daemons collect IP accounting data and process them with their plugins;
- data are stored into in-memory-tables (memory plugins), JSON or CSV files (print plugins);
- crontab jobs (memory plugins) or trigger scripts (print plugins) are invoked to execute pmacct-to-elasticsearch;
- pmacct’s output records are finally processed by pmacct-to-elasticsearch, which reads them from stdin (memory plugins) or directly from file.
Optionally, some data transformations can be configured, to allow pmacct-to-elasticsearch to add or remove fields to/from the output documents that are sent to ElasticSearch for indexing. These additional fields may be useful to enhance graphs and reports legibility, or to add a further level of aggregation or filtering.
Install the program using pip:
pip install pmacct-to-elasticsearch
Then clone the repository and run the ./install script to setup your system:
cd /usr/local/src/ git clone https://github.com/pierky/pmacct-to-elasticsearch.git cd pmacct-to-elasticsearch/ ./install
A simple tutorial on pmacct integration with ElasticSearch/Kibana using pmacct-to-elasticsearch can be found at http://blog.pierky.com/integration-of-pmacct-with-elasticsearch-and-kibana.
- Add support of more pmacct output formats (Apache Avro, …).
More command line arguments.
The command line arguments under the Configuration options group can be used to override settings done on the plugin configuration file.
CSV output support.
The InputFormat option in the plugin configuration file can be used to instruct pmacct-to-elasticsearch to parse CSV output from pmacct.
The ReaderThreads option in the plugin configuration file sets the number of threads used to process pmacct’s output.
Release history Release notifications | RSS feed
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pmacct-to-elasticsearch-0.3.0a3.tar.gz (12.2 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for pmacct-to-elasticsearch-0.3.0a3.tar.gz