Grafana dashboard: Dashboard Ambipar
Description: Tablero de control con indicadores de operación de trailers.


{
  "__inputs": [
    {
      "name": "DS_VPTELEMETRIC",
      "label": "vptelemetric",
      "description": "",
      "type": "datasource",
      "pluginId": "mysql",
      "pluginName": "MySQL"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.2.2"
    },
    {
      "type": "panel",
      "id": "grafana-clock-panel",
      "name": "Clock",
      "version": "2.1.0"
    },
    {
      "type": "datasource",
      "id": "mysql",
      "name": "MySQL",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      },
      {
        "datasource": {
          "type": "mysql",
          "uid": "${DS_VPTELEMETRIC}"
        },
        "enable": true,
        "iconColor": "red",
        "name": "Anotaciones"
      }
    ]
  },
  "description": "Tablero de control con indicadores de operación de trailers.",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": true,
  "panels": [
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 0,
        "y": 0
      },
      "id": 8,
      "options": {
        "bgColor": "super-light-green",
        "clockType": "12 hour",
        "countdownSettings": {
          "endCountdownTime": "2022-10-27T16:16:29-03:00",
          "endText": "00:00:00"
        },
        "countupSettings": {
          "beginCountupTime": "2022-10-27T16:16:29-03:00",
          "beginText": "00:00:00"
        },
        "dateSettings": {
          "dateFormat": "DD-MM-YYYY",
          "fontSize": "20",
          "fontWeight": "normal",
          "locale": "",
          "showDate": true
        },
        "mode": "time",
        "refresh": "sec",
        "timeSettings": {
          "fontSize": "10",
          "fontWeight": "bold"
        },
        "timezone": "",
        "timezoneSettings": {
          "fontSize": "12px",
          "fontWeight": "normal",
          "showTimezone": false,
          "zoneFormat": "offsetAbbv"
        }
      },
      "pluginVersion": "2.1.0",
      "transparent": true,
      "type": "grafana-clock-panel"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 2,
        "y": 0
      },
      "id": 55,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "<center><img src=\"https://www.vptelemetric.cl/g/trailer1.png\" width=\"182\" height=\"81\"/>\r\n</center>",
        "mode": "markdown"
      },
      "pluginVersion": "9.2.2",
      "type": "text"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 4,
        "y": 0
      },
      "id": 6,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "<center>\r\n<img src=\"https://www.vptelemetric.cl/g/mel1.png\" width=\"242\" height=\"81\"/>\r\n</center>",
        "mode": "html"
      },
      "pluginVersion": "9.2.2",
      "type": "text"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "gridPos": {
        "h": 3,
        "w": 13,
        "x": 6,
        "y": 0
      },
      "id": 2,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "<center>\r\n<img src=\"https://www.vptelemetric.cl/g/logo.png\"width=\"182\" height=\"81\"/>\r\n</center>",
        "mode": "html"
      },
      "pluginVersion": "9.2.2",
      "type": "text"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "description": "",
      "gridPos": {
        "h": 3,
        "w": 5,
        "x": 19,
        "y": 0
      },
      "id": 44,
      "links": [],
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "<center>\n<span>&#9742;</span> <a href=\"https://wa.me/56985282485\">Teléfono: +56 9 8528 2485</a><br>\n<span>&#9993;</span> <a href=\"mailto:contacto@vptelemetric.cl\" target=\"_blank\">contacto@vptelemetric.cl</a>\n</center>\n",
        "mode": "markdown"
      },
      "pluginVersion": "9.2.2",
      "title": "Canales de soporte",
      "type": "text"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "description": "Indicadores medidos:\nTemperatura ambiente, estanque mediante sonda y humedad.",
      "gridPos": {
        "h": 1,
        "w": 6,
        "x": 0,
        "y": 3
      },
      "id": 45,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "",
        "mode": "code"
      },
      "pluginVersion": "9.2.2",
      "title": "Estanque Agua Limpia",
      "type": "text"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "series",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 1,
            "drawStyle": "line",
            "fillOpacity": 4,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "TempC_DS"
            },
            "properties": [
              {
                "id": "custom.fillOpacity",
                "value": 15
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "blue",
                  "mode": "fixed"
                }
              },
              {
                "id": "displayName",
                "value": "T° Ambiente"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "TempC_SHT"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "continuous-greens"
                }
              },
              {
                "id": "displayName",
                "value": "T° Estanque"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 5,
        "w": 13,
        "x": 6,
        "y": 3
      },
      "id": 15,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "desc"
        }
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT TempC_DS, TempC_SHT, received_at FROM ambipar.temperatura where idtrailer = $query0_temp order by received_at desc",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "TempC_DS",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              },
              {
                "parameters": [
                  {
                    "name": "TempC_SHT",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              },
              {
                "parameters": [
                  {
                    "name": "received_at",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "name": "device_id",
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50,
            "whereJsonTree": {
              "children1": {
                "a9a9abbb-0123-4456-b89a-b18423c86f54": {
                  "properties": {
                    "field": "idtrailer",
                    "operator": "equal",
                    "value": [
                      null
                    ],
                    "valueSrc": [
                      "value"
                    ],
                    "valueType": [
                      "text"
                    ]
                  },
                  "type": "rule"
                }
              },
              "id": "9b99a998-89ab-4cde-b012-31841b209652",
              "type": "group"
            }
          },
          "table": "temperatura"
        }
      ],
      "title": "T° Ambiente y Estanque ",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "TempC_DS"
              },
              {
                "destinationType": "number",
                "targetField": "TempC_SHT"
              },
              {
                "destinationType": "time",
                "targetField": "received_at"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 1,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "scheme",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 2,
            "pointSize": 4,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "always",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 50
              },
              {
                "color": "red",
                "value": 70
              }
            ]
          },
          "unit": "%"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 19,
        "y": 3
      },
      "id": 16,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right",
          "showLegend": false
        },
        "timezone": [
          "browser"
        ],
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT Hum_SHT, received_at, device_id FROM ambipar.temperatura WHERE idtrailer = $query0_temp  order by received_at desc",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "Hum_SHT",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              },
              {
                "parameters": [
                  {
                    "name": "received_at",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              },
              {
                "parameters": [
                  {
                    "name": "device_id",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50,
            "whereJsonTree": {
              "children1": {
                "b8a9899a-4567-489a-bcde-f1841b209652": {
                  "properties": {
                    "field": "device_id",
                    "operator": "equal",
                    "value": [
                      "query"
                    ],
                    "valueSrc": [
                      "value"
                    ],
                    "valueType": [
                      "text"
                    ]
                  },
                  "type": "rule"
                }
              },
              "id": "9b99a998-89ab-4cde-b012-31841b209652",
              "type": "group"
            },
            "whereString": "device_id = 'query'"
          },
          "table": "temperatura"
        }
      ],
      "title": "Histórico Humedad",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "Hum_SHT"
              },
              {
                "destinationType": "time",
                "targetField": "received_at"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "green",
            "mode": "fixed"
          },
          "decimals": 1,
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 60
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 2,
        "x": 0,
        "y": 4
      },
      "id": 27,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^TempC_SHT$/",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": false
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT TempC_SHT FROM ambipar.temperatura WHERE idtrailer = $query0_temp order by received_at desc LIMIT 1",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "TempC_SHT",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "temperatura"
        }
      ],
      "title": "T° Estanque",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "TempC_DS"
              },
              {
                "destinationType": "number",
                "targetField": "Hum_SHT"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "blue",
            "mode": "fixed"
          },
          "decimals": 1,
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 60
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 2,
        "x": 2,
        "y": 4
      },
      "id": 13,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^TempC_DS$/",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": false
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT TempC_DS FROM ambipar.temperatura where idtrailer = $query0_temp order by received_at desc LIMIT 1",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "TempC_DS",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "temperatura"
        }
      ],
      "title": "T° Ambiente",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "TempC_DS"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "red",
            "mode": "fixed"
          },
          "decimals": 1,
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 60
              }
            ]
          },
          "unit": "%"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 2,
        "x": 4,
        "y": 4
      },
      "id": 47,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^Hum_SHT$/",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": false
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT Hum_SHT FROM ambipar.temperatura WHERE idtrailer = $query0_temp order by received_at desc LIMIT 1",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "Hum_SHT",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "temperatura"
        }
      ],
      "title": "Humedad",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "Hum_SHT"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "light-green",
            "mode": "continuous-BlPu"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 1,
            "drawStyle": "line",
            "fillOpacity": 20,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "always",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "Lts"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 15,
        "x": 6,
        "y": 8
      },
      "id": 22,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right",
          "showLegend": false
        },
        "timezone": [
          "browser"
        ],
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT Distance, received_at FROM ambipar.nivelagua where idtrailer = $query0_temp order by received_at desc",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "device_id",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              },
              {
                "parameters": [
                  {
                    "name": "Distance",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              },
              {
                "parameters": [
                  {
                    "name": "received_at",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "nivelagua"
        }
      ],
      "title": "Nivel de Agua Limpia",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "string",
                "targetField": "device_id"
              },
              {
                "destinationType": "number",
                "targetField": "Distance"
              },
              {
                "destinationType": "time",
                "targetField": "received_at"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "decimals": 1,
          "mappings": [],
          "noValue": "Sin información",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "orange",
                "value": 80
              },
              {
                "color": "green",
                "value": 300
              }
            ]
          },
          "unit": "litre"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 3,
        "x": 21,
        "y": 8
      },
      "id": 57,
      "options": {
        "displayMode": "gradient",
        "minVizHeight": 10,
        "minVizWidth": 0,
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^Distance$/",
          "values": false
        },
        "showUnfilled": true
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT Distance FROM ambipar.nivelagua WHERE idtrailer = $query0_temp order by received_at desc LIMIT 1",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "Distance",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "nivelagua"
        }
      ],
      "title": "Estanque agua potable",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "Distance"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 0,
        "y": 9
      },
      "id": 40,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": false
        },
        "textMode": "name"
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "$$hashKey": "object:24",
          "aggregation": "Last",
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "decimals": 2,
          "displayAliasType": "Warning / Critical",
          "displayType": "Regular",
          "displayValueWithAlias": "Never",
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT dooropen FROM ambipar.puertas where idtrailer = $query0_temp",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "dooropen",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "puertas",
          "units": "none",
          "valueHandler": "Number Threshold"
        }
      ],
      "title": "Puerta 1",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "dooropen"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 3,
        "y": 9
      },
      "id": 54,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": false
        },
        "textMode": "name"
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "$$hashKey": "object:24",
          "aggregation": "Last",
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "decimals": 2,
          "displayAliasType": "Warning / Critical",
          "displayType": "Regular",
          "displayValueWithAlias": "Never",
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT dooropen FROM ambipar.puertas where idtrailer = $query0_temp",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "dooropen",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "puertas",
          "units": "none",
          "valueHandler": "Number Threshold"
        }
      ],
      "title": "Puerta 2",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "dooropen"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 6,
        "x": 0,
        "y": 12
      },
      "id": 46,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": false
        },
        "textMode": "name"
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "$$hashKey": "object:24",
          "aggregation": "Last",
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "decimals": 2,
          "displayAliasType": "Warning / Critical",
          "displayType": "Regular",
          "displayValueWithAlias": "Never",
          "editorMode": "builder",
          "format": "table",
          "rawSql": "SELECT dooropen FROM ambipar.puertas LIMIT 50 ",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "dooropen",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "puertas",
          "units": "none",
          "valueHandler": "Number Threshold"
        }
      ],
      "title": "Sensor de Humo",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "dooropen"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "description": "Estatus de baterías de los distintos sensores instalados, le unidad de medida es Volts.",
      "gridPos": {
        "h": 1,
        "w": 6,
        "x": 0,
        "y": 15
      },
      "id": 34,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "",
        "mode": "code"
      },
      "pluginVersion": "9.2.2",
      "title": "Estatus de baterías sensores",
      "type": "text"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "light-green",
            "mode": "continuous-GrYlRd"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 1,
            "drawStyle": "line",
            "fillOpacity": 20,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "always",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "Lts"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 15,
        "x": 6,
        "y": 15
      },
      "id": 32,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right",
          "showLegend": false
        },
        "timezone": [
          "browser"
        ],
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT device_id, Distance, received_at FROM ambipar.aguaservida WHERE idtrailer = $query0_temp ",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "device_id",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              },
              {
                "parameters": [
                  {
                    "name": "Distance",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              },
              {
                "parameters": [
                  {
                    "name": "received_at",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "aguaservida"
        }
      ],
      "title": "Nivel de Agua Servida",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "string",
                "targetField": "device_id"
              },
              {
                "destinationType": "number",
                "targetField": "Distance"
              },
              {
                "destinationType": "time",
                "targetField": "received_at"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "decimals": 1,
          "mappings": [],
          "noValue": "Sin información",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "litre"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 3,
        "x": 21,
        "y": 15
      },
      "id": 20,
      "options": {
        "displayMode": "lcd",
        "minVizHeight": 10,
        "minVizWidth": 0,
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^Distance$/",
          "values": false
        },
        "showUnfilled": true
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT Distance FROM ambipar.aguaservida where idtrailer = $query0_temp order by received_at desc LIMIT 1",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "Distance",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "aguaservida"
        }
      ],
      "title": "Nivel estanque agua servida",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "Distance"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2,
          "mappings": [],
          "max": 3.5,
          "min": 1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "orange",
                "value": 0.5
              },
              {
                "color": "yellow",
                "value": 1.5
              },
              {
                "color": "green",
                "value": 2
              }
            ]
          },
          "unit": "volt"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 2,
        "x": 0,
        "y": 16
      },
      "id": 23,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^BatV$/",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT BatV FROM ambipar.temperatura WHERE idtrailer = $query0_temp order by received_at desc LIMIT 1",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "BatV",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "temperatura"
        }
      ],
      "title": "Temperatura",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "BatV"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2,
          "mappings": [],
          "max": 3.2,
          "min": 1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "orange",
                "value": 0.5
              },
              {
                "color": "#EAB839",
                "value": 1.5
              },
              {
                "color": "green",
                "value": 2
              }
            ]
          },
          "unit": "volt"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 2,
        "x": 2,
        "y": 16
      },
      "id": 50,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^Bat$/",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT Bat FROM ambipar.nivelagua WHERE idtrailer = $query0_temp order by received_at desc LIMIT 1",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "Bat",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "nivelagua"
        }
      ],
      "title": "Agua Limpia",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "number",
                "targetField": "Bat"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 1,
          "mappings": [],
          "max": 3.5,
          "min": 1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 0.5
              },
              {
                "color": "yellow",
                "value": 1.5
              },
              {
                "color": "green",
                "value": 2
              }
            ]
          },
          "unit": "Volts"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 2,
        "x": 4,
        "y": 16
      },
      "id": 52,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^Bat$/",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.2.2",
      "targets": [
        {
          "dataset": "ambipar",
          "datasource": {
            "type": "mysql",
            "uid": "${DS_VPTELEMETRIC}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT Bat FROM ambipar.aguaservida where idtrailer = $query0_temp order by received_at desc LIMIT 1",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "Bat",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          },
          "table": "aguaservida"
        }
      ],
      "title": "Agua Servidas",
      "transformations": [
        {
          "id": "convertFieldType",
          "options": {
            "conversions": [
              {
                "destinationType": "string",
                "targetField": "Bat"
              }
            ],
            "fields": {}
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "mysql",
        "uid": "${DS_VPTELEMETRIC}"
      },
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 0,
        "y": 18
      },
      "id": 4,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "<center><img src=\"https://www.vptelemetric.cl/g/vp3.png\"/>\r\n</center>",
        "mode": "markdown"
      },
      "pluginVersion": "9.2.2",
      "type": "text"
    }
  ],
  "refresh": false,
  "schemaVersion": 37,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "mysql",
          "uid": "${DS_VPTELEMETRIC}"
        },
        "definition": "SELECT\n idtrailer\nFROM\n  ambipar.temperatura",
        "hide": 0,
        "includeAll": true,
        "label": "Seleccione Trailer a visualizar:",
        "multi": false,
        "name": "query0_temp",
        "options": [],
        "query": "SELECT\n idtrailer\nFROM\n  ambipar.temperatura",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "hidden": false
  },
  "timezone": "browser",
  "title": "Dashboard Ambipar",
  "uid": "mfs9w2HVk",
  "version": 78,
  "weekStart": "monday",
  "gnetId": 17316
}