Skip to content

TheMicroservicesAgency/msa-nginx-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

msa-nginx-dashboard

Simple dashboard to display stats about the Nginx HTTP server.

Alt text

The dashboard fetches stats from the nginx-module-vts API every second, and display them.

The javascript code to parse the JSON data is based on the original status page from nginx-module-vts.

Installation & configuration

To add the nginx-module-vts to nginx you must compile nginx from source, and add the following arguent, pointing to the nginx-module-vts folder : --add-module=/path/to/nginx-module-vts.

Once Nginx is compiled, you must add the module directive to the active configuration, like this :

  http {

      # Compute stats for all requests handled in this block
      vhost_traffic_status_zone;

      server {

          listen       80;
          server_name  localhost;

          # Serve the nginx stats from the vts module as a JSON file
          location = /nginx/stats.json {
            vhost_traffic_status_display;
            vhost_traffic_status_display_format json;
          }

          # The rest of the configuration ...
      }
  }

Once the stats are accessible via the /nginx/stats.json url, you can serve the msa-nginx-dashboard folder as a static directory, open dashboard.html in your browser, and you should get a page similar to the screenshot above.

TODO

About

A project by the Microservices Agency.

About

Simple dashboard to display stats about the Nginx HTTP server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published