{
  "tags": [],
  "title": "Cloud Logs Export Insights",
  "widgets": [
    {
      "layout": {
        "x": 0,
        "y": 0,
        "width": 8,
        "height": 1
      },
      "definition": {
        "type": "note",
        "content": "# Cloud Logs Export Insights\n\nCloud Logs Export Dashboard",
        "tick_pos": "50%",
        "font_size": "14",
        "show_tick": false,
        "tick_edge": "left",
        "text_align": "left",
        "has_padding": true,
        "vertical_align": "top",
        "background_color": "white"
      }
    },
    {
      "layout": {
        "x": 8,
        "y": 0,
        "width": 4,
        "height": 1
      },
      "definition": {
        "type": "query_value",
        "title": "Service Status",
        "requests": [
          {
            "queries": [
              {
                "name": "query1",
                "query": "sum:grafanacloud_logs_instance_cloud_logs_export_status{*}",
                "aggregator": "last",
                "data_source": "metrics"
              }
            ],
            "formulas": [
              {
                "formula": "query1"
              }
            ],
            "response_format": "scalar"
          }
        ],
        "autoscale": true,
        "precision": 2,
        "text_align": "center",
        "timeseries_background": {
          "type": "area"
        }
      }
    },
    {
      "layout": {
        "x": 0,
        "y": 1,
        "width": 6,
        "height": 1
      },
      "definition": {
        "type": "query_value",
        "title": "Timestamp of last synced file (UTC)",
        "requests": [
          {
            "queries": [
              {
                "name": "query1",
                "query": "avg:grafanacloud_logs_instance_cloud_logs_export_last_synced_file_timestamp{*}",
                "aggregator": "last",
                "data_source": "metrics"
              }
            ],
            "formulas": [
              {
                "formula": "query1 * 1000"
              }
            ],
            "response_format": "scalar"
          }
        ],
        "autoscale": true,
        "precision": 2,
        "text_align": "center",
        "timeseries_background": {
          "type": "area"
        }
      }
    },
    {
      "layout": {
        "x": 6,
        "y": 1,
        "width": 3,
        "height": 1
      },
      "definition": {
        "type": "note",
        "content": "**Age of last synced file**\n\nUnsupported panel (stat)\n\n- `time() - metric` cannot be expressed in Datadog formulas (no time() function) and there is no native age/uptime metric for this Grafana Cloud export timestamp\n\nOriginal PromQL:\n```\nA: time() - grafanacloud_logs_instance_cloud_logs_export_last_synced_file_timestamp\n```",
        "tick_pos": "50%",
        "font_size": "14",
        "show_tick": false,
        "tick_edge": "left",
        "text_align": "left",
        "has_padding": true,
        "vertical_align": "top",
        "background_color": "white"
      }
    },
    {
      "layout": {
        "x": 9,
        "y": 1,
        "width": 3,
        "height": 1
      },
      "definition": {
        "type": "query_value",
        "title": "Logs data copied in selected period",
        "requests": [
          {
            "queries": [
              {
                "name": "query1",
                "query": "sum:grafanacloud_logs_instance_cloud_logs_export_exported_bytes.count{*}.as_count()",
                "aggregator": "sum",
                "data_source": "metrics"
              }
            ],
            "formulas": [
              {
                "formula": "query1"
              }
            ],
            "response_format": "scalar"
          }
        ],
        "autoscale": true,
        "precision": 2,
        "text_align": "center",
        "custom_unit": "B"
      }
    },
    {
      "layout": {
        "x": 0,
        "y": 2,
        "width": 12,
        "height": 2
      },
      "definition": {
        "type": "group",
        "title": "Exported data",
        "widgets": [
          {
            "layout": {
              "x": 0,
              "y": 0,
              "width": 4,
              "height": 2
            },
            "definition": {
              "type": "query_value",
              "title": "Logs data exported in last 24h",
              "requests": [
                {
                  "queries": [
                    {
                      "name": "query1",
                      "query": "sum:grafanacloud_logs_instance_cloud_logs_export_exported_bytes.count{*}.as_count()",
                      "aggregator": "sum",
                      "data_source": "metrics"
                    }
                  ],
                  "formulas": [
                    {
                      "formula": "query1"
                    }
                  ],
                  "response_format": "scalar"
                }
              ],
              "autoscale": true,
              "precision": 2,
              "text_align": "center",
              "custom_unit": "B"
            }
          },
          {
            "layout": {
              "x": 4,
              "y": 0,
              "width": 4,
              "height": 2
            },
            "definition": {
              "type": "query_value",
              "title": "Logs data exported in last 7d",
              "requests": [
                {
                  "queries": [
                    {
                      "name": "query1",
                      "query": "sum:grafanacloud_logs_instance_cloud_logs_export_exported_bytes.count{*}.as_count()",
                      "aggregator": "sum",
                      "data_source": "metrics"
                    }
                  ],
                  "formulas": [
                    {
                      "formula": "query1"
                    }
                  ],
                  "response_format": "scalar"
                }
              ],
              "autoscale": true,
              "precision": 2,
              "text_align": "center",
              "custom_unit": "B"
            }
          },
          {
            "layout": {
              "x": 8,
              "y": 0,
              "width": 4,
              "height": 2
            },
            "definition": {
              "type": "query_value",
              "title": "Logs data exported in last 30d",
              "requests": [
                {
                  "queries": [
                    {
                      "name": "query1",
                      "query": "sum:grafanacloud_logs_instance_cloud_logs_export_exported_bytes.count{*}.as_count()",
                      "aggregator": "sum",
                      "data_source": "metrics"
                    }
                  ],
                  "formulas": [
                    {
                      "formula": "query1"
                    }
                  ],
                  "response_format": "scalar"
                }
              ],
              "autoscale": true,
              "precision": 2,
              "text_align": "center",
              "custom_unit": "B"
            }
          }
        ],
        "show_title": true,
        "layout_type": "ordered"
      }
    }
  ],
  "description": "Converted from Grafana dashboard https://grafana.com/grafana/dashboards/19800 (by Grafana Labs). Cloud logs export insights",
  "layout_type": "ordered",
  "reflow_type": "fixed",
  "template_variables": []
}