Child pages
  • Nginx Metrics Template
Skip to end of metadata
Go to start of metadata

Introduction

This page documents a metric template which renders data from our nginx Sensu checks.

This example shows a graph comparing incoming connections to completed http requests and active connections.  If the connections graph is higher than the http request graph and active connections is rising, it may indicate the server is not keeping up with incoming connections.

 

Template

The template as valid JSON is below.

  "Nginx Activity": {
    "areaAlpha":0.75,
    "areaMode":"all",
    "target":[
      {
        "alias":[
          {
            "scaleToSeconds":[
              {
                "nonNegativeDerivative":[
                  {
                    "metric":[
                      "applications.nginx.accepted"
                    ]
                  }
                ]
              },
              60
            ]
          },
          "Connections accepted per minute"
        ]
      },
     {
        "alias":[
          {
            "scaleToSeconds":[
              {
                "nonNegativeDerivative":[
                  {
                    "metric":[
                      "applications.nginx.handles"
                    ]
                  }
                ]
              },
              60
            ]
          },
          "HTTP requests handled per minute"
        ]
      },
      {
        "alias":[
          {
            "metric":[
              "applications.nginx.active_connections"
            ]
          },
          "Active connections"
        ]
      }
    ]
  }

Using this template

To apply this template, click the "edit" link on the Managed Device Metrics box when in "View Device" for the device which provides the metrics. Add this template to the list of templates in the JSON data structure. Note that it should come before the final curly brace ( } ), and a comma should be added to the end of the previous metric in order for the JSON to be valid.

  • No labels