Nginx Proxy Guard

Features

Dashboard, traffic and logs

NPG collects nginx's access log and ModSecurity events, stores them in its database (TimescaleDB) and shows them on three screens.

ScreenTop menuContent
DashboardDashboardA 24-hour summary, server resources and Docker container status
TrafficTrafficRequests and response data per proxy host, over time
LogsLogsIndividual records such as access logs and WAF events, with block reasons

Each screen is shown to roles with the matching permission (Dashboard, Logs).

Dashboard

The dashboard with blocked request counts, the security summary and host system resources
The dashboard with blocked request counts, the security summary and host system resources

The dashboard refreshes every 60 seconds. Its main sections:

SectionContent
Self CheckChecks the system and shows Healthy or Unhealthy.
Disk warningWhen a disk NPG uses (database, nginx logs, backups and so on) crosses the warning line, a warning with the projected time until full appears at the top.
Host System ResourcesMemory, disk, uptime and network I/O. Charts shows the last hour. Values are recorded every 30 seconds.
Docker ContainersCPU, memory, network I/O and block I/O of the NPG containers
Blocked Requests / Blocked Unique IPsRequests blocked and distinct IP addresses over the last 24 hours
Security (24h)WAF Blocked, Rate Limited, Bots Blocked, Banned IPs
Hosts OverviewNumbers of proxy hosts, redirect hosts and certificates, and certificates expiring soon
Top Hosts / Top IPs / Top User Agents (24h)Ranked by requests. Show local adds private addresses to the IP list.
Global Traffic (24h)A map of requests per country and the top countries. Clicking a country opens its access logs.

Country data requires MaxMind to be set up in Settings → GeoIP.

Traffic

The Traffic screen shows HTTP requests and response body bytes per proxy host. The byte count is the response body of completed requests recorded in the access log; it is not upload traffic or actual network bandwidth.

  • Time range: 1 hour, 24 hours, 7 days, 30 days or custom. A custom range covers up to 90 days within the last 90 days.
  • Live traffic · last 3 minutes: 10-second buckets, refreshed every 10 seconds.
  • Download CSV: the per-host values for the selected range as CSV.
  • Unclassified: requests that could not be attributed to a host.

Logs

The Logs menu has these tabs.

TabContent
Access LogsEvery request to a proxy host. Blocked requests show their block reason.
WAF EventsRequests ModSecurity detected or blocked, with the rule ID
Bot FilterRequests blocked by the bot filter
Exploit BlocksRequests blocked by exploit rules (SQL injection, XSS, path traversal and so on)
StreamSessions of TCP/UDP stream hosts
System LogsLogs of the NPG containers and internal jobs
Admin AuditAdmin activity and API token usage
Raw FilesRotation, archiving and download of the raw log files nginx writes to disk
Logs → Access Logs with a mix of 200, 403 and 404 responses
Logs → Access Logs with a mix of 200, 403 and 404 responses

The Access Logs tab offers:

  • Filters and Advanced Filters by host, status, block reason, country, IP and more
  • Presets that store a named filter combination (Save current filters)
  • Auto Refresh, Show Charts and a column chooser

Clicking a row opens Log Details. It shows the Block Reason, client information, the backend server and the retry path, and lets you Ban this IP or block the URI directly. On WAF events, Disable This Policy turns the rule off. How to read block reasons is covered in Reading logs and block reasons, and when to turn a rule off in When the WAF blocks legitimate requests.

The Log Details dialog with the Block Reason section
The Log Details dialog with the Block Reason section

Collection rules

The Collection rules button in the Access Logs toolbar sets, per host, which access log lines are not stored. Use it when very frequent, uninteresting requests such as health checks fill the logs and the disk.

Log collection rules with rules on one HTTP host and one stream host
Log collection rules with rules on one HTTP host and one stream host
FieldDescription
Don't store this host's access logsDrops all access log lines of this host. For a stream host it reads Don't store this host's sessions.
Status codesCodes or ranges separated by commas, for example 207, 3xx
MethodsSeparated by commas, for example PROPFIND, OPTIONS
Paths starting withOne per line, for example /remote.php/dav/

Lines that match a rule are not stored, so they are missing from the logs and the statistics. Requests NPG blocks and WAF events are always stored regardless of the rules, and fail2ban counting is not affected. Path rules do not apply while Strip query string from access log is on in Settings → Global Settings → Advanced.

Retention and storage

  • Retention per log type is set in Settings → Maintenance → Log Retention Settings. The Default preset keeps access logs 1095 days, WAF events 90 days, error logs 30 days, system logs 30 days and admin audit 1095 days. Logs older than that are deleted automatically.
  • Logs are stored in a TimescaleDB hypertable, and chunks older than one day are compressed.
  • Rotation and archiving of nginx's raw log files are set separately in Logs → Raw Files. See Settings and maintenance.

Prometheus metrics

The API serves Prometheus metrics at /metrics. In the standard installation the API port is open only on the server's loopback address (127.0.0.1:9080), so scrape it from the same server.

curl http://127.0.0.1:9080/metrics

Limits

  • The log screens have no export. For raw records, download the files from Logs → Raw Files. The Traffic screen offers a CSV download.
  • What to check when the logs are empty is listed in Reading logs and block reasons.