Skip to content

Commit 82eb8a0

Browse files
committed
[FEATURE] Add OpenGemini plugin
This adds support for OpenGemini, a CNCF sandbox project for time-series data storage that is compatible with InfluxDB v1.x APIs. Plugins included: - OpenGeminiDatasource: Datasource plugin for connecting to OpenGemini instances - OpenGeminiTimeSeriesQuery: Time series query plugin using InfluxQL Relates to perses/perses#3716 Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
1 parent bdbd816 commit 82eb8a0

27 files changed

Lines changed: 7807 additions & 1 deletion

opengemini/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
dist/
3+
lib/
4+
*.log
5+
.DS_Store

opengemini/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# OpenGemini Plugin for Perses
2+
3+
This plugin provides OpenGemini datasource and time series query support for [Perses](https://github.com/perses/perses).
4+
5+
## Overview
6+
7+
[OpenGemini](https://github.com/openGemini/openGemini) is a CNCF sandbox project - an open-source distributed time-series database with high concurrency, high performance, and high scalability. It is fully compatible with InfluxDB v1.x Line Protocol, InfluxQL, and read/write APIs.
8+
9+
## Plugins Included
10+
11+
### OpenGeminiDatasource
12+
13+
A datasource plugin for connecting to OpenGemini instances. Supports:
14+
15+
- Direct URL connection
16+
- HTTP Proxy configuration
17+
18+
### OpenGeminiTimeSeriesQuery
19+
20+
A time series query plugin that uses InfluxQL to query data from OpenGemini. Features:
21+
22+
- InfluxQL query support
23+
- Database selection
24+
- Variable substitution
25+
26+
## Installation
27+
28+
1. Build the plugin:
29+
30+
```bash
31+
cd plugins/opengemini
32+
npm install
33+
npm run build
34+
```
35+
36+
2. Copy the built plugin to your Perses plugins directory.
37+
38+
3. Restart Perses to load the plugin.
39+
40+
## Usage
41+
42+
### Creating a Datasource
43+
44+
1. Go to Admin > Global Datasources or Project > Datasources
45+
2. Click "Add Datasource"
46+
3. Select "OpenGeminiDatasource"
47+
4. Configure the URL to your OpenGemini instance (default port: 8086)
48+
49+
### Creating Queries
50+
51+
1. Create or edit a dashboard panel
52+
2. Select "OpenGeminiTimeSeriesQuery" as the query type
53+
3. Enter your database name
54+
4. Write your InfluxQL query
55+
56+
Example query:
57+
58+
```sql
59+
SELECT mean("value") FROM "cpu" WHERE time > now() - 1h GROUP BY time(1m), "host"
60+
```
61+
62+
## License
63+
64+
Apache License 2.0

opengemini/cue.mod/module.cue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module: "github.com/perses/plugins/opengemini@v0"
2+
language: {
3+
version: "v0.15.1"
4+
}
5+
source: {
6+
kind: "git"
7+
}
8+
deps: {
9+
"github.com/perses/perses/cue@v0": {
10+
v: "v0.53.0-rc.0"
11+
default: true
12+
}
13+
"github.com/perses/shared/cue@v0": {
14+
v: "v0.53.0-rc.1"
15+
default: true
16+
}
17+
}

0 commit comments

Comments
 (0)