Prometheus nginx socket exporter

stand-alone version of k8s/ingress-nginx' prometheus exporter

based on openresty/lua-nginx-module

how it works

exporter opens socket (/tmp/prometheus-nginx.socket) and waits for Nginx workers to send logs every second

Nginx config should have monitor.lua and monitor.conf from this repo

user config may be instrumented with service_name and location_path that go as labels, see example default.conf

server {
    set $service_name  "app8080";
    listen       8080;
    location / {
        set $location_path  "/backend";
        proxy_pass http://backend;
    }

how to run

docker build . -t r
docker run -it -p8080:8080 -p10254:10254 r

nginx -- http://localhost:8080/debian/doc/

metrics -- http://localhost:10254/metrics

this exporter metric list

curl -s 127.0.0.1:10254/metrics |grep -v ^# | cut -d'{' -f1|cut -d' ' -f1 | sort | uniq

nginx_bytes_sent_bucket
nginx_bytes_sent_count
nginx_bytes_sent_sum
nginx_process_connections
nginx_process_connections_total
nginx_process_cpu_seconds_total
nginx_process_num_procs
nginx_process_oldest_start_time_seconds
nginx_process_read_bytes_total
nginx_process_requests_total
nginx_process_resident_memory_bytes
nginx_process_virtual_memory_bytes
nginx_process_write_bytes_total
nginx_request_duration_seconds_bucket
nginx_request_duration_seconds_count
nginx_request_duration_seconds_sum
nginx_requests
nginx_request_size_bucket
nginx_request_size_count
nginx_request_size_sum
nginx_response_duration_seconds_bucket
nginx_response_duration_seconds_count
nginx_response_duration_seconds_sum
nginx_response_size_bucket
nginx_response_size_count
nginx_response_size_sum
nginx_upstream_latency_seconds
nginx_upstream_latency_seconds_count
nginx_upstream_latency_seconds_sum

nginx-ingress metrics list

nginx_ingress_controller_bytes_sent_bucket
nginx_ingress_controller_bytes_sent_count
nginx_ingress_controller_bytes_sent_sum
nginx_ingress_controller_config_hash
nginx_ingress_controller_config_last_reload_successful
nginx_ingress_controller_config_last_reload_successful_timestamp_seconds
nginx_ingress_controller_ingress_upstream_latency_seconds_count
nginx_ingress_controller_ingress_upstream_latency_seconds_sum
nginx_ingress_controller_nginx_process_connections
nginx_ingress_controller_nginx_process_connections_total
nginx_ingress_controller_nginx_process_cpu_seconds_total
nginx_ingress_controller_nginx_process_num_procs
nginx_ingress_controller_nginx_process_oldest_start_time_seconds
nginx_ingress_controller_nginx_process_read_bytes_total
nginx_ingress_controller_nginx_process_requests_total
nginx_ingress_controller_nginx_process_resident_memory_bytes
nginx_ingress_controller_nginx_process_virtual_memory_bytes
nginx_ingress_controller_nginx_process_write_bytes_total
nginx_ingress_controller_request_duration_seconds_bucket
nginx_ingress_controller_request_duration_seconds_count
nginx_ingress_controller_request_duration_seconds_sum
nginx_ingress_controller_requests
nginx_ingress_controller_request_size_bucket
nginx_ingress_controller_request_size_count
nginx_ingress_controller_request_size_sum
nginx_ingress_controller_response_duration_seconds_bucket
nginx_ingress_controller_response_duration_seconds_count
nginx_ingress_controller_response_duration_seconds_sum
nginx_ingress_controller_response_size_bucket
nginx_ingress_controller_response_size_count
nginx_ingress_controller_response_size_sum
nginx_ingress_controller_success
Similar Resources

Encode and Decode Message Length Indicators for TCP/IP socket based protocols

SimpleMLI A Message Length Indicator Encoder/Decoder Message Length Indicators (MLI) are commonly used in communications over raw TCP/IP sockets. This

Nov 24, 2022

Web socket in go :book:

websockets-in-go curl -i -G -d "id=UC29ju8bIPH5as8OGnQzwJyA&part=statistics&key=AIzaSyCuhMEgZHU6Epb9rjzKtRRGJY8bLEZjTA8" https://www.googleapis.com/yo

Dec 11, 2022

A TCP socket based chat server implemented using Go

Go Chat Server A better TCP socket chat server implemented using Go Connecting nc localhost 5000 Docker Build the container image docker build -t grub

Oct 16, 2021

Demonstration of using Pion WebRTC with a shared socket

pion-webrtc-shared-socket This example demonstrates how Pion WebRTC can use an already listening UDP socket. On startup we listen on UDP Socket 8000.

Apr 4, 2022

Native macOS networking for QEMU using vmnet.framework and socket networking.

qemu-vmnet Native macOS networking for QEMU using vmnet.framework and socket networking. Getting started TODO -netdev socket,id=net0,udp=:1234,localad

Jan 5, 2023

Simple forwarding a unix domain socket to a local port.

WaziApp Proxy WaziApp proxy is a simple http proxy that is intended to listen on the WaziApp unix socket /var/lib/waziapp/proxy.sock and forwards to a

Nov 18, 2021

TCP output for beats to send events over TCP socket.

beats-tcp-output How To Use Clone this project to elastic/beats/libbeat/output/ Modify elastic/beats/libbeat/publisher/includes/includes.go : // add i

Aug 25, 2022

Golang simple socket framework

go-socket go-socket是一个Go(golang)编写的socket服务器、客户端开发框架包,使用非常简单,里面的两个示例代码验证通过 使用方式

Jun 15, 2022

Plugs module to see different types of plug types needed in different countries, and a comparison tool between two countries plug socket types.

plugs Importing the module: go get github.com/matthewboyd/plugs "github.com/matthewboyd/plugs" How to use the module: There are two functions wi

Dec 28, 2021
GOWS is GoLang web-socket module Provides you with ease of handling web socket connections with a few lines

GOWS GOWS is GoLang web-socket module Provides you with ease of handling web socket connections with a few lines, it supports multi-connection on one

Apr 4, 2022
Simple Relay between a Unix socket and a TCP socket, and vice versa.
Simple Relay between a Unix socket and a TCP socket, and vice versa.

Simple TCP <-> Unix Relay simpletcpunixrelay is a program which exposes a TCP endpoint as a Unix socket and vice versa. Usecase Let's say you are runn

Nov 23, 2022
🦈 Prometheus exporter for pcap metrics

pcap-exporter ?? Prometheus exporter for pcap metrics Usage

Jun 5, 2022
Prometheus exporter for counting connected devices to a network using nmap

nmapprom Prometheus exporter for counting the hosts connected to a network using nmap · Report Bug · Request Feature Table of Contents About The Proje

Oct 17, 2021
Prometheus exporter for ping metrics such as RTT, packet loss, and jitter to any number of hosts.

ping_exporter Command ping_exporter provides a Prometheus exporter for ping metrics such as RTT, packet loss, and jitter to any number of hosts. Usage

Sep 24, 2022
Simple Nginx Load Balancing Use Docker Engine
Simple Nginx Load Balancing Use Docker Engine

Load Balancing Menggunakan Nginx Load Balancing adalah sebuah mekanisme untuk membagi atau mendistribusikan trafik ke beberapa server. Nginx selain be

Dec 14, 2021
Golang http&grpc server for gracefully shutdown like nginx -s reload

supervisor Golang http & grpc server for gracefully shutdown like nginx -s reload if you want a server which would be restarted without stopping servi

Jan 8, 2022
Laptop Booking Application in Golang and gRPC, load-balancing with NGINX, and fully compatible with HTTPS OpenAPI v3

Laptop Booking Application in Golang and gRPC Goals GitHub CI & Coverage Badge Serialize protobuf messages Create laptop unary gRPC Search laptop Serv

Jun 17, 2022
A Socket.IO backend implementation written in Go

go-socket.io The socketio package is a simple abstraction layer for different web browser- supported transport mechanisms. It is fully compatible with

Sep 25, 2022
Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and deadline support. MIT Licensed.

socket Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and d

Dec 14, 2022