{{- if .Values.x509_exporter.enabled }}
apiVersion: v1
data:
  x509-dash.json: |-
    {
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": {
              "type": "datasource",
              "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"
          }
        ]
      },
      "description": "Unified dashboard for checking certificates expiration: Kubernetes Secrets, certificate files on nodes, or on any server.",
      "editable": true,
      "fiscalYearStartMonth": 0,
      "gnetId": 13922,
      "graphTooltip": 0,
      "iteration": 1678705600458,
      "links": [],
      "liveNow": false,
      "panels": [
        {
          "collapsed": false,
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "id": 24,
          "panels": [],
          "title": "Overview",
          "type": "row"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "super-light-blue"
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 5,
            "x": 0,
            "y": 1
          },
          "id": 2,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "value"
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "count(x509_cert_not_after)",
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Total Certificates",
          "type": "stat"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "dark-red",
                    "value": 1
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 3,
            "x": 5,
            "y": 1
          },
          "id": 18,
          "options": {
            "colorMode": "background",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "value"
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "sum(((x509_cert_not_after - time()) / 86400) < bool 0)",
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Expired",
          "type": "stat"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 1
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 3,
            "x": 8,
            "y": 1
          },
          "id": 19,
          "options": {
            "colorMode": "background",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "value"
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "sum(0 < ((x509_cert_not_after - time()) / 86400) < bool $critical_threshold)",
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Expiring within $critical_threshold days",
          "type": "stat"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "yellow",
                    "value": 1
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 3,
            "x": 11,
            "y": 1
          },
          "id": 20,
          "options": {
            "colorMode": "background",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "value"
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "sum(0 < ((x509_cert_not_after - time()) / 86400) < bool $warning_threshold)",
              "instant": false,
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Expiring within $warning_threshold days",
          "type": "stat"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "super-light-blue"
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 3,
            "w": 3,
            "x": 14,
            "y": 1
          },
          "id": 17,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "value"
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "count(x509_read_errors)",
              "instant": false,
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Exporters",
          "type": "stat"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 1
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 3,
            "w": 3,
            "x": 14,
            "y": 4
          },
          "id": 36,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "value"
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "sum(x509_read_errors)",
              "instant": false,
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Exporter Errors",
          "type": "stat"
        },
        {
          "collapsed": false,
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 7
          },
          "id": 26,
          "panels": [],
          "title": "Expiration",
          "type": "row"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "description": "Because of a missing feature in Grafana, critical and warning thresholds from dashboard variables will not affect coloration of the Time Left column in this table.\n\nThresholds are to be set manually in the Overrides settings for this widget.\n\nPlease vote or contribute to issue : https://github.com/grafana/grafana/issues/922",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "displayMode": "auto",
                "filterable": true,
                "inspect": false
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "red"
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Time Left"
                },
                "properties": [
                  {
                    "id": "custom.align",
                    "value": "center"
                  },
                  {
                    "id": "custom.width",
                    "value": 200
                  },
                  {
                    "id": "custom.filterable",
                    "value": false
                  },
                  {
                    "id": "custom.displayMode",
                    "value": "color-background"
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "dark-red"
                        },
                        {
                          "color": "red",
                          "value": 0
                        },
                        {
                          "color": "yellow",
                          "value": 7
                        },
                        {
                          "color": "green",
                          "value": 28
                        }
                      ]
                    }
                  },
                  {
                    "id": "unit",
                    "value": "d"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 13,
            "w": 12,
            "x": 0,
            "y": 8
          },
          "id": 46,
          "options": {
            "footer": {
              "fields": "",
              "reducer": [
                "sum"
              ],
              "show": false
            },
            "showHeader": true
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "exemplar": false,
              "expr": "sort(((x509_cert_not_after{secret_name!=\"linkerd-identity-issuer\", issuer_O=\"\", issuer_CN!=\"webhook.linkerd.cluster.local\"} - time()) / 86400) < $list_threshold)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Kubernetes Secrets (no issuer) (time left < $list_threshold days)",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "pattern": "^(subject_CN|secret_namespace|secret_name|Value)$"
                }
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {
                  "Value": 3,
                  "secret_name": 2,
                  "secret_namespace": 1,
                  "subject_CN": 0
                },
                "renameByName": {
                  "Value": "Time Left",
                  "secret_name": "Secret Name",
                  "secret_namespace": "Secret Namespace",
                  "subject_CN": "Subject CN"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "description": "Because of a missing feature in Grafana, critical and warning thresholds from dashboard variables will not affect coloration of the Time Left column in this table.\n\nThresholds are to be set manually in the Overrides settings for this widget.\n\nPlease vote or contribute to issue : https://github.com/grafana/grafana/issues/922",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "align": "auto",
                "displayMode": "auto",
                "filterable": true,
                "inspect": false
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "red",
                    "value": null
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Time Left"
                },
                "properties": [
                  {
                    "id": "custom.align",
                    "value": "center"
                  },
                  {
                    "id": "custom.width",
                    "value": 200
                  },
                  {
                    "id": "custom.filterable",
                    "value": false
                  },
                  {
                    "id": "custom.displayMode",
                    "value": "color-background"
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "dark-red",
                          "value": null
                        },
                        {
                          "color": "red",
                          "value": 0
                        },
                        {
                          "color": "#EAB839",
                          "value": 7
                        },
                        {
                          "color": "green",
                          "value": 28
                        }
                      ]
                    }
                  },
                  {
                    "id": "unit",
                    "value": "d"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 13,
            "w": 12,
            "x": 12,
            "y": 8
          },
          "id": 47,
          "options": {
            "footer": {
              "fields": "",
              "reducer": [
                "sum"
              ],
              "show": false
            },
            "showHeader": true
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "exemplar": false,
              "expr": "sort(((x509_cert_not_after{issuer_O!=\"\"} - time()) / 86400) < $list_threshold)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Kubernetes Secrets (with issuer) (time left < $list_threshold days)",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "pattern": "^(subject_CN|secret_namespace|secret_name|Value)$"
                }
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {
                  "Value": 3,
                  "secret_name": 2,
                  "secret_namespace": 1,
                  "subject_CN": 0
                },
                "renameByName": {
                  "Value": "Time Left",
                  "filepath": "File Path",
                  "instance": "Instance",
                  "subject_CN": "Subject CN"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "collapsed": false,
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 21
          },
          "id": 12,
          "panels": [],
          "title": "Charts",
          "type": "row"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "displayMode": "auto",
                "filterable": false,
                "inspect": false
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Certificate Count"
                },
                "properties": [
                  {
                    "id": "custom.align",
                    "value": "center"
                  },
                  {
                    "id": "custom.width",
                    "value": 150
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 12,
            "w": 8,
            "x": 0,
            "y": 22
          },
          "id": 14,
          "options": {
            "footer": {
              "fields": "",
              "reducer": [
                "sum"
              ],
              "show": false
            },
            "showHeader": true
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "topk(10, sort_desc(count by (issuer_CN) (x509_cert_not_after)))",
              "format": "table",
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Top Issuers",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "issuer_CN",
                    "Value"
                  ]
                }
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {},
                "renameByName": {
                  "Value": "Certificate Count",
                  "issuer_CN": "Issuer CN"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "displayMode": "auto",
                "filterable": false,
                "inspect": false
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Certificate Count"
                },
                "properties": [
                  {
                    "id": "custom.align",
                    "value": "center"
                  },
                  {
                    "id": "custom.width",
                    "value": 150
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 12,
            "w": 8,
            "x": 8,
            "y": 22
          },
          "id": 15,
          "options": {
            "footer": {
              "fields": "",
              "reducer": [
                "sum"
              ],
              "show": false
            },
            "showHeader": true
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "topk(10, sort_desc(count by (secret_namespace) (x509_cert_not_after{secret_namespace!=\"\"})))",
              "format": "table",
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Top Namespaces (Kubernetes Secrets)",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "Value",
                    "secret_namespace"
                  ]
                }
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {},
                "renameByName": {
                  "Value": "Certificate Count",
                  "secret_namespace": "Namespace"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "displayMode": "auto",
                "filterable": false,
                "inspect": false
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Days"
                },
                "properties": [
                  {
                    "id": "custom.align",
                    "value": "center"
                  },
                  {
                    "id": "custom.width",
                    "value": 100
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Secret Namespace"
                },
                "properties": [
                  {
                    "id": "custom.width",
                    "value": 258
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 12,
            "w": 12,
            "x": 0,
            "y": 34
          },
          "id": 31,
          "options": {
            "footer": {
              "fields": "",
              "reducer": [
                "sum"
              ],
              "show": false
            },
            "showHeader": true,
            "sortBy": []
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "bottomk(10, (x509_cert_not_after{secret_name!=\"\"} - x509_cert_not_before) / 86400)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Kubernetes Secrets : Shortest Validity Period",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "pattern": "^(subject_CN|secret_namespace|secret_name|Value)$"
                }
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {
                  "Value": 3,
                  "secret_name": 2,
                  "secret_namespace": 1,
                  "subject_CN": 0
                },
                "renameByName": {
                  "Value": "Days",
                  "secret_name": "Secret Name",
                  "secret_namespace": "Secret Namespace",
                  "subject_CN": "Subject CN"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "displayMode": "auto",
                "filterable": false,
                "inspect": false
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Days"
                },
                "properties": [
                  {
                    "id": "custom.align",
                    "value": "center"
                  },
                  {
                    "id": "custom.width",
                    "value": 100
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 12,
            "w": 12,
            "x": 12,
            "y": 34
          },
          "id": 28,
          "options": {
            "footer": {
              "fields": "",
              "reducer": [
                "sum"
              ],
              "show": false
            },
            "showHeader": true
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "topk(10, (x509_cert_not_after{secret_name!=\"\"} - x509_cert_not_before) / 86400)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Kubernetes Secrets : Longest Validity Period",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "pattern": "^(subject_CN|secret_namespace|secret_name|Value)$"
                }
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {
                  "Value": 3,
                  "secret_name": 2,
                  "secret_namespace": 1,
                  "subject_CN": 0
                },
                "renameByName": {
                  "Value": "Days",
                  "secret_name": "Secret Name",
                  "secret_namespace": "Secret Namespace",
                  "subject_CN": "Subject CN"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "collapsed": false,
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 46
          },
          "id": 35,
          "panels": [],
          "title": "Exporters",
          "type": "row"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 47
          },
          "hiddenSeries": false,
          "id": 38,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.3",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "count(x509_read_errors)",
              "interval": "",
              "legendFormat": "exporters",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Reporting Exporters",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:237",
              "format": "short",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:238",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {
            "exporters with errors": "red"
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 47
          },
          "hiddenSeries": false,
          "id": 39,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.3",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum (x509_read_errors > bool 0)",
              "interval": "",
              "legendFormat": "exporters with errors",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Exporters with Errors",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:237",
              "format": "short",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:238",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {
            "error rate": "red",
            "errors": "red"
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 55
          },
          "hiddenSeries": false,
          "id": 41,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.3",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(rate(x509_read_errors[15m]))",
              "interval": "",
              "legendFormat": "error rate",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Error Rate",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:237",
              "format": "cps",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:238",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {
            "errors": "red"
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 55
          },
          "hiddenSeries": false,
          "id": 40,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.3",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(x509_read_errors)",
              "interval": "",
              "legendFormat": "errors",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Cumulative Errors",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:237",
              "format": "short",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:238",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "displayMode": "auto",
                "filterable": false,
                "inspect": false
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Rate"
                },
                "properties": [
                  {
                    "id": "custom.width",
                    "value": 150
                  },
                  {
                    "id": "custom.align",
                    "value": "center"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 12,
            "w": 12,
            "x": 0,
            "y": 63
          },
          "id": 43,
          "options": {
            "footer": {
              "fields": "",
              "reducer": [
                "sum"
              ],
              "show": false
            },
            "showHeader": true
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "topk(10, rate(x509_read_errors[6h]))",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Top Exporters by Error Rate",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "pattern": "^(instance|Value)$"
                }
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {},
                "renameByName": {
                  "Value": "Rate",
                  "instance": "Instance"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "datasource": {
            "uid": "${DS_PROMETHEUS}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "displayMode": "auto",
                "filterable": false,
                "inspect": false
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Errors"
                },
                "properties": [
                  {
                    "id": "custom.width",
                    "value": 150
                  },
                  {
                    "id": "custom.align",
                    "value": "center"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 12,
            "w": 12,
            "x": 12,
            "y": 63
          },
          "id": 44,
          "options": {
            "footer": {
              "fields": "",
              "reducer": [
                "sum"
              ],
              "show": false
            },
            "showHeader": true
          },
          "pluginVersion": "8.5.3",
          "targets": [
            {
              "expr": "topk(10, x509_read_errors)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "title": "Top Exporters by Cumulative Errors",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "pattern": "^(instance|Value)$"
                }
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {},
                "renameByName": {
                  "Value": "Errors",
                  "instance": "Instance"
                }
              }
            }
          ],
          "type": "table"
        }
      ],
      "refresh": "",
      "schemaVersion": 36,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "current": {
              "selected": false,
              "text": "Prometheus",
              "value": "Prometheus"
            },
            "hide": 0,
            "includeAll": false,
            "label": "Datasource",
            "multi": false,
            "name": "DS_PROMETHEUS",
            "options": [],
            "query": "prometheus",
            "queryValue": "",
            "refresh": 1,
            "regex": "",
            "skipUrlSync": false,
            "type": "datasource"
          },
          {
            "current": {
              "selected": false,
              "text": "7",
              "value": "7"
            },
            "hide": 0,
            "includeAll": false,
            "label": "Critical Threshold (days)",
            "multi": false,
            "name": "critical_threshold",
            "options": [
              {
                "selected": false,
                "text": "1",
                "value": "1"
              },
              {
                "selected": true,
                "text": "7",
                "value": "7"
              },
              {
                "selected": false,
                "text": "14",
                "value": "14"
              },
              {
                "selected": false,
                "text": "15",
                "value": "15"
              },
              {
                "selected": false,
                "text": "28",
                "value": "28"
              },
              {
                "selected": false,
                "text": "30",
                "value": "30"
              },
              {
                "selected": false,
                "text": "60",
                "value": "60"
              },
              {
                "selected": false,
                "text": "90",
                "value": "90"
              },
              {
                "selected": false,
                "text": "180",
                "value": "180"
              },
              {
                "selected": false,
                "text": "365",
                "value": "365"
              }
            ],
            "query": "1,7,14,15,28,30,60,90,180,365",
            "queryValue": "",
            "skipUrlSync": false,
            "type": "custom"
          },
          {
            "current": {
              "selected": false,
              "text": "28",
              "value": "28"
            },
            "hide": 0,
            "includeAll": false,
            "label": "Warning Threshold (days)",
            "multi": false,
            "name": "warning_threshold",
            "options": [
              {
                "selected": false,
                "text": "1",
                "value": "1"
              },
              {
                "selected": false,
                "text": "7",
                "value": "7"
              },
              {
                "selected": false,
                "text": "14",
                "value": "14"
              },
              {
                "selected": false,
                "text": "15",
                "value": "15"
              },
              {
                "selected": true,
                "text": "28",
                "value": "28"
              },
              {
                "selected": false,
                "text": "30",
                "value": "30"
              },
              {
                "selected": false,
                "text": "60",
                "value": "60"
              },
              {
                "selected": false,
                "text": "90",
                "value": "90"
              },
              {
                "selected": false,
                "text": "180",
                "value": "180"
              },
              {
                "selected": false,
                "text": "365",
                "value": "365"
              }
            ],
            "query": "1,7,14,15,28,30,60,90,180,365",
            "queryValue": "",
            "skipUrlSync": false,
            "type": "custom"
          },
          {
            "current": {
              "selected": true,
              "text": "7300",
              "value": "7300"
            },
            "hide": 0,
            "includeAll": false,
            "label": "List expiring in less than (days)",
            "multi": false,
            "name": "list_threshold",
            "options": [
              {
                "selected": false,
                "text": "1",
                "value": "1"
              },
              {
                "selected": false,
                "text": "7",
                "value": "7"
              },
              {
                "selected": false,
                "text": "15",
                "value": "15"
              },
              {
                "selected": false,
                "text": "30",
                "value": "30"
              },
              {
                "selected": false,
                "text": "60",
                "value": "60"
              },
              {
                "selected": false,
                "text": "90",
                "value": "90"
              },
              {
                "selected": false,
                "text": "180",
                "value": "180"
              },
              {
                "selected": false,
                "text": "365",
                "value": "365"
              },
              {
                "selected": false,
                "text": "730",
                "value": "730"
              },
              {
                "selected": false,
                "text": "1095",
                "value": "1095"
              },
              {
                "selected": false,
                "text": "1460",
                "value": "1460"
              },
              {
                "selected": false,
                "text": "1825",
                "value": "1825"
              },
              {
                "selected": false,
                "text": "3650",
                "value": "3650"
              },
              {
                "selected": true,
                "text": "7300",
                "value": "7300"
              }
            ],
            "query": "1,7,15,30,60,90,180,365,730,1095,1460,1825,3650,7300",
            "queryValue": "",
            "skipUrlSync": false,
            "type": "custom"
          }
        ]
      },
      "time": {
        "from": "now-6h",
        "to": "now"
      },
      "timepicker": {},
      "timezone": "",
      "title": "Certificates Expiration (X509 Certificate Exporter)",
      "uid": "lHnsYlPGk",
      "version": 2,
      "weekStart": ""
    }
kind: ConfigMap
metadata:
  creationTimestamp: null
  name: x509-exporter-dashboard
  namespace: prometheus
  labels:
    grafana_dashboard: "1"
{{- end }}
