Skip to content

Commit

Permalink
Fix up deployment a bit more, build a grafana dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
isugimpy committed Apr 2, 2022
1 parent ec4d05c commit 8534349
Show file tree
Hide file tree
Showing 2 changed files with 301 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
spec:
containers:
- name: kubent-exporter
image: ghcr.io/isugimpy/kubent_exporter:0.0.4
image: ghcr.io/isugimpy/kubent_exporter:0.0.5
ports:
- containerPort: 8000
name: exporterport
Expand Down
300 changes: 300 additions & 0 deletions grafana/dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": null,
"graphTooltip": 0,
"id": 83,
"iteration": 1648918759966,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": null,
"description": "A list of how many objects are on deprecated API versions cluster-wide",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.3",
"targets": [
{
"exemplar": true,
"expr": "count(kubent_deprecated_objects > 0)",
"format": "time_series",
"instant": false,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Deprecated Objects",
"type": "stat"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"filterable": false
},
"mappings": [
{
"options": {
"pattern": "^\\{exported_namespace=\"(.*)\"\\}$",
"result": {
"index": 0,
"text": "$1"
}
},
"type": "regex"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 0
},
"id": 4,
"options": {
"frameIndex": 0,
"showHeader": true
},
"pluginVersion": "8.2.3",
"targets": [
{
"exemplar": true,
"expr": "count by (exported_namespace) (kubent_deprecated_objects > 0)",
"format": "time_series",
"instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Objects By Namespace",
"transformations": [
{
"id": "seriesToRows",
"options": {}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true
},
"indexByName": {},
"renameByName": {
"Metric": "Namespace"
}
}
}
],
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 16,
"w": 24,
"x": 0,
"y": 9
},
"id": 6,
"options": {
"frameIndex": 1,
"showHeader": true
},
"pluginVersion": "8.2.3",
"targets": [
{
"exemplar": true,
"expr": "kubent_deprecated_objects{exported_namespace=\"$Namespace\"}",
"instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Deprecated Objects",
"transformations": [
{
"id": "labelsToFields",
"options": {}
},
{
"id": "merge",
"options": {}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"Value": true,
"container": true,
"endpoint": true,
"instance": true,
"job": true,
"namespace": true,
"pod": true
},
"indexByName": {},
"renameByName": {}
}
}
],
"type": "table"
}
],
"schemaVersion": 31,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": null,
"current": {
"selected": true,
"text": "monitoring",
"value": "monitoring"
},
"datasource": null,
"definition": "label_values(kubent_deprecated_objects, exported_namespace)",
"description": null,
"error": null,
"hide": 0,
"includeAll": false,
"label": null,
"multi": false,
"name": "Namespace",
"options": [],
"query": {
"query": "label_values(kubent_deprecated_objects, exported_namespace)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Kubent",
"uid": "OgFsKUy7k",
"version": 3
}

0 comments on commit 8534349

Please sign in to comment.