Skip to content

Commit

Permalink
Merge pull request #3 from perses/antoinethebaud/setup
Browse files Browse the repository at this point in the history
Bump perses to latest version + Feed readonly instance
  • Loading branch information
AntoineThebaud authored Sep 25, 2023
2 parents e3e5413 + 320bb90 commit 5e7fafa
Show file tree
Hide file tree
Showing 14 changed files with 8,453 additions and 20 deletions.
29 changes: 24 additions & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
version: '3.9'
services:
demo:
image: "docker.io/persesdev/perses:v0.39.0"
image: "docker.io/persesdev/perses:v0.40.0"
ports:
- "5000:8080"
environment:
PERSES_DATABASE_FILE_EXTENSION: "yaml"
PERSES_DATABASE_FILE_EXTENSION: "json"
PERSES_READONLY: true
PERSES_IMPORTANT_DASHBOARDS_0_PROJECT: "perses"
PERSES_IMPORTANT_DASHBOARDS_0_DASHBOARD: "NodeExporterFull"
PERSES_INFORMATION: |-
# Welcome to the Demo instance of Perses!
This public demo instance is here to give you of what Perses looks like,
with some example dashboards & more.
This instance is readonly. If you wish to play with the edit mode,
go to the [Sandbox instance](https://sandbox.perses.dev/) instead.
volumes:
- "./local_db_demo:/perses"
- ./local_db:/perses
restart: unless-stopped
labels:
- "traefik.enable=true"
Expand All @@ -17,12 +27,21 @@ services:
- "traefik.http.routers.demo.tls.certresolver=myresolver"

sandbox:
image: "docker.io/persesdev/perses:v0.39.0"
image: "docker.io/persesdev/perses:v0.40.0"
ports:
- "5001:8080"
environment:
PERSES_DATABASE_FILE_EXTENSION: "yaml"
PERSES_DATABASE_FILE_EXTENSION: "json"
PERSES_READONLY: false
PERSES_INFORMATION: |-
# Welcome to the Sandbox instance of Perses!
This public sandbox instance is here to let you play with Perses.
Create your own projects, dashboards & more!
If you just want to have a showcase of what's possible to create
in Perses, please go to the [Demo instance](https://demo.perses.dev/)
instead.
restart: unless-stopped
labels:
- "traefik.enable=true"
Expand Down
69 changes: 69 additions & 0 deletions local_db/dashboards/Showcase/GaugeChartPanel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"kind": "Dashboard",
"metadata": {
"name": "GaugeChartPanel",
"createdAt": "2022-12-21T00:00:00Z",
"updatedAt": "2023-01-26T17:29:46.991965Z",
"version": 5,
"project": "Showcase"
},
"spec": {
"duration": "6h",
"panels": {
"SingleGauge": {
"kind": "Panel",
"spec": {
"display": {
"name": "Single Gauge",
"description": "Gauge chart with a single gauge"
},
"plugin": {
"kind": "GaugeChart",
"spec": {
"calculation": "mean",
"thresholds": {
"steps": [{
"value": 20
}]
},
"format": {
"unit": "percent"
}
}
},
"queries": [{
"kind": "TimeSeriesQuery",
"spec": {
"plugin": {
"kind": "PrometheusTimeSeriesQuery",
"spec": {
"query": "100 - ((node_memory_MemAvailable_bytes{env=\"demo\", instance=\"demo.do.prometheus.io:9100\"} * 100) / node_memory_MemTotal_bytes{env=\"demo\", instance=\"demo.do.prometheus.io:9100\"})"
}
}
}
}]
}
}
},
"layouts": [{
"kind": "Grid",
"spec": {
"display": {
"title": "Row 1",
"collapse": {
"open": true
}
},
"items": [{
"x": 0,
"y": 0,
"width": 9,
"height": 7,
"content": {
"$ref": "#/spec/panels/SingleGauge"
}
}]
}
}]
}
}
165 changes: 165 additions & 0 deletions local_db/dashboards/Showcase/MarkdownPanel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"kind": "Dashboard",
"metadata": {
"name": "MarkdownPanel",
"createdAt": "2022-12-21T00:00:00Z",
"updatedAt": "2023-01-26T20:03:02.724739Z",
"version": 3,
"project": "Showcase"
},
"spec": {
"duration": "6h",
"panels": {
"Code": {
"kind": "Panel",
"spec": {
"display": {
"name": "Code",
"description": "Markdown code formatting"
},
"plugin": {
"kind": "Markdown",
"spec": {
"text": "`Inline code` with backticks\n\n```\n# code block\nprint '3 backticks or'\nprint 'indent 4 spaces'\n```"
}
}
}
},
"Headings": {
"kind": "Panel",
"spec": {
"display": {
"name": "Headings",
"description": "Markdown headings"
},
"plugin": {
"kind": "Markdown",
"spec": {
"text": "# First header\n\nFirst header\n=========\n\n## Second header\n\nSecond header\n---------\n\n### Third header\n\n#### Fourth header"
}
}
}
},
"Links": {
"kind": "Panel",
"spec": {
"display": {
"name": "Links",
"description": "Markdown links"
},
"plugin": {
"kind": "Markdown",
"spec": {
"text": "\n[Link](http://a.com)\n\n[Link][1]\n\n[1]: http://b.org"
}
}
}
},
"Lists": {
"kind": "Panel",
"spec": {
"display": {
"name": "Lists",
"description": "Markdown lists"
},
"plugin": {
"kind": "Markdown",
"spec": {
"text": "* List\n* List\n* List\n\n- List\n- List\n- List\n\n1. One\n2. Two\n3. Three\n\n1) One\n2) Two\n3) Three"
}
}
}
},
"Tables": {
"kind": "Panel",
"spec": {
"display": {
"name": "Tables",
"description": "Markdown table"
},
"plugin": {
"kind": "Markdown",
"spec": {
"text": "| Name | Data |\n| -- | -- |\n| Row 1 | Hi |\n| Row 2 | Hi |"
}
}
}
},
"Text": {
"kind": "Panel",
"spec": {
"display": {
"name": "Text",
"description": "Markdown text formatting"
},
"plugin": {
"kind": "Markdown",
"spec": {
"text": "Unformatted\n\n*Italic*\n\n_Italic_\n\n**Bold**\n\n__Bold__\n\n> Blockquote\n\n---\n\n***"
}
}
}
}
},
"layouts": [{
"kind": "Grid",
"spec": {
"display": {
"title": "Row 1",
"collapse": {
"open": true
}
},
"items": [{
"x": 0,
"y": 0,
"width": 8,
"height": 10,
"content": {
"$ref": "#/spec/panels/Headings"
}
}, {
"x": 8,
"y": 0,
"width": 8,
"height": 10,
"content": {
"$ref": "#/spec/panels/Text"
}
}, {
"x": 0,
"y": 10,
"width": 8,
"height": 10,
"content": {
"$ref": "#/spec/panels/Code"
}
}, {
"x": 16,
"y": 10,
"width": 8,
"height": 10,
"content": {
"$ref": "#/spec/panels/Tables"
}
}, {
"x": 8,
"y": 10,
"width": 8,
"height": 10,
"content": {
"$ref": "#/spec/panels/Lists"
}
}, {
"x": 16,
"y": 0,
"width": 8,
"height": 10,
"content": {
"$ref": "#/spec/panels/Links"
}
}]
}
}]
}
}
Loading

0 comments on commit 5e7fafa

Please sign in to comment.