Skip to main content

A Élenchos command for checking the number of lines in the ruleset of nftables.

Project description

Élenchos: Check nftables

A Élenchos command for checking the number of lines in the ruleset of nftables.

Installation and Configuration

Install Élenchos if not already installed:

cd /opt

mkdir elenchos
cd elenchos

python -m venv .venv
. .venv/bin/activate
pip install elenchos

mkdir bin
ln -s ../.venv/bin/elenchos bin/elenchos

Install the check:nftables plugin:

cd /opt/elenchos
. .venv/bin/activate

pip install elenchos_check_nftables
./bin/elenchos gather-commands

Create a configuration file /etc/nrpe.d/check_nftables.cfg for nrpe:

command[check_nftables]=/opt/elenchos/bin/elenchos check:nftables <arguments>

Possible arguments are:

  • -w, --warning[=WARNING] The warning level for the number of lines in the ruleset.
  • -c, --critical[=CRITICAL] The critical level for the number of lines in the ruleset.

Allow Élenchos to list the ruleset of nftables by creating the config file /etc/sudoers.d/enlenchos_check_nftables:

Defaults !requiretty
 
nrpe ALL = (root) NOPASSWD: /usr/bin/nft list ruleset

Finally, restart the nrpe daemon:

systemctl reload nrpe

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elenchos_check_nftables-1.0.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elenchos_check_nftables-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file elenchos_check_nftables-1.0.0.tar.gz.

File metadata

  • Download URL: elenchos_check_nftables-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.12.13 Linux/6.19.12-200.fc43.x86_64

File hashes

Hashes for elenchos_check_nftables-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9cbca08ec8ca9e0ec07636471b70c5bfb4ba7ebfd8f12c3667da03dddda23413
MD5 865d3c46a71bd7c90f66d3e9d3f94847
BLAKE2b-256 88ee2f00a285ae846cadd41f1dcbc3859221ee0dc935d12b71898afcdc9191b1

See more details on using hashes here.

File details

Details for the file elenchos_check_nftables-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for elenchos_check_nftables-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16f654156e65f7407c6ea2e6bcb69235a659da51763813f005e4474912606af1
MD5 d264fb777371b18f00722c75145df531
BLAKE2b-256 539b1be312de058bc13dd22f1cfa36bdfb9e6e1d02603dbf5c83ca7a5424c1cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page