Skip to content

Python 3 script for storing pmacct flow data in InfluxDB, specifically to display graphs in Grafana for ASN's with highest traffic.

License

Notifications You must be signed in to change notification settings

PLUTEX/pmacct-to-influxdb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

  • pmacct daemon to be run in 'print' JSON mode and aggregating just by 'dst_as'
  • InfluxDB API access and created database

Script is watching pmacct output file using inotify and searches for IN_CLOSE_WRITE events. On each one, data from file is parsed and written to InfluxDB. CYMRU whois server is used to translate AS numbers into more detailed string e.g. "AS57811 ATMSOFTWARE (PL)".

Everyday script refreshes _TOP_TALKERS_MEASUREMENT, that is used by Grafana for templating by ASN field.

Example Grafana dashboard view: alt text

About

Python 3 script for storing pmacct flow data in InfluxDB, specifically to display graphs in Grafana for ASN's with highest traffic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.4%
  • Shell 2.6%