Giter Site home page Giter Site logo

Comments (11)

sysulq avatar sysulq commented on May 27, 2024

You should make sure http://localhost/status is the url where vts-module exposes its metrics.

I think this is the point you should take into account.

from nginx-vts-exporter.

smallfish01 avatar smallfish01 commented on May 27, 2024

Yes, I can access http://localhost/status from my browser.

from nginx-vts-exporter.

sysulq avatar sysulq commented on May 27, 2024

And this url should return json format metrics instead of html content.

from nginx-vts-exporter.

smallfish01 avatar smallfish01 commented on May 27, 2024

Hi hnlq715,
Thanks for your help, I tried change nginx.conf and change the code "vhost_traffic_status_display_format html;" to "vhost_traffic_status_display_format json;" and now it's ok:
./nginx-vts-exporter &
[1] 4941

2017/09/08 08:31:56 Starting nginx_vts_exporter (version=0.6, branch=HEAD, revision=e48bd6899d8864b11b9f71f852b049ec3ad2ae26)

2017/09/08 08:31:56 Build context (go=go1.8.3, user=root@3b0fc1d0acb6, date=20170808-07:09:08)
2017/09/08 08:31:56 Starting Server at : :9913
2017/09/08 08:31:56 Metrics endpoint: /metrics
2017/09/08 08:31:56 Metrics namespace: nginx
2017/09/08 08:31:56 Scraping information from : http://localhost/status

But I have another questions, "nginx-vts-exporter" process will terminated automatically about in a day, do you konw how can I setup log and to find the root cause?

from nginx-vts-exporter.

sysulq avatar sysulq commented on May 27, 2024

Nice to hear that πŸ˜ƒ
The log of nginx-vts-exporter would direcetly print into stdout, and you can use nohup ./nginx-vts-exporter & to capture log into nohup.out file.

from nginx-vts-exporter.

smallfish01 avatar smallfish01 commented on May 27, 2024

I created log file for nginx-vts-exporter, but when the process terminated, no any other information:

tailf /var/log/nginx-vts-exporter.log

2017/09/11 14:58:39 Starting nginx_vts_exporter (version=0.6, branch=HEAD, revision=e48bd6899d8864b11b9f71f852b049ec3ad2ae26)
2017/09/11 14:58:39 Build context (go=go1.8.3, user=root@3b0fc1d0acb6, date=20170808-07:09:08)
2017/09/11 14:58:39 Starting Server at : :9913
2017/09/11 14:58:39 Metrics endpoint: /metrics
2017/09/11 14:58:39 Metrics namespace: nginx
2017/09/11 14:58:39 Scraping information from : http://localhost/status

I don't know why the process terminted automatically, please advise.

from nginx-vts-exporter.

sysulq avatar sysulq commented on May 27, 2024

Maybe the process exits when your ssh terminal quits? Please try nohup ./nginx-vts-exporter & to launch this program

from nginx-vts-exporter.

smallfish01 avatar smallfish01 commented on May 27, 2024

Yes, you are right, I used "nohup" and the process is running ok now.
Thanks you very much!

from nginx-vts-exporter.

sysulq avatar sysulq commented on May 27, 2024

Nice :-)

from nginx-vts-exporter.

dragonfly-net avatar dragonfly-net commented on May 27, 2024

Scraping information from : http://localhost/status
How to replace it to more correct path like http://localhost/status/format/json ? I made
export NGINX_STATUS=http://localhost/status/format/json but unsuccessfully.

from nginx-vts-exporter.

evilmate3 avatar evilmate3 commented on May 27, 2024

Scraping information from : http://localhost/status
How to replace it to more correct path like http://localhost/status/format/json ? I made
export NGINX_STATUS=http://localhost/status/format/json but unsuccessfully.

try http://localhost/status?json

from nginx-vts-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.