nginx-vts-exporter icon indicating copy to clipboard operation
nginx-vts-exporter copied to clipboard

only seeing limited amount of metrics

Open pete-leese opened this issue 5 years ago • 4 comments

Hi There,

Trying this out....

I can hit http://localhost:8080/status OK and loads a lot of json as per what I see on the status.html

When I hit the metrics end point - All I see is the following;

HELP nginx_server_connections nginx connections

TYPE nginx_server_connections gauge

nginx_server_connections{status="accepted"} 2.3859827e+07 nginx_server_connections{status="active"} 23 nginx_server_connections{status="handled"} 0 nginx_server_connections{status="reading"} 0 nginx_server_connections{status="requests"} 0 nginx_server_connections{status="waiting"} 0 nginx_server_connections{status="writing"} 0

HELP nginx_server_info nginx info

TYPE nginx_server_info gauge

nginx_server_info{hostName="",nginxVersion=""} 0

HELP nginx_vts_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which nginx_vts_exporter was built.

TYPE nginx_vts_exporter_build_info gauge

nginx_vts_exporter_build_info{branch="HEAD",goversion="go1.10",revision="8aa2881c7050d9b28f2312d7ce99d93458611d04

Running the latest exporter release and nginx plus 1.2.2

What am I missing here?

Cheers...

Pete

pete-leese avatar Oct 03 '18 15:10 pete-leese

maybe you forgot to compile nginx with nginx-module-vts, try it

sysulq avatar Oct 08 '18 02:10 sysulq

Same problem, and nginx vts module install successfully.

image

@VR6Pete What was your issue?

devlifeX avatar May 10 '20 22:05 devlifeX

Can’t remember now , it was over 2 years ago and left the organisation since then.

pete-leese avatar May 10 '20 23:05 pete-leese

Solution for Seekers: In you docker-compose fie put this:

nginx-exporter:
    image: sophos/nginx-vts-exporter
    container_name: nginx-exporter
    user: root
    privileged: true
    environment:
      - NGINX_STATUS=http://webserver/status/format/json
    restart: always
    ports:
      - 9913:9913

instead of:

  nginx-exporter:
    image: sophos/nginx-vts-exporter
    container_name: nginx-exporter
    user: root
    privileged: true
    environment:
      - NGINX_STATUS=http://localhost/status/format/json
    restart: always
    ports:
      - 9913:9913

Don't forget change webserver (Put your nginx container name)

devlifeX avatar May 10 '20 23:05 devlifeX