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

set “gridPos” failed #221

Open
triplewz opened this issue Jan 3, 2023 · 1 comment
Open

set “gridPos” failed #221

triplewz opened this issue Jan 3, 2023 · 1 comment

Comments

@triplewz
Copy link

triplewz commented Jan 3, 2023

Hello, I was trying to set panel with the parameters, but the final panel was not expected because the parameter “gridPos” doesn't work.
The params are as follows:

{
  "colorValue": true,
  "colors": [
    "rgba(50, 172, 45, 0.97)",
    "rgba(237, 129, 40, 0.89)",
    "rgba(245, 54, 54, 0.9)"
  ],
  "datasource": "Prometheus",
  "decimals": 2,
  "editable": true,
  "format": "percent",
  "gauge": {
    "maxValue": 100,
    "minValue": 0,
    "show": true,
    "thresholdLabels": false,
    "thresholdMarkers": true
  },
  "gridPos": {
    "x": 0,
    "y": 0,
    "w": 12,
    "h": 5
  },
  "height": "180px",
  "isNew": true,
  "mappingType": 1,
  "mappingTypes": [
    {
      "name": "value to text",
      "value": 1,
      "$$hashKey": "object:81"
    },
    {
      "name": "range to text",
      "value": 2,
      "$$hashKey": "object:82"
    }
  ],
  "maxDataPoints": 100,
  "nullPointMode": "connected",
  "postfixFontSize": "50%",
  "prefixFontSize": "50%",
  "rangeMaps": [
    {
      "from": "null",
      "text": "N/A",
      "to": "null"
    }
  ],
  "sparkline": {
    "fillColor": "rgba(31, 118, 189, 0.18)",
    "lineColor": "rgb(31, 120, 193)"
  },
  "targets": [
    {
      "expr": "sum(rate(container_cpu_usage_seconds_total{}[$__rate_interval])) by(pod) /(sum(container_spec_cpu_quota{}) by(pod) /100000) * 100",
      "format": "time_series",
      "interval": "10s",
      "intervalFactor": 1,
      "refId": "A",
      "step": 10
    }
  ],
  "thresholds": "65, 90",
  "title": "CPU Utilization",
  "type": "singlestat",
  "valueFontSize": "80%",
  "valueMaps": [
    {
      "op": "=",
      "text": "0",
      "value": "null",
      "$$hashKey": "object:84"
    }
  ],
  "valueName": "current",
  "fieldConfig": {
    "defaults": {},
    "overrides": []
  },
  "links": [],
  "colorBackground": false,
  "error": false,
  "postfix": "",
  "prefix": "",
  "interval": null,
  "cacheTimeout": null,
  "nullText": null,
  "tableColumn": ""
}

The width was expected to 12, but the result was 8.
image

@triplewz
Copy link
Author

triplewz commented Jan 3, 2023

So what's wrong with it? Thanks.

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

1 participant