Skip to content

Error while parsing alert_dashboard from grafana 5.0.0 #372

@GowthamShanmugam

Description

@GowthamShanmugam

grafana 5.0.0 supports backward compatibility, It creates alert_dashboard with json which we are passing. And it gives the same json when we send dashboard API request to grafana. problem with the new version is when someone does save operation in grafana directly in grafana then dashboard json is converted to a new version of json. So the alert dashboard logic in monitoring-integration is affected.

in older json all panels are stored under rows, so the json is like

"rows": [
    {
         "panels": [
              {
                // panel json
              },
          ]
     },
]

so now the new json is changed like,

  1. The row is acted like a list. when we try to list panels from UI and press save then json is like
    image
  "panels": [
    {
          type: "row"
          "panels": [
                {
                    "type": "graph"
                    // panel json
                },
          ]
      },
]
  1. when the same row is not listed and saved then json is changed like
    image
"panels": [
   {
       type: "row',
        "panel": [] 
         .
         .
   },
   {
      // panel json
      "type": "graph"
       .
        .
   },
]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions