~jae/neos-metrics-exporter

a73e255bcf28815126c09f27e56cc33134930f33 — Jae Salokettu (J4) 7 months ago eee2b26 beep
README: add sample Grafana panel
1 files changed, 112 insertions(+), 0 deletions(-)

M README.md
M README.md => README.md +112 -0
@@ 49,3 49,115 @@ scrape_configs:
    static_configs:
      - targets: ['nme:3001']
```

An example of Grafana panel displaying player count per-session:

![Screenshot of Grafana showing user attendance for neosvr headless sessions.](https://sharex.777.tf/ShareX/2023/07/firefox_mxSAAWcLxW.png)

```json
{
  "datasource": {
    "type": "prometheus",
    "uid": "efbaf15f-f925-4085-90ec-1f89f671015a"
  },
  "fieldConfig": {
    "defaults": {
      "custom": {
        "drawStyle": "line",
        "lineInterpolation": "linear",
        "barAlignment": 0,
        "lineWidth": 1,
        "fillOpacity": 0,
        "gradientMode": "none",
        "spanNulls": false,
        "showPoints": "auto",
        "pointSize": 5,
        "stacking": {
          "mode": "none",
          "group": "A"
        },
        "axisPlacement": "auto",
        "axisLabel": "",
        "axisColorMode": "text",
        "scaleDistribution": {
          "type": "linear"
        },
        "axisCenteredZero": false,
        "hideFrom": {
          "tooltip": false,
          "viz": false,
          "legend": false
        },
        "thresholdsStyle": {
          "mode": "off"
        }
      },
      "color": {
        "mode": "palette-classic"
      },
      "mappings": [],
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          },
          {
            "color": "red",
            "value": 80
          }
        ]
      }
    },
    "overrides": []
  },
  "gridPos": {
    "h": 13,
    "w": 12,
    "x": 12,
    "y": 5
  },
  "id": 264,
  "options": {
    "tooltip": {
      "mode": "single",
      "sort": "none"
    },
    "legend": {
      "showLegend": true,
      "displayMode": "list",
      "placement": "bottom",
      "calcs": []
    }
  },
  "targets": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "efbaf15f-f925-4085-90ec-1f89f671015a"
      },
      "editorMode": "builder",
      "exemplar": false,
      "expr": "player_count{label!=\"total\"}",
      "legendFormat": "{{label}}",
      "range": true,
      "refId": "A"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "efbaf15f-f925-4085-90ec-1f89f671015a"
      },
      "editorMode": "code",
      "expr": "sum(player_count{label=\"total\"})",
      "hide": false,
      "legendFormat": "Total",
      "range": true,
      "refId": "B"
    }
  ],
  "title": "Player Count",
  "type": "timeseries"
}
```
\ No newline at end of file