Skip to content

Commit

Permalink
add grafana json file
Browse files Browse the repository at this point in the history
  • Loading branch information
wuchang0201 committed Apr 9, 2024
2 parents 3e55182 + fee0d7d commit c184eb4
Show file tree
Hide file tree
Showing 2 changed files with 324 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/docker/Dockerfile.grafana
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ FROM grafana/grafana:latest
COPY --from=node /app/yaml_panel/dist /var/lib/grafana/plugins/antgroup-yaml-panel

# Define the list of plugins to install, separated by spaces.
ARG PLUGINS=""
ARG PLUGINS=""

ARG IFS=','
# Install each plugin.
ARG IFS=','
RUN for plugin in $PLUGINS; do \
grafana-cli plugins install $plugin; \
done
324 changes: 322 additions & 2 deletions deploy/helm/lunettes/templates/grafana/grafana-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,327 @@ data:
"version": 3,
"weekStart": ""
}
nodeyaml.json: |
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 5,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "yesoreyeram-infinity-datasource",
"uid": "c60b6674-0bb4-4104-ad02-fd5855c9dada"
},
"gridPos": {
"h": 22,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"displayModel": "json",
"seriesCountSize": "sm",
"showSeriesCount": false,
"text": "Default value of text input option",
"theme": "idea"
},
"targets": [
{
"columns": [],
"datasource": {
"type": "yesoreyeram-infinity-datasource",
"uid": "c60b6674-0bb4-4104-ad02-fd5855c9dada"
},
"filters": [],
"format": "table",
"global_query_id": "",
"refId": "A",
"root_selector": "",
"source": "url",
"type": "json",
"url": "http://grafanadi.lunettes.svc.cluster.local:8080/showyamls?resource=node&name=$nodeName",
"url_options": {
"data": "",
"method": "GET"
}
}
],
"title": "NodeYaml",
"type": "antgroup-yaml-panel"
}
],
"refresh": "",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"hide": 0,
"label": "nodeName",
"name": "nodeName",
"options": [
{
"selected": true,
"text": "",
"value": ""
}
],
"query": "",
"skipUrlSync": false,
"type": "textbox"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "nodeyaml",
"uid": "nodeyamllinks",
"version": 5,
"weekStart": ""
}
podyaml.json: |
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 4,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "yesoreyeram-infinity-datasource",
"uid": "c60b6674-0bb4-4104-ad02-fd5855c9dada"
},
"gridPos": {
"h": 22,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"displayModel": "json",
"seriesCountSize": "sm",
"showSeriesCount": false,
"text": "Default value of text input option",
"theme": "idea"
},
"targets": [
{
"columns": [],
"datasource": {
"type": "yesoreyeram-infinity-datasource",
"uid": "c60b6674-0bb4-4104-ad02-fd5855c9dada"
},
"filters": [],
"format": "table",
"global_query_id": "",
"refId": "A",
"root_selector": "",
"source": "url",
"type": "json",
"url": "http://grafanadi.lunettes.svc.cluster.local:8080/showyamls?resource=pod&uid=$uid",
"url_options": {
"data": "",
"method": "GET"
}
}
],
"title": "PodYaml",
"type": "antgroup-yaml-panel"
}
],
"refresh": "",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"hide": 0,
"label": "uid",
"name": "uid",
"options": [
{
"selected": true,
"text": "",
"value": ""
}
],
"query": "",
"skipUrlSync": false,
"type": "textbox"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "podyaml",
"uid": "podyamllinks",
"version": 5,
"weekStart": ""
}
rawdata.json: |
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 6,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "yesoreyeram-infinity-datasource",
"uid": "c60b6674-0bb4-4104-ad02-fd5855c9dada"
},
"gridPos": {
"h": 22,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"displayModel": "json",
"seriesCountSize": "sm",
"showSeriesCount": false,
"text": "Default value of text input option",
"theme": "idea"
},
"targets": [
{
"columns": [],
"datasource": {
"type": "yesoreyeram-infinity-datasource",
"uid": "c60b6674-0bb4-4104-ad02-fd5855c9dada"
},
"filters": [],
"format": "table",
"global_query_id": "",
"refId": "A",
"root_selector": "",
"source": "url",
"type": "json",
"url": "http://grafanadi.lunettes.svc.cluster.local:8080/rawdata?plfid=$plfid",
"url_options": {
"data": "",
"method": "GET"
}
}
],
"title": "审计信息",
"type": "antgroup-yaml-panel"
}
],
"refresh": "",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"hide": 0,
"label": "plfid",
"name": "plfid",
"options": [
{
"selected": true,
"text": "",
"value": ""
}
],
"query": "",
"skipUrlSync": false,
"type": "textbox"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "rawdata",
"uid": "rawdatalinks",
"version": 4,
"weekStart": ""
}
---
apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -3812,7 +4132,7 @@ data:
;enable_alpha = false
;app_tls_skip_verify_insecure = false
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
allow_loading_unsigned_plugins = antgroup-yaml-panel
allow_loading_unsigned_plugins = antgroup-yaml-panel,antgroup-customlog-panel
# Enable or disable installing / uninstalling / updating plugins directly from within Grafana.
;plugin_admin_enabled = false
;plugin_admin_external_manage_enabled = false
Expand Down

0 comments on commit c184eb4

Please sign in to comment.