Reconnecting
Restoring connection…
Reconnecting
Restoring connection…
Nginx operations pack
v0.2.10Operator pack for nginx — read-only status + access-log analysis, TLS cert probes, and narrow operator actions (test_config, reload, graceful quit, stop). Full restart is intentionally not included; use systemd for that.
nginx
curl
Install
emisar pack install
fetches this pack, re-validates it, and verifies its content hash against the
--hash
below — the exact bytes this page was rendered against, so a tampered copy is
rejected — before copying it into the runner's packs dir. The command reloads a
running daemon itself; no manual restart.
sudo emisar pack install nginx --hash sha256:b3d6f5436443b42d54a4402832d3d23931160e3844ce2598e4ddf60b1061657e
Actions 22 total
View on GitHub-
nginx.access_top_clients exec low
Top client IPs from access log
Tails the access log and returns the top N source IPs by hit count. Assumes the default combined log format (client IP in column 1). Use to spot abusive crawlers or single-host traffic spikes that hint at a misconfigured client. Read-only.
View source on GitHub -
nginx.access_top_urls exec low
Top URLs from access log
Tails the access log, extracts the request path, and returns the top N by hit count. Assumes the default combined log format. Use to spot a noisy endpoint, a misbehaving crawler, or to size a cache. Read-only.
View source on GitHub -
nginx.active_version exec low
Active nginx version + build
Runs `nginx -V` and returns the version + compile-time flags. Use to confirm which modules are compiled in (e.g. ngx_http_v2, ngx_http_realip) before recommending a config that depends on one. Read-only.
View source on GitHub -
nginx.bytes_by_url exec low
Top URLs by total bytes sent
List top N URLs ordered by `$body_bytes_sent` summed per URL (column 10). Read-only.
View source on GitHub -
nginx.compiled_modules exec low
Compiled-in nginx modules
Parses `nginx -V` to list `--with-*` and `--add-module` flags. Use to confirm a needed module (http_v2, realip, brotli) is present.
View source on GitHub -
nginx.config_dump exec medium
Full loaded config (nginx -T)
Dumps the loaded config — main + all includes — via `nginx -T`. Sensitive content (passwords in auth_basic_user_file, API keys); output passes through redaction.
View source on GitHub -
nginx.connections_now exec low
Active connections (stub_status)
Hits the stub_status endpoint to get active/reading/writing/waiting counts. Cheaper than `nginx.status` (less parsing). Requires `stub_status on;` enabled. Loopback-only — the host is pinned to 127.0.0.1/localhost/[::1]; only the port and path vary.
View source on GitHub -
nginx.error_tail exec low
Tail nginx error log
Returns the last N lines from /var/log/nginx/error.log. Use to spot upstream connect failures, SSL handshake errors, or worker crashes immediately after a reload. Read-only.
View source on GitHub -
nginx.log_grep_4xx exec low
Recent 4xx responses from access log
Greps the access log for 4xx status codes. Read-only.
View source on GitHub -
nginx.log_grep_5xx exec low
Recent 5xx responses from access log
Greps the access log for 5xx status codes (assumes combined log format). Read-only.
View source on GitHub -
nginx.master_pid exec low
nginx master PID
Reads /run/nginx.pid (or the configured pid path). Read-only.
View source on GitHub -
nginx.quit_graceful exec high
nginx graceful quit
`nginx -s quit` — workers finish in-flight requests, then exit. No new connections accepted. Use to drain before host shutdown.
View source on GitHub -
nginx.reload exec high
nginx reload
Sends SIGHUP to the master process. Master parses the new config, spawns new workers, gracefully drains old workers. If the new config is invalid the master logs the error and keeps the old workers — the request is non-fatal. ALWAYS run `nginx.test_config` first.
View source on GitHub -
nginx.slow_requests exec low
Slowest requests (last N lines)
List top N requests sorted by `$request_time`. Requires a log_format that includes `$request_time` as a specific column; default assumes column 11. Read-only.
View source on GitHub -
nginx.ssl_cert_expiry exec low
TLS cert expiry for one vhost
Probes localhost:443 with SNI to read the cert expiry. Returns notBefore/notAfter and subject/issuer.
View source on GitHub -
nginx.ssl_chain_check exec low
TLS chain dump for one vhost
Probes localhost:443 with SNI and dumps the certificate chain. Use to confirm the intermediate cert is being served.
View source on GitHub -
nginx.status exec low
Nginx stub_status
Fetches the nginx stub_status endpoint over loopback. Returns active connections, total requests, reading/writing/waiting counts. Requires `stub_status on;` in a location block reachable from 127.0.0.1. Loopback-only — the host is pinned to 127.0.0.1/localhost/[::1]; only the port and path vary. Read-only.
View source on GitHub -
nginx.stop_immediate exec critical
nginx stop (immediate)
`nginx -s stop` — workers stop NOW. In-flight requests are dropped mid-byte. Prefer `nginx.quit_graceful` unless the server is hung.
View source on GitHub -
nginx.test_config exec low
nginx -t
Runs `nginx -t`. Validates the loaded config without applying. Use before every `nginx.reload`. A failing config returns non-zero exit and the error lines go to stderr.
View source on GitHub -
nginx.upstream_list exec low
List configured upstream blocks
Greps `nginx -T` for `upstream` + `server` directives inside upstream blocks. Read-only.
View source on GitHub -
nginx.vhost_list exec low
List configured server_name + listen blocks
Greps `nginx -T` output for `server_name` and `listen` directives — a compact view of every virtual host this nginx serves. Read-only.
View source on GitHub -
nginx.worker_count exec low
Live worker process count
Counts the workers spawned by the master via pgrep. Read-only.
View source on GitHub