Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: Grafana dashboard config for apisix-ingress-controller #691

Closed
Sindweller opened this issue Sep 24, 2021 · 9 comments
Closed

Comments

@Sindweller
Copy link
Contributor

Issue description

I'm working on editing the Grafana Dashboard for apisix-ingress-controller, and I have some questions:

  • I try to increase some metric counters by specify operations. There's still no data in metric apisix_ingress_controller_events_total (Number of events handled by the controller), and apisix_ingress_controller_check_cluster_health_total(Number of cluster health check operations), what actually should I do to increase them?
  • We have many counters in metrics, such as events_total (Number of events handled by the controller), should I set them irate(apisix_ingress_controller_events_total[2m]) to show a status or just show apisix_ingress_controller_events_total as a graph?
  • I currently understand it as we edit crd yaml and kubectl apply -f them to complete the operations of route, upstream and so on through apisix-ingress-controller, so any of these operations will increase the counter, is it correct?

Here are the metrics:

# HELP apisix_ingress_controller_apisix_request_latencies Request latencies with APISIX
# TYPE apisix_ingress_controller_apisix_request_latencies summary
apisix_ingress_controller_apisix_request_latencies_sum{controller_namespace="default",controller_pod="",operation="create"} 3.4001866e+07
apisix_ingress_controller_apisix_request_latencies_count{controller_namespace="default",controller_pod="",operation="create"} 2
apisix_ingress_controller_apisix_request_latencies_sum{controller_namespace="default",controller_pod="",operation="get"} 2.2852734e+07
apisix_ingress_controller_apisix_request_latencies_count{controller_namespace="default",controller_pod="",operation="get"} 6
apisix_ingress_controller_apisix_request_latencies_sum{controller_namespace="default",controller_pod="",operation="getList"} 2.358962e+06
apisix_ingress_controller_apisix_request_latencies_count{controller_namespace="default",controller_pod="",operation="getList"} 1
apisix_ingress_controller_apisix_request_latencies_sum{controller_namespace="default",controller_pod="",operation="getSchema"} 6.8506066e+07
apisix_ingress_controller_apisix_request_latencies_count{controller_namespace="default",controller_pod="",operation="getSchema"} 41
apisix_ingress_controller_apisix_request_latencies_sum{controller_namespace="default",controller_pod="",operation="list"} 2.3190828e+07
apisix_ingress_controller_apisix_request_latencies_count{controller_namespace="default",controller_pod="",operation="list"} 6
apisix_ingress_controller_apisix_request_latencies_sum{controller_namespace="default",controller_pod="",operation="update"} 8.874494e+06
apisix_ingress_controller_apisix_request_latencies_count{controller_namespace="default",controller_pod="",operation="update"} 1
# HELP apisix_ingress_controller_apisix_requests Number of requests to APISIX
# TYPE apisix_ingress_controller_apisix_requests counter
apisix_ingress_controller_apisix_requests{controller_namespace="default",controller_pod="",resource="consumer"} 1
apisix_ingress_controller_apisix_requests{controller_namespace="default",controller_pod="",resource="globalRule"} 1
apisix_ingress_controller_apisix_requests{controller_namespace="default",controller_pod="",resource="route"} 2
apisix_ingress_controller_apisix_requests{controller_namespace="default",controller_pod="",resource="ssl"} 1
apisix_ingress_controller_apisix_requests{controller_namespace="default",controller_pod="",resource="streamRoute"} 1
apisix_ingress_controller_apisix_requests{controller_namespace="default",controller_pod="",resource="upstream"} 3
# HELP apisix_ingress_controller_apisix_status_codes Status codes of requests to APISIX
# TYPE apisix_ingress_controller_apisix_status_codes gauge
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="consumer",status_code="200"} 1
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="globalRule",status_code="200"} 1
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="plugin",status_code="200"} 1
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="route",status_code="200"} 1
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="route",status_code="201"} 1
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="schema",status_code="200"} 41
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="ssl",status_code="200"} 1
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="streamRoute",status_code="200"} 1
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="upstream",status_code="200"} 2
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="upstream",status_code="201"} 1
apisix_ingress_controller_apisix_status_codes{controller_namespace="default",controller_pod="",resource="upstream",status_code="404"} 6
# HELP apisix_ingress_controller_cache_sync_total Number of cache sync operations
# TYPE apisix_ingress_controller_cache_sync_total counter
apisix_ingress_controller_cache_sync_total{controller_namespace="default",controller_pod="",result="success"} 1
# HELP apisix_ingress_controller_is_leader Whether the role of controller instance is leader
# TYPE apisix_ingress_controller_is_leader gauge
apisix_ingress_controller_is_leader{controller_namespace="default",controller_pod=""} 0
# HELP apisix_ingress_controller_sync_operation_total Number of sync operations
# TYPE apisix_ingress_controller_sync_operation_total counter
apisix_ingress_controller_sync_operation_total{controller_namespace="default",controller_pod="",resource="schema",result="success"} 1

And here the grafana dashboard looks like (if needed):
image
image
image

@tokers
Copy link
Contributor

tokers commented Sep 26, 2021

  1. apisix_ingress_controller_events_total, apisix_ingress_controller_check_cluster_health_total

Make sure the stub codes are correct, these metrics should be increased once the informers got changes from Kubernetes API server.

  1. irate(apisix_ingress_controller_events_total[2m])

I prefer ratio .

@Sindweller
Copy link
Contributor Author

Here are the PromQL and basic config for each metric in Grafana Dashboard, please give me some advise:


apisix_ingress_controller_is_leader

  • Description: Whether the role of controller instance is leader
  • PromQL: apisix_ingress_controller_is_leader
  • Visualization: Stat

apisix_ingress_controller_cache_sync_total

  • Description: Cache Sync Operations
  • PromQL: irate(apisix_ingress_controller_cache_sync_total[5m])
  • Visualization: Stat

apisix_ingress_controller_sync_operation_total

  • Description: Sync Operations
  • PromQL: irate(apisix_ingress_controller_sync_operation_total[5m])
  • Visualization: Stat

apisix_ingress_controller_events_total

  • Description: Number of events handled by the controller
  • PromQL: irate(apisix_ingress_controller_events_total[2m])
  • Visualization: Stat

apisix_ingress_controller_check_cluster_health_total

  • Description: Cluster Health Check
  • PromQL: irate(apisix_ingress_controller_check_cluster_health_total[5m])
  • Visualization: stat

apisix_ingress_controller_apisix_requests

  • Description: Total Requests
  • PromQL: apisix_ingress_controller_apisix_requests
  • Visualization: Graph

apisix_ingress_controller_apisix_bad_status_codes

  • Description: Status codes of requests to APISIX
  • PromQL: apisix_ingress_controller_apisix_bad_status_codes
  • Visualization: Graph

apisix_ingress_controller_apisix_request_latencies

  • Description: Request latencies with APISIX
  • PromQL: sum ( rate( apisix_ingress_controller_apisix_request_latencies_sum{}[1m] )) / sum ( rate( apisix_ingress_controller_apisix_request_latencies_count{}[1m] ) )

apisix_ingress_controller_apisix_requests

  • Description: Number of requests to APISIX
  • PromQL: apisix_ingress_controller_apisix_requests
  • Visualization: Graph

The Grafana JSON model:

{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "Prometheus",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "type": "dashboard"
      }
    ]
  },
  "description": "Ingress Controller of Apache APISIX",
  "editable": true,
  "gnetId": 11719,
  "graphTooltip": 0,
  "id": 2,
  "iteration": 1632800063013,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "datasource": "Prometheus",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 10,
      "panels": [],
      "title": "APISIX Ingress controller",
      "type": "row"
    },
    {
      "datasource": null,
      "description": "Whether the role of controller instance is leader",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "from": "",
              "id": 1,
              "text": "Candidate",
              "to": "",
              "type": 1,
              "value": "0"
            },
            {
              "from": "",
              "id": 2,
              "text": "Leader",
              "to": "",
              "type": 1,
              "value": "1"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 8,
        "x": 0,
        "y": 1
      },
      "id": 33,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "apisix_ingress_controller_is_leader",
          "instant": false,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Is Leader",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "Prometheus",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ops"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 8,
        "x": 8,
        "y": 1
      },
      "id": 16,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "irate(apisix_ingress_controller_cache_sync_total[5m])",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Cache Sync Operations",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "Prometheus",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "ops"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 8,
        "x": 16,
        "y": 1
      },
      "id": 11,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "rate(apisix_ingress_controller_sync_operation_total[5m])",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Sync Operations",
      "type": "stat"
    },
    {
      "datasource": null,
      "description": "Number of events handled by the controller",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ops"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 16,
        "x": 0,
        "y": 6
      },
      "id": 35,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "irate(apisix_ingress_controller_events_total[2m])",
          "interval": "",
          "legendFormat": "{{resource}}-{{operation}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Total Events",
      "type": "stat"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 16,
        "y": 6
      },
      "id": 29,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "irate(apisix_ingress_controller_check_cluster_health_total[5m])",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Cluster Health Check",
      "type": "stat"
    },
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 13
      },
      "id": 31,
      "panels": [],
      "title": "Apisix Requests",
      "type": "row"
    },
    {
      "aliasColors": {},
      "bars": false,
      "cacheTimeout": null,
      "dashLength": 10,
      "dashes": false,
      "datasource": "Prometheus",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "unit": "none"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 14
      },
      "hiddenSeries": false,
      "id": 8,
      "interval": null,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "maxDataPoints": 100,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.6",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "exemplar": true,
          "expr": "apisix_ingress_controller_apisix_requests",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Total Requests",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:1442",
          "format": "none",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "$$hashKey": "object:1443",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 20
      },
      "hiddenSeries": false,
      "id": 17,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.6",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "exemplar": true,
          "expr": "apisix_ingress_controller_apisix_bad_status_codes",
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Status Codes",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:567",
          "decimals": null,
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:568",
          "decimals": null,
          "format": "Misc",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 27
      },
      "id": 6,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(apisix_ingress_controller_apisix_bad_status_codes{status_code =~ \"[4-5].*\"}) / sum(apisix_ingress_controller_apisix_requests)",
          "hide": false,
          "interval": "",
          "legendFormat": "average",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Response Error Rate",
      "type": "stat"
    },
    {
      "aliasColors": {},
      "bars": false,
      "cacheTimeout": null,
      "dashLength": 10,
      "dashes": false,
      "datasource": "Prometheus",
      "description": "Request latencies with APISIX",
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 33
      },
      "hiddenSeries": false,
      "id": 2,
      "interval": "",
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.6",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "exemplar": true,
          "expr": "sum (\n  rate(\n      apisix_ingress_controller_apisix_request_latencies_sum{}[1m]\n)) / sum (\n  rate(\n      apisix_ingress_controller_apisix_request_latencies_count{}[1m]\n  )\n)",
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Requests Latencies",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:439",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:440",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "5m",
  "schemaVersion": 27,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": ".*",
        "current": {
          "selected": false,
          "text": "All",
          "value": "$__all"
        },
        "datasource": "Prometheus",
        "definition": "label_values(resource)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "resource",
        "options": [],
        "query": {
          "query": "label_values(resource)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": ".*",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": ".*",
        "current": {
          "selected": false,
          "text": "All",
          "value": "$__all"
        },
        "datasource": "Prometheus",
        "definition": "label_values(operation)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "operation",
        "options": [],
        "query": {
          "query": "label_values(operation)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-30m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Apache APISIX Ingress Controller",
  "version": 18
}

@tokers
Copy link
Contributor

tokers commented Sep 28, 2021

@Sindweller Could you paste some snippets about the Grafana dashboard?

@Sindweller
Copy link
Contributor Author

Could you paste some snippets about the Grafana dashboard?

Do you mean the panel part in json?
This is the apisix_request_latencies metric.
If so, I would paste more.

          {
            "aliasColors":{

            },
            "bars":false,
            "cacheTimeout":null,
            "dashLength":10,
            "dashes":false,
            "datasource":"Prometheus",
            "description":"Request latencies with APISIX",
            "fieldConfig":{
                "defaults":{
                    "unit":"short"
                },
                "overrides":[

                ]
            },
            "fill":1,
            "fillGradient":0,
            "gridPos":{
                "h":6,
                "w":24,
                "x":0,
                "y":27
            },
            "hiddenSeries":false,
            "id":2,
            "interval":"",
            "legend":{
                "avg":false,
                "current":false,
                "max":false,
                "min":false,
                "show":true,
                "total":false,
                "values":false
            },
            "lines":true,
            "linewidth":1,
            "links":[

            ],
            "nullPointMode":"null",
            "options":{
                "alertThreshold":true
            },
            "percentage":false,
            "pluginVersion":"7.5.6",
            "pointradius":2,
            "points":false,
            "renderer":"flot",
            "seriesOverrides":[

            ],
            "spaceLength":10,
            "stack":false,
            "steppedLine":false,
            "targets":[
                {
                    "exemplar":true,
                    "expr":"sum (\n  rate(\n      apisix_ingress_controller_apisix_request_latencies_sum{}[1m]\n)) / sum (\n  rate(\n      apisix_ingress_controller_apisix_request_latencies_count{}[1m]\n  )\n)",
                    "instant":false,
                    "interval":"",
                    "intervalFactor":1,
                    "legendFormat":"average",
                    "refId":"A"
                }
            ],
            "thresholds":[

            ],
            "timeFrom":null,
            "timeRegions":[

            ],
            "timeShift":null,
            "title":"Requests Latencies",
            "tooltip":{
                "shared":true,
                "sort":0,
                "value_type":"individual"
            },
            "type":"graph",
            "xaxis":{
                "buckets":null,
                "mode":"time",
                "name":null,
                "show":true,
                "values":[

                ]
            },
            "yaxes":[
                {
                    "$$hashKey":"object:439",
                    "format":"short",
                    "label":null,
                    "logBase":1,
                    "max":null,
                    "min":null,
                    "show":true
                },
                {
                    "$$hashKey":"object:440",
                    "format":"short",
                    "label":null,
                    "logBase":1,
                    "max":null,
                    "min":null,
                    "show":true
                }
            ],
            "yaxis":{
                "align":false,
                "alignLevel":null
            }
        }

@tokers
Copy link
Contributor

tokers commented Sep 29, 2021

Could you paste some snippets about the Grafana dashboard?

Do you mean the panel part in json?

This is the apisix_request_latencies metric.

If so, I would paste more.


          {

            "aliasColors":{



            },

            "bars":false,

            "cacheTimeout":null,

            "dashLength":10,

            "dashes":false,

            "datasource":"Prometheus",

            "description":"Request latencies with APISIX",

            "fieldConfig":{

                "defaults":{

                    "unit":"short"

                },

                "overrides":[



                ]

            },

            "fill":1,

            "fillGradient":0,

            "gridPos":{

                "h":6,

                "w":24,

                "x":0,

                "y":27

            },

            "hiddenSeries":false,

            "id":2,

            "interval":"",

            "legend":{

                "avg":false,

                "current":false,

                "max":false,

                "min":false,

                "show":true,

                "total":false,

                "values":false

            },

            "lines":true,

            "linewidth":1,

            "links":[



            ],

            "nullPointMode":"null",

            "options":{

                "alertThreshold":true

            },

            "percentage":false,

            "pluginVersion":"7.5.6",

            "pointradius":2,

            "points":false,

            "renderer":"flot",

            "seriesOverrides":[



            ],

            "spaceLength":10,

            "stack":false,

            "steppedLine":false,

            "targets":[

                {

                    "exemplar":true,

                    "expr":"sum (\n  rate(\n      apisix_ingress_controller_apisix_request_latencies_sum{}[1m]\n)) / sum (\n  rate(\n      apisix_ingress_controller_apisix_request_latencies_count{}[1m]\n  )\n)",

                    "instant":false,

                    "interval":"",

                    "intervalFactor":1,

                    "legendFormat":"average",

                    "refId":"A"

                }

            ],

            "thresholds":[



            ],

            "timeFrom":null,

            "timeRegions":[



            ],

            "timeShift":null,

            "title":"Requests Latencies",

            "tooltip":{

                "shared":true,

                "sort":0,

                "value_type":"individual"

            },

            "type":"graph",

            "xaxis":{

                "buckets":null,

                "mode":"time",

                "name":null,

                "show":true,

                "values":[



                ]

            },

            "yaxes":[

                {

                    "$$hashKey":"object:439",

                    "format":"short",

                    "label":null,

                    "logBase":1,

                    "max":null,

                    "min":null,

                    "show":true

                },

                {

                    "$$hashKey":"object:440",

                    "format":"short",

                    "label":null,

                    "logBase":1,

                    "max":null,

                    "min":null,

                    "show":true

                }

            ],

            "yaxis":{

                "align":false,

                "alignLevel":null

            }

        }

I mean the charts rendered from these configurations.

@Sindweller
Copy link
Contributor Author

@tokers get it.
image
image

@gxthrj
Copy link
Contributor

gxthrj commented Sep 29, 2021

Does this issue related to #696 ?

@tokers
Copy link
Contributor

tokers commented Sep 29, 2021

@tokers get it. image image

Great job! Cool!

@Sindweller
Copy link
Contributor Author

should be closed as it's fixed in #670 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants