[
  {
    "id": "Nginx-Service",
    "configuration": {
      "children": [
        {
          "x": 0,
          "y": 0,
          "w": 24,
          "h": 39,
          "i": "0",
          "type": "Tab",
          "children": [
            {
              "name": "Overview",
              "children": [
                {
                  "x": 0,
                  "y": 0,
                  "w": 6,
                  "h": 13,
                  "i": "0",
                  "type": "Widget",
                  "widget": {
                    "title": "HTTP Request Trend (requests per second)"
                  },
                  "graph": {
                    "type": "Line",
                    "step": false,
                    "smooth": false,
                    "showSymbol": true,
                    "showXAxis": true,
                    "showYAxis": true
                  },
                  "expressions": [
                    "aggregate_labels(meter_nginx_service_http_requests, sum)"
                  ],
                  "metricConfig": [
                    {
                      "label": "HTTP request trend"
                    }
                  ]
                },
                {
                  "x": 6,
                  "y": 0,
                  "w": 6,
                  "h": 13,
                  "i": "1",
                  "type": "Widget",
                  "widget": {
                    "title": "HTTP Latency (ms)"
                  },
                  "graph": {
                    "type": "Line",
                    "step": false,
                    "smooth": false,
                    "showSymbol": true,
                    "showXAxis": true,
                    "showYAxis": true
                  },
                  "expressions": [
                    "aggregate_labels(meter_nginx_service_http_latency, avg(p))"
                  ]
                },
                {
                  "x": 12,
                  "y": 0,
                  "w": 6,
                  "h": 13,
                  "i": "2",
                  "type": "Widget",
                  "widget": {
                    "title": "HTTP Bandwidth (KB/s)"
                  },
                  "graph": {
                    "type": "Line",
                    "step": false,
                    "smooth": false,
                    "showSymbol": true,
                    "showXAxis": true,
                    "showYAxis": true
                  },
                  "expressions": [
                    "aggregate_labels(meter_nginx_service_http_bandwidth, sum(type))/1024"
                  ]
                },
                {
                  "x": 18,
                  "y": 0,
                  "w": 6,
                  "h": 13,
                  "i": "4",
                  "type": "Widget",
                  "expressions": [
                    "aggregate_labels(meter_nginx_service_http_connections, sum(state))"
                  ],
                  "graph": {
                    "type": "Line",
                    "step": false,
                    "smooth": false,
                    "showSymbol": true,
                    "showXAxis": true,
                    "showYAxis": true
                  },
                  "widget": {
                    "title": "HTTP Connections"
                  }
                },
                {
                  "x": 0,
                  "y": 13,
                  "w": 6,
                  "h": 13,
                  "i": "5",
                  "type": "Widget",
                  "widget": {
                    "title": "HTTP Status Trend (requests per second)"
                  },
                  "graph": {
                    "type": "Line",
                    "step": false,
                    "smooth": false,
                    "showSymbol": true,
                    "showXAxis": true,
                    "showYAxis": true
                  },
                  "expressions": [
                    "aggregate_labels(meter_nginx_service_http_status, sum(status))"
                  ]
                },
                {
                  "x": 6,
                  "y": 13,
                  "w": 6,
                  "h": 13,
                  "i": "6",
                  "type": "Widget",
                  "expressions": [
                    "aggregate_labels(meter_nginx_service_http_4xx_requests_increment, sum)/aggregate_labels(meter_nginx_service_http_requests_increment, sum)*100"
                  ],
                  "metricConfig": [
                    {
                      "label": "HTTP 4xx percent"
                    }
                  ],
                  "graph": {
                    "type": "Area",
                    "opacity": 0.4,
                    "showXAxis": true,
                    "showYAxis": true
                  },
                  "widget": {
                    "title": "HTTP Status 4xx Percent Per Minute (%)"
                  }
                },
                {
                  "x": 12,
                  "y": 13,
                  "w": 6,
                  "h": 13,
                  "i": "7",
                  "type": "Widget",
                  "expressions": [
                    "aggregate_labels(meter_nginx_service_http_5xx_requests_increment, sum)/aggregate_labels(meter_nginx_service_http_requests_increment, sum)*100"
                  ],
                  "metricConfig": [
                    {
                      "label": "HTTP 5xx percent"
                    }
                  ],
                  "graph": {
                    "type": "Area",
                    "opacity": 0.4,
                    "showXAxis": true,
                    "showYAxis": true
                  },
                  "widget": {
                    "title": "HTTP Status 5xx Percent Per Minute (%)"
                  }
                },
                {
                  "x": 18,
                  "y": 13,
                  "w": 6,
                  "h": 13,
                  "i": "8",
                  "type": "Widget",
                  "expressions": [
                    "aggregate_labels(meter_nginx_service_error_log_count, sum(level))"
                  ],
                  "graph": {
                    "type": "Bar",
                    "showBackground": true
                  },
                  "widget": {
                    "title": "Error Log Count (Per Minute)"
                  }
                }
              ]
            },
            {
              "name": "Instance",
              "children": [
                {
                  "x": 0,
                  "y": 0,
                  "w": 24,
                  "h": 35,
                  "i": "0",
                  "type": "Widget",
                  "expressions": [
                    ""
                  ],
                  "graph": {
                    "type": "InstanceList",
                    "dashboardName": "Nginx-Instance",
                    "fontSize": 12
                  }
                }
              ]
            },
            {
              "name": "Route",
              "children": [
                {
                  "x": 0,
                  "y": 0,
                  "w": 24,
                  "h": 35,
                  "i": "0",
                  "type": "Widget",
                  "expressions": [
                    ""
                  ],
                  "graph": {
                    "type": "EndpointList",
                    "dashboardName": "Nginx-Endpoint",
                    "fontSize": 12,
                    "showXAxis": false,
                    "showYAxis": false
                  }
                }
              ]
            },
            {
              "name": "Log",
              "children": [
                {
                  "x": 0,
                  "y": 0,
                  "w": 24,
                  "h": 35,
                  "i": "0",
                  "type": "Log"
                }
              ]
            }
          ]
        }
      ],
      "layer": "NGINX",
      "entity": "Service",
      "name": "Nginx-Service",
      "isRoot": false,
      "isDefault": true,
      "expressions": [
        "avg(aggregate_labels(meter_nginx_service_http_status{status='200'}, sum))",
        "avg(aggregate_labels(meter_nginx_service_http_status{status='404'}, sum))",
        "avg(aggregate_labels(meter_nginx_service_http_status{status='500'}, sum))"
      ],
      "expressionsConfig": [
        {
          "unit": "req / s",
          "label": "HTTP Status 200"
        },
        {
          "unit": "req / s",
          "label": "HTTP Status 404"
        },
        {
          "unit": "req / s",
          "label": "HTTP Status 500"
        }
      ]
    }
  }
]
