Grafana dashboard: Netdata: PHP-FPM Overview
Description: Detailed stats for PHP-FPM and Nginx (requests, connections, rates, etc)

# About dashboard

A dashboard with an overview for PHP-FPM metrics:

* Connections statuses
* Requests per seconds and requests duration
* Pool performance
* CPU and RAM usage

Also there are following Nginx metrics:

* Total connections and connections by status (idle, reading, writing)
* Global requests rate and rate by status (accepted, handled)

More dashboards for Netdata you can find [here](https://grafana.com/orgs/osshelp).

# How to use

## Netdata setup

Follow [these instructions](https://learn.netdata.cloud/docs/agent/collectors/python.d.plugin/phpfpm) to setup PHP-FPM monitoring in Netdata.

## Prometheus setup

Please note that you need [Netdata as an exporter for metrics](https://learn.netdata.cloud/docs/agent/backends/prometheus). Plus, these labels are mandatory:

* job
* env
* instance
* group
* source

In your prometheus.yml it should look like this:

```yaml
- job_name: netdata
  metrics_path: /api/v1/allmetrics?format=prometheus_all_hosts&source=raw
  relabel_configs:
  - source_labels: [__address__]
    regex: ^(.+)\.\w+:\d+
    target_label: instance
    action: replace
  static_configs:
  - targets: [netdata.hostname.here:19999]
    labels:
      env: production
      group: applications
      source: newproject
```

**WARNING**: Without these labels, this dashboard won't be fully functioning.

## Links

* [Ansible role for PHP-FPM](https://github.com/OSSHelp/ansible-phpfpm)
* [Ansible role for Netdata](https://github.com/OSSHelp/ansible-netdata)
* [Docker image with Netdata](https://hub.docker.com/r/osshelp/netdata)

## License

GPL3

## Author

OSSHelp Team, see <https://oss.help>


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS.LXD",
      "label": "prometheus.lxd",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.7.4"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "$$hashKey": "object:228",
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": false,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "matchAny": true,
        "name": "Events",
        "showIn": 0,
        "tags": [
          "deployment",
          "webhook"
        ],
        "type": "tags"
      }
    ]
  },
  "editable": true,
  "gnetId": 13930,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1613769734025,
  "links": [
    {
      "asDropdown": true,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "hot"
      ],
      "targetBlank": true,
      "title": "Hot",
      "type": "dashboards"
    },
    {
      "asDropdown": true,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "software"
      ],
      "title": "Services",
      "type": "dashboards"
    },
    {
      "asDropdown": true,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "system"
      ],
      "title": "Subsystems",
      "type": "dashboards"
    },
    {
      "asDropdown": true,
      "icon": "external link",
      "keepTime": true,
      "tags": [
        "project"
      ],
      "title": "Projects",
      "type": "dashboards"
    },
    {
      "asDropdown": true,
      "icon": "external link",
      "keepTime": true,
      "tags": [
        "alerts"
      ],
      "title": "Alerts",
      "type": "dashboards"
    }
  ],
  "panels": [
    {
      "aliasColors": {
        "max active": "#bf1b00"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "description": "PHP-FPM Active Connections",
      "fill": 8,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 0,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max active",
          "dashes": true,
          "fill": 0,
          "linewidth": 2,
          "stack": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(netdata_phpfpm_connections{env=\"$env\",instance=~\"$host\",source=~\"$source\",chart=~\"phpfpm_($fpmpool).connections\"}) by (dimension)",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "{{dimension}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Connections statuses ($host/$source/$fpmpool)",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "connections",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "max active": "#bf1b00"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "description": "PHP-FPM Requests",
      "fill": 8,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 3,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 0,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max active",
          "dashes": true,
          "fill": 0,
          "linewidth": 2,
          "stack": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(irate(netdata_phpfpm_requests_total{env=\"$env\",instance=~\"$host\",source=~\"$source\",chart=~\"phpfpm_($fpmpool).requests\"}[10m])) by (dimension)",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "{{dimension}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Requests per second ($host/$source/$fpmpool)",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "requests/s",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "max active": "#bf1b00"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "description": "PHP-FPM Performance",
      "fill": 8,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 0,
        "y": 5
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 0,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max active",
          "dashes": true,
          "fill": 0,
          "linewidth": 2,
          "stack": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(irate(netdata_phpfpm_performance{env=\"$env\",instance=~\"$host\",source=~\"$source\",chart=~\"phpfpm_($fpmpool).performance\"}[10m])) by (dimension)",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "{{dimension}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Performance ($host/$source/$fpmpool)",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "status",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "avg": "#0a437c",
        "max": "#052b51",
        "max active": "#bf1b00",
        "min": "#5195ce"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "description": "PHP-FPM Request Duration",
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 12,
        "y": 5
      },
      "hiddenSeries": false,
      "id": 5,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max",
          "fillBelowTo": "min",
          "lines": false
        },
        {
          "alias": "min",
          "lines": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "min(netdata_phpfpm_request_duration{env=\"$env\",instance=~\"$host\",source=~\"$source\",dimension=\"min\",chart=~\"phpfpm_($fpmpool).request_duration\"}) / 1000",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "min",
          "refId": "A"
        },
        {
          "expr": "avg(netdata_phpfpm_request_duration{env=\"$env\",instance=~\"$host\",source=~\"$source\",dimension=\"avg\",chart=~\"phpfpm_($fpmpool).request_duration\"}) / 1000",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "avg",
          "refId": "B"
        },
        {
          "expr": "max(netdata_phpfpm_request_duration{env=\"$env\",instance=~\"$host\",source=~\"$source\",dimension=\"max\",chart=~\"phpfpm_($fpmpool).request_duration\"}) / 1000",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "max",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Requests duration ($host/$source/$fpmpool)",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "ms",
          "label": "duration",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "avg": "#0a437c",
        "max": "#052b51",
        "max active": "#bf1b00",
        "min": "#5195ce"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "description": "PHP-FPM Request CPU usage",
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 0,
        "y": 10
      },
      "hiddenSeries": false,
      "id": 6,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max",
          "fillBelowTo": "min",
          "lines": false
        },
        {
          "alias": "min",
          "lines": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "min(netdata_phpfpm_request_cpu{env=\"$env\",instance=~\"$host\",source=~\"$source\",dimension=\"min\",chart=~\"phpfpm_($fpmpool).request_cpu\"})",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "min",
          "refId": "A"
        },
        {
          "expr": "avg(netdata_phpfpm_request_cpu{env=\"$env\",instance=~\"$host\",source=~\"$source\",dimension=\"avg\",chart=~\"phpfpm_($fpmpool).request_cpu\"})",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "avg",
          "refId": "B"
        },
        {
          "expr": "max(netdata_phpfpm_request_cpu{env=\"$env\",instance=~\"$host\",source=~\"$source\",dimension=\"max\",chart=~\"phpfpm_($fpmpool).request_cpu\"})",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "max",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "CPU usage ($host/$source/$fpmpool)",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "percent",
          "label": "CPU",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "avg": "#0a437c",
        "max": "#052b51",
        "max active": "#bf1b00",
        "min": "#5195ce"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "description": "PHP-FPM Request CPU usage",
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 12,
        "y": 10
      },
      "hiddenSeries": false,
      "id": 7,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max",
          "fillBelowTo": "min",
          "lines": false
        },
        {
          "alias": "min",
          "lines": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "min(netdata_phpfpm_request_mem{env=\"$env\",instance=~\"$host\",source=~\"$source\",dimension=\"min\",chart=~\"phpfpm_($fpmpool).request_mem\"})",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "min",
          "refId": "A"
        },
        {
          "expr": "avg(netdata_phpfpm_request_mem{env=\"$env\",instance=~\"$host\",source=~\"$source\",dimension=\"avg\",chart=~\"phpfpm_($fpmpool).request_mem\"})",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "avg",
          "refId": "B"
        },
        {
          "expr": "max(netdata_phpfpm_request_mem{env=\"$env\",instance=~\"$host\",source=~\"$source\",dimension=\"max\",chart=~\"phpfpm_($fpmpool).request_mem\"})",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "max",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Memory usage ($host/$source/$fpmpool)",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "decbytes",
          "label": "RAM",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "collapsed": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 15
      },
      "id": 9,
      "panels": [],
      "title": "Nginx metrics",
      "type": "row"
    },
    {
      "aliasColors": {
        "max active": "#bf1b00"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "description": "Connections statuses",
      "fill": 8,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 0,
        "y": 16
      },
      "hiddenSeries": false,
      "id": 11,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 0,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max active",
          "dashes": true,
          "fill": 0,
          "linewidth": 2,
          "stack": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(netdata_nginx_connection_status{env=\"$env\",instance=~\"$host\"}) by (dimension)",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "{{dimension}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Nginx connections status ($host)",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "connections",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "max active": "#bf1b00"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "description": "Requests per second",
      "fill": 8,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 12,
        "y": 16
      },
      "hiddenSeries": false,
      "id": 12,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 0,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max active",
          "dashes": true,
          "fill": 0,
          "linewidth": 2,
          "stack": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(irate(netdata_nginx_requests_total{env=\"$env\",instance=~\"$host\"}[10m])) by (dimension)",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "{{dimension}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Nginx requests ($host)",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "requests/s",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "max active": "#bf1b00"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "description": "Connections statuses",
      "fill": 8,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 0,
        "y": 21
      },
      "hiddenSeries": false,
      "id": 13,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 0,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max active",
          "dashes": true,
          "fill": 0,
          "linewidth": 2,
          "stack": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(netdata_nginx_connections{env=\"$env\",instance=~\"$host\"}) by (dimension)",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "{{dimension}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Nginx total connections ($host)",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "connections",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "max active": "#bf1b00"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS.LXD}",
      "description": "Connections handling",
      "fill": 8,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 12,
        "y": 21
      },
      "hiddenSeries": false,
      "id": 14,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 0,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max active",
          "dashes": true,
          "fill": 0,
          "linewidth": 2,
          "stack": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(irate(netdata_nginx_connect_rate_total{env=\"$env\",instance=~\"$host\"}[10m])) by (dimension)",
          "format": "time_series",
          "interval": "$interval",
          "intervalFactor": 1,
          "legendFormat": "{{dimension}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Nginx connections rate ($host)",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "requests/s",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "1m",
  "schemaVersion": 22,
  "style": "dark",
  "tags": [
    "phpfpm",
    "software"
  ],
  "templating": {
    "list": [
      {
        "auto": true,
        "auto_count": 200,
        "auto_min": "15s",
        "current": {
          "selected": false,
          "text": "auto",
          "value": "$__auto_interval_interval"
        },
        "hide": 0,
        "label": "Interval",
        "name": "interval",
        "options": [
          {
            "selected": true,
            "text": "auto",
            "value": "$__auto_interval_interval"
          },
          {
            "selected": false,
            "text": "15s",
            "value": "15s"
          },
          {
            "selected": false,
            "text": "1m",
            "value": "1m"
          },
          {
            "selected": false,
            "text": "5m",
            "value": "5m"
          },
          {
            "selected": false,
            "text": "1h",
            "value": "1h"
          },
          {
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "selected": false,
            "text": "1d",
            "value": "1d"
          }
        ],
        "query": "15s,1m,5m,1h,6h,1d",
        "refresh": 2,
        "skipUrlSync": false,
        "type": "interval"
      },
      {
        "allValue": ".+",
        "current": {},
        "datasource": "${DS_PROMETHEUS.LXD}",
        "definition": "",
        "hide": 0,
        "includeAll": false,
        "index": -1,
        "label": "Environment",
        "multi": false,
        "name": "env",
        "options": [],
        "query": "label_values(up{env=~\".+\"},env)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": ".+",
        "current": {},
        "datasource": "${DS_PROMETHEUS.LXD}",
        "definition": "",
        "hide": 0,
        "includeAll": true,
        "index": -1,
        "label": "Host",
        "multi": true,
        "name": "host",
        "options": [],
        "query": "label_values(netdata_phpfpm_connections{env=~\"$env\"},instance)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "label_values(netdata_phpfpm_connections{env=\"$env\",group=\"$tag\"},instance)",
        "tags": [
          "applications"
        ],
        "tagsQuery": "label_values(netdata_phpfpm_connections{env=\"$env\"},group)",
        "type": "query",
        "useTags": true
      },
      {
        "allValue": ".+",
        "current": {},
        "datasource": "${DS_PROMETHEUS.LXD}",
        "definition": "",
        "hide": 0,
        "includeAll": true,
        "index": -1,
        "label": "Source",
        "multi": true,
        "name": "source",
        "options": [],
        "query": "label_values(netdata_phpfpm_connections{env=\"$env\",instance=~\"$host\",source=~\".+\"},source)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": ".+",
        "current": {},
        "datasource": "${DS_PROMETHEUS.LXD}",
        "definition": "",
        "hide": 0,
        "includeAll": true,
        "index": -1,
        "label": "Pool",
        "multi": true,
        "name": "fpmpool",
        "options": [],
        "query": "label_values(netdata_phpfpm_connections{env=\"$env\",instance=~\"$host\",source=~\"$source\"},chart)",
        "refresh": 2,
        "regex": "/phpfpm_(.+)\\.connections/",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Netdata: PHP-FPM Overview",
  "uid": "p9xLLfzik",
  "variables": {
    "list": []
  },
  "version": 56,
  "description": "Detailed stats for PHP-FPM and Nginx (requests, connections, rates, etc)"
}