All Projects → hnlq715 → Nginx Vts Exporter

hnlq715 / Nginx Vts Exporter

Licence: mit
(NOT MAINTAINED) Simple server that scrapes Nginx vts stats and exports them via HTTP for Prometheus consumption

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Nginx Vts Exporter

Exporter exporter
A reverse proxy designed for Prometheus exporters
Stars: ✭ 194 (-59.33%)
Mutual labels:  prometheus, prometheus-exporter, nginx
resoto
Resoto - Find leaky resources, manage quota limits, detect drift, and clean up!
Stars: ✭ 562 (+17.82%)
Mutual labels:  prometheus, prometheus-exporter
loki exporter
Prometheus exporter to collect metrics and run queries against the Grafana Loki API.
Stars: ✭ 28 (-94.13%)
Mutual labels:  prometheus, prometheus-exporter
sa-prometheus-exporters
Collection of the preselected prometheus exporters to be installed on a target nodes
Stars: ✭ 17 (-96.44%)
Mutual labels:  prometheus, prometheus-exporter
prometheus-mysql-exporter
Prometheus MySQL Exporter
Stars: ✭ 33 (-93.08%)
Mutual labels:  prometheus, prometheus-exporter
aws-ec2-sg-exporter
A dockerized Prometheus exporter that compares desired/wanted IPv4/IPv6 CIDR against currently applied inbound CIDR rules in your security group(s).
Stars: ✭ 23 (-95.18%)
Mutual labels:  prometheus, prometheus-exporter
geoip-exporter
GeoIP exporter for Prometheus
Stars: ✭ 27 (-94.34%)
Mutual labels:  prometheus, prometheus-exporter
github exporter
Prometheus exporter for GitHub
Stars: ✭ 21 (-95.6%)
Mutual labels:  prometheus, prometheus-exporter
Exporterhub.io
A Curated List of Prometheus Exporters
Stars: ✭ 252 (-47.17%)
Mutual labels:  prometheus, prometheus-exporter
Kube State Metrics
Add-on agent to generate and expose cluster-level metrics.
Stars: ✭ 3,433 (+619.71%)
Mutual labels:  prometheus, prometheus-exporter
Kminion
KMinion is a feature-rich Prometheus exporter for Apache Kafka written in Go. It is lightweight and highly configurable so that it will meet your requirements.
Stars: ✭ 274 (-42.56%)
Mutual labels:  prometheus, prometheus-exporter
deluge exporter
Prometheus exporter for the Deluge BitTorrent client
Stars: ✭ 24 (-94.97%)
Mutual labels:  prometheus, prometheus-exporter
sentry exporter
Prometheus exporter for Sentry
Stars: ✭ 23 (-95.18%)
Mutual labels:  prometheus, prometheus-exporter
s3 exporter
Exports Prometheus metrics about S3 buckets and objects
Stars: ✭ 65 (-86.37%)
Mutual labels:  prometheus, prometheus-exporter
zfs exporter
Prometheus ZFS exporter
Stars: ✭ 52 (-89.1%)
Mutual labels:  prometheus, prometheus-exporter
gobgp exporter
Prometheus Exporter for GoBGP
Stars: ✭ 15 (-96.86%)
Mutual labels:  prometheus, prometheus-exporter
Pihole Exporter
A Prometheus exporter for PI-Hole's Raspberry PI ad blocker
Stars: ✭ 352 (-26.21%)
Mutual labels:  prometheus, prometheus-exporter
nvidia gpu exporter
Nvidia GPU exporter for prometheus using nvidia-smi binary
Stars: ✭ 85 (-82.18%)
Mutual labels:  prometheus, prometheus-exporter
starboard-exporter
A standalone exporter for vulnerability reports and other CRs created by Starboard.
Stars: ✭ 22 (-95.39%)
Mutual labels:  prometheus, prometheus-exporter
prometheus-hetzner-sd
Prometheus Service Discovery for Hetzner
Stars: ✭ 15 (-96.86%)
Mutual labels:  prometheus, prometheus-exporter

nginx-vts-exporter

Build Status Docker Pulls Github All Releases GitHub release Go Report Card

Simple server that scrapes Nginx vts stats and exports them via HTTP for Prometheus consumption

To support time related histogram metrics, please refer to hnlq715/nginx-prometheus-metrics or #43.

ANN

It's hard to say that this project is not maintained any longer, and it is recommended to use nginx-vtx-module instead, which supports multiple vhost_traffic_status_display_format, like <json|html|jsonp|prometheus>.

Hope you guys enjoy it, and thanks for all the contributors and the issue finders. 😃

Table of Contents

Dependency

Download

Binary can be downloaded from Releases page.

Compile

build binary

make

build RPM package

make rpm

build docker image

make docker

Docker Hub Image

docker pull sophos/nginx-vts-exporter:latest

It can be used directly instead of having to build the image yourself. (Docker Hub sophos/nginx-vts-exporter)

Run

run binary

nohup /bin/nginx-vts-exporter -nginx.scrape_uri=http://localhost/status/format/json

run docker

docker run  -ti --rm --env NGINX_STATUS="http://localhost/status/format/json" sophos/nginx-vts-exporter

Environment variables

This image is configurable using different env variables

Variable name Default Description
NGINX_STATUS http://localhost/status/format/json Nginx JSON format status page
METRICS_ENDPOINT /metrics Metrics endpoint exportation URI
METRICS_ADDR :9913 Metrics exportation address:port
METRICS_NS nginx Prometheus metrics Namespaces

Metrics

Documents about exposed Prometheus metrics.

For details on the underlying metrics please see nginx-module-vts

For grafana dashboard please see nginx-vts-exporter dashboard

Server main

Metrics details

Nginx data Name Exposed informations
Info {NAMESPACE}_server_info hostName, nginxVersion, uptimeSec
Connections {NAMESPACE}_server_connections status [active, reading, writing, waiting, accepted, handled]

Metrics output example

# Server Info
nginx_server_info{hostName="localhost", nginxVersion="1.11.1"} 9527
# Server Connections
nginx_server_connections{status="accepted"} 70606

Server zones

Metrics details

Nginx data Name Exposed informations
Requests {NAMESPACE}_server_requests code [2xx, 3xx, 4xx, 5xx, total], host (or domain name)
Bytes {NAMESPACE}_server_bytes direction [in, out], host (or domain name)
Cache {NAMESPACE}_server_cache status [bypass, expired, hit, miss, revalidated, scarce, stale, updating], host (or domain name)

Metrics output example

# Server Requests
nginx_server_requests{code="1xx",host="test.domain.com"} 0

# Server Bytes
nginx_server_bytes{direction="in",host="test.domain.com"} 21

# Server Cache
nginx_server_cache{host="test.domain.com",status="bypass"} 2

Filter zones

Metrics details

Nginx data Name Exposed informations
Requests {NAMESPACE}_filter_requests code [2xx, 3xx, 4xx, 5xx and total], filter, filter name
Bytes {NAMESPACE}_filter_bytes direction [in, out], filter, filter name
Response time {NAMESPACE}_filter_responseMsec filter, filter name

Metrics output example

# Filter Requests
nginx_upstream_requests{code="1xx", filter="country", filterName="BY"} 0

# Filter Bytes
nginx_upstream_bytes{direction="in", filter="country", filterName="BY"} 0

# Filter Response time
nginx_upstream_responseMsec{filter="country", filterName="BY"} 99

Upstreams

Metrics details

Nginx data Name Exposed informations
Requests {NAMESPACE}_upstream_requests code [2xx, 3xx, 4xx, 5xx and total], upstream (or upstream name)
Bytes {NAMESPACE}_upstream_bytes direction [in, out], upstream (or upstream name)
Response time {NAMESPACE}_upstream_responseMsec backend (or server), in_bytes, out_bytes, upstream (or upstream name)

Metrics output example

# Upstream Requests
nginx_upstream_requests{code="1xx",upstream="XXX-XXXXX-3000"} 0

# Upstream Bytes
nginx_upstream_bytes{direction="in",upstream="XXX-XXXXX-3000"} 0

# Upstream Response time
nginx_upstream_responseMsec{backend="10.2.15.10:3000",upstream="XXX-XXXXX-3000"} 99
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].