Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exporter does not work for mulitple nginx instances #55

Closed
bsushant-athena opened this issue Feb 15, 2018 · 9 comments
Closed

exporter does not work for mulitple nginx instances #55

bsushant-athena opened this issue Feb 15, 2018 · 9 comments

Comments

@bsushant-athena
Copy link

Hi,

We have 2 nginx instances (with nginx-vts module installed) setup to serve the traffic.

We have setup one nginx-vts-exporter and configured it to scrape the metrics from "/status/format/json" endpoint.

Observation: metrics exposed from "/metrics" endpoint of nginx-vts-exporter doesn't include the information about the nginx instance from which the information was grabbed. Hence we are not able to plot the metrics against the nginx instance say in grafana/prometheus.

Does nginx-vts-exporter support to track metrics from multiple nginx instances? or Do we need to configure it differently to support multiple nginx instances setup?

VTS version: 0.1.14
nginx version: 1.12.0

for single instance of nginx we are getting proper data but for multiple it is causing issues.
Please help us asap!

@sysulq
Copy link
Owner

sysulq commented Feb 16, 2018

nginx-vts-exporter does not support multiple instances right now. You need to run one exporter per nginx instance.

@bsushant-athena
Copy link
Author

In my case I have two instances of nginx and on top of that we have load balancer which chooses the nginx instance in round robin fashion so I can not hard code(id:port) or point to particular nginx instance. Then how do I add two separate nginx vts exporters for two instances of nginx?

@sysulq
Copy link
Owner

sysulq commented Feb 16, 2018

You should use exporter to connect nginx instance directly, instead of the load balancer.

@bsushant-athena
Copy link
Author

bsushant-athena commented Feb 20, 2018

ok so to resolve this issue we have added nginx its exporter inside our nginx and now we get the required correct data.

@bsushant-athena
Copy link
Author

@hnlq715 One other question I've is , this module does not provide any uptime data but when I hit /status I could see the metrics there ; it is just exporter is not exposing . @hnlq715 can you take this as an enhancement ?

@sysulq
Copy link
Owner

sysulq commented Feb 22, 2018

yes, pull request is welcome:)

@bsushant-athena
Copy link
Author

I'm not familiar with go language , could you please do that and release a new version ? That will be really helpful :)

@sysulq
Copy link
Owner

sysulq commented Feb 23, 2018

No problem, I would take it into consideration. Thanks for your advise 😄
#29 also discussed this topic.

sysulq added a commit that referenced this issue Feb 25, 2018
@sysulq
Copy link
Owner

sysulq commented Feb 25, 2018

Server info metrics added, and readme docs updated, please check the latest docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants