Skip to content

Commit

Permalink
migrate cloudfoundry dashboards from piechart grafana plugin to embed…
Browse files Browse the repository at this point in the history
… chart widget
  • Loading branch information
psycofdj authored and benjaminguttmann-avtq committed Mar 10, 2023
1 parent 931415c commit 21428a7
Show file tree
Hide file tree
Showing 12 changed files with 1,736 additions and 1,093 deletions.
Empty file modified .gitattributes
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ tmp
*~
*#
#*
*.gz
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is a [BOSH](http://bosh.io/) release for [Prometheus](https://prometheus.io

It includes the following [prometheus exporters](https://prometheus.io/docs/instrumenting/exporters/): [Blackbox](https://github.com/prometheus/blackbox_exporter), [BOSH](https://github.com/bosh-prometheus/bosh_exporter), [BOSH TSDB](https://github.com/bosh-prometheus/bosh_tsdb_exporter), [cAdvisor](https://github.com/google/cadvisor), [Cloud Foundry](https://github.com/bosh-prometheus/cf_exporter), [Cloud Foundry Firehose](https://github.com/bosh-prometheus/firehose_exporter), [Collectd](https://github.com/prometheus/collectd_exporter), [Consul](https://github.com/prometheus/consul_exporter), [Credhub](https://github.com/orange-cloudfoundry/credhub_exporter), [Elasticsearch](https://github.com/justwatchcom/elasticsearch_exporter), [Graphite](https://github.com/prometheus/graphite_exporter), [HAProxy](https://github.com/prometheus/haproxy_exporter), [InfluxDB](https://github.com/prometheus/influxdb_exporter), [Kubernetes](https://github.com/kubernetes/kube-state-metrics), [Memcached](https://github.com/prometheus/memcached_exporter), [MongoDB](https://github.com/dcu/mongodb_exporter), [MySQL](https://github.com/prometheus/mysqld_exporter), [NATS](https://github.com/lovoo/nats_exporter), [PostgreSQL](https://github.com/wrouesnel/postgres_exporter), [PushGateway](https://github.com/prometheus/pushgateway), [RabbitMQ](https://github.com/kbudde/rabbitmq_exporter), [Redis](https://github.com/oliver006/redis_exporter), [Shield](https://github.com/bosh-prometheus/shield_exporter), [Stackdriver](https://github.com/frodenas/stackdriver_exporter), [Statsd](https://github.com/prometheus/statsd_exporter), [Vault](https://github.com/grapeshot/vault_exporter).

It includes the following [grafana panels](https://grafana.com/grafana/plugins): [clock](https://grafana.com/grafana/plugins/grafana-clock-panel), [diagram](https://grafana.com/grafana/plugins/jdbranham-diagram-panel), [histogram](https://grafana.com/grafana/plugins/mtanda-histogram-panel), [piechart](https://grafana.com/grafana/plugins/grafana-piechart-panel), [status](https://grafana.com/grafana/plugins/vonage-status-panel), [statusmap](https://grafana.com/grafana/plugins/flant-statusmap-panel), [worldmap](https://grafana.com/grafana/plugins/grafana-worldmap-panel).
It includes the following [grafana panels](https://grafana.com/grafana/plugins): [clock](https://grafana.com/grafana/plugins/grafana-clock-panel), [diagram](https://grafana.com/grafana/plugins/jdbranham-diagram-panel), [histogram](https://grafana.com/grafana/plugins/mtanda-histogram-panel), [status](https://grafana.com/grafana/plugins/vonage-status-panel), [statusmap](https://grafana.com/grafana/plugins/flant-statusmap-panel), [worldmap](https://grafana.com/grafana/plugins/grafana-worldmap-panel).

Questions? Pop in our [slack channel](https://cloudfoundry.slack.com/messages/prometheus/)!

Expand Down
4 changes: 0 additions & 4 deletions config/blobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ grafana_plugins/grafana-clock-panel-v1.1.1.zip:
size: 621739
object_id: 9536cd55-c7d9-4f68-56a8-ab4b3f966eba
sha: sha256:4af67283bafe5c6ea2ee3a98c31a4f9fa67325ceea9ad7cfb72a61629a544439
grafana_plugins/grafana-piechart-panel-v1.6.1.zip:
size: 274360
object_id: 1b54b9da-4c31-45af-50d5-2c94c1ced745
sha: sha256:eb82bf79fa012ae045a7c270efd85374cc93bab4d9b0bd2a7e03c37145b3da38
grafana_plugins/grafana-worldmap-panel-v0.3.2.zip:
size: 2681129
object_id: 48b520b3-8b0a-4b7c-46dd-cd5656914928
Expand Down
226 changes: 152 additions & 74 deletions jobs/bosh_dashboards/templates/bosh_deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,53 @@
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "5.0.4"
"version": "9.3.6"
},
{
"type": "panel",
"id": "grafana-piechart-panel",
"name": "Pie Chart",
"version": "1.2.0"
"id": "piechart",
"name": "Pie chart",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "5.0.0"
"version": "1.0.0"
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"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"
}
]
},
"editable": false,
"gnetId": null,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"iteration": 1523180991549,
"links": [
{
"asDropdown": true,
Expand All @@ -69,88 +78,142 @@
"url": "http://bosh.io/docs"
}
],
"liveNow": false,
"panels": [
{
"aliasColors": {},
"cacheTimeout": null,
"combine": {
"label": "Others",
"threshold": 0
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": []
},
"overrides": []
},
"datasource": "${DS_PROMETHEUS}",
"editable": true,
"error": false,
"fontSize": "80%",
"format": "short",
"gridPos": {
"h": 7,
"h": 12,
"w": 12,
"x": 0,
"y": 0
},
"id": 6,
"interval": null,
"legend": {
"percentage": true,
"show": true,
"sortDesc": false,
"values": true
},
"legendType": "Under graph",
"links": [],
"maxDataPoints": 3,
"nullPointMode": "connected",
"pieType": "pie",
"strokeWidth": 1,
"options": {
"displayLabels": [],
"legend": {
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
"values": [
"percent",
"value"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "count_values(\"release\", bosh_deployment_release_info{environment=~\"$environment\",bosh_name=~\"$bosh_director\",bosh_deployment=~\"$bosh_deployment\"}) by(bosh_release_name, bosh_release_version)",
"intervalFactor": 10,
"legendFormat": "{{ bosh_release_name }}/{{ bosh_release_version }}",
"range": true,
"refId": "A",
"step": 200
}
],
"timeFrom": "1m",
"title": "Releases In Use",
"transparent": true,
"type": "grafana-piechart-panel",
"valueName": "current"
"type": "piechart"
},
{
"aliasColors": {},
"cacheTimeout": null,
"combine": {
"label": "Others",
"threshold": 0
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": []
},
"overrides": []
},
"datasource": "${DS_PROMETHEUS}",
"editable": true,
"error": false,
"fontSize": "80%",
"format": "short",
"gridPos": {
"h": 7,
"w": 12,
"h": 12,
"w": 11,
"x": 12,
"y": 0
},
"id": 5,
"interval": null,
"legend": {
"percentage": true,
"show": true,
"sortDesc": true,
"values": true
},
"legendType": "Under graph",
"links": [],
"maxDataPoints": 3,
"nullPointMode": "connected",
"pieType": "pie",
"strokeWidth": 1,
"options": {
"displayLabels": [],
"legend": {
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
"values": [
"percent",
"value"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "count_values(\"stemcell\", bosh_deployment_stemcell_info{environment=~\"$environment\",bosh_name=~\"$bosh_director\",bosh_deployment=~\"$bosh_deployment\"}) by(bosh_stemcell_name, bosh_stemcell_version)",
"intervalFactor": 10,
"legendFormat": "{{ bosh_stemcell_name }}/{{ bosh_stemcell_version }}",
Expand All @@ -159,78 +222,92 @@
}
],
"timeFrom": "1m",
"timeShift": null,
"title": "Stemcells In Use",
"transparent": true,
"type": "grafana-piechart-panel",
"valueName": "current"
"type": "piechart"
}
],
"refresh": "30s",
"schemaVersion": 16,
"schemaVersion": 37,
"style": "dark",
"tags": [
"bosh"
],
"templating": {
"list": [
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "Environment",
"multi": false,
"name": "environment",
"options": [],
"query": "label_values(bosh_deployment_stemcell_info, environment)",
"query": {
"query": "label_values(bosh_deployment_stemcell_info, environment)",
"refId": "prometheus-environment-Variable-Query"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "Director",
"multi": false,
"name": "bosh_director",
"options": [],
"query": "label_values(bosh_deployment_stemcell_info{environment=~\"$environment\"}, bosh_name)",
"query": {
"query": "label_values(bosh_deployment_stemcell_info{environment=~\"$environment\"}, bosh_name)",
"refId": "prometheus-bosh_director-Variable-Query"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"definition": "",
"hide": 0,
"includeAll": true,
"label": "Deployment",
"multi": false,
"name": "bosh_deployment",
"options": [],
"query": "label_values(bosh_deployment_stemcell_info{environment=~\"$environment\",bosh_name=~\"$bosh_director\"}, bosh_deployment)",
"query": {
"query": "label_values(bosh_deployment_stemcell_info{environment=~\"$environment\",bosh_name=~\"$bosh_director\"}, bosh_deployment)",
"refId": "prometheus-bosh_deployment-Variable-Query"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": null,
"tags": [],
"tagsQuery": null,
"type": "query",
"useTags": false
}
Expand Down Expand Up @@ -268,5 +345,6 @@
"timezone": "browser",
"title": "BOSH: Deployments",
"uid": "bosh_deployments",
"version": 1
"version": 2,
"weekStart": ""
}
Loading

0 comments on commit 21428a7

Please sign in to comment.