Skip to content
プロジェクト

概要

This project exports NginxProxyManager or NPMplus Logs to InfluxDB for displaying them in a Grafana Dashboard.

システム・インフラ

この数値の測り方

計測したスター増加

24時間
0
7日間
+1
15日間
+2
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

npmGrafStats

NginxProxyManager Grafana Statistics.

This project analyzes the logs of the Nginx Proxy Manager and exports them to InfluxDB to be used in a Grafana Dashboard. npmGrafStats can save the Revers-Proxy and/or the Redirection Logs. Also a exclusion of IP's from for example external montitoring services is possible.

current version docker image size docker pulls

npmPlus

If you are using npmPlus have a look at the branch: npmPlus-main

Following Data is extracted from the Logs:

  • source IP
  • target IP in your home network set in NPM
  • the targeted domain
  • the measurement time
  • the status code
  • the bytes transported
  • the Browser and OS
  • the Data of the source IP from GeoLite2-City.mmdb
    • Country
    • Coordinates
    • City

A view of the Grafana Dashboard only within a few hours of running: npmGrafStats

Newest features

v4.1.0 AbuseIPDB cache time is configurable with ABUSEIP_CACHE_TTL_HOURS (default 48h). Log files of newly added hosts are picked up without a restart. AbuseIPDB rate limits (HTTP 429) pause the lookups instead of retrying every request. See the changelog.md.

v4.0.0 complete rewrite from shell scripts to a single threaded Python process. Massively reduces CPU and RAM usage especially with many log files. AbuseIPDB cache now uses SQLite (no more corruption). No breaking changes to ENV vars, volumes or Grafana dashboards.

This project is a modified clone of https://github.com/Festeazy/nginxproxymanagerGraf and independent of https://github.com/jc21/nginx-proxy-manager. Changes to the original project can be found in the changelog.md file.

Obviously I'd appreciate any help or feedback :) Hope you enjoy. If you do so, please star this project.

Installation

The Installation instructions can now be found in the GitHub Wiki.

Currently supported architectures: amd64, arm/v7 and arm64.

Github Registry is now additionally available to Docker Registry by adding ghcr.io/ in front of smilebasti/npmgrafstats:latest.

A full setup example is available with the docker-compose.yml

Environment variables

Variable Default Description
INFLUX_HOST http://influxdb:8086 InfluxDB v2 URL
INFLUX_BUCKET npmgrafstats InfluxDB bucket
INFLUX_ORG npmgrafstats InfluxDB organization
INFLUX_TOKEN – required, or put it into /data/influxdb-token.txt
REDIRECTION_LOGS FALSE TRUE, FALSE or ONLY (only redirection logs)
INTERNAL_LOGS FALSE also save requests from internal IPs
MONITORING_LOGS FALSE also save requests from IPs in /data/monitoringips.txt
ABUSEIP_KEY – optional AbuseIPDB API key, or put it into /data/abuseipdb-key.txt
ABUSEIP_CACHE_TTL_HOURS 48 how long an AbuseIPDB result is cached per IP (hours, decimals allowed). Higher values save API requests (free plan: 1000 checks/day)
LOG_LEVEL INFO DEBUG, INFO, WARNING or ERROR
VERBOSE_LOGGING FALSE log every processed request

Star History

関連プロジェクトを探す

読み込み中…