Prometheus iptables exporter
Project description
iptables-exporter collects traffic data from iptables rules.
Installation
pip install iptables-exporter
Usage
Test run:
iptables-exporter --dump-data
Run iptables-exporter:
iptables-exporter --port 9119
Point your browser to http://localhost:9119/metrics
Configure iptables
Just add a comment starting with iptables-exporter to your iptables rule:
iptables -A INPUT --dport ssh -j ACCEPT -m comment --comment "iptables-exporter ssh traffic"
collects packets and bytes counter:
iptables_packets{table="filter",chain="input",rule="ssh traffic"} 347.0
iptables_bytes{table="filter",chain="input",rule="ssh traffic"} 44512.0
More rules with same name:
iptables -A INPUT -s 10.0.0.0/8 --dport ssh -j ACCEPT -m comment --comment "iptables-exporter ssh traffic" iptables -A INPUT -s 172.16.0.0/12 --dport ssh -j ACCEPT -m comment --comment "iptables-exporter ssh traffic" iptables -A INPUT -s 192.168.0.0/16 --dport ssh -j ACCEPT -m comment --comment "iptables-exporter ssh traffic"
exports only the total of the 3 rules as they have same table, chain and name.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iptables-exporter-0.1.3.tar.gz.
File metadata
- Download URL: iptables-exporter-0.1.3.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
065490877cad63d7c07d30d3460fb4d24821838f88ca49b5a93324128f6507b5
|
|
| MD5 |
8afed07f3d972cf8e55a56a3339127c9
|
|
| BLAKE2b-256 |
803a67addb12966168d362a18883dc66e578beaf6b386a667a862b020b895576
|
File details
Details for the file iptables_exporter-0.1.3-py2.py3-none-any.whl.
File metadata
- Download URL: iptables_exporter-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
267eef612e4015ffeb4f06ec8257a089d9ed05fb872f02a0fb21c0fbe56cdcd5
|
|
| MD5 |
e6cc87ac293c3347a8934d367653a37b
|
|
| BLAKE2b-256 |
93bdf7b9df0892f94cd2eda35a74e53d59b810753e2c2443d361f4ab9e7ece6a
|