Introduction¶
In the DSH workflow, maintaining Grafana dashboards typically involves opening a webpage, locating panels, manually editing JSON, and then confirming the publication. This process can easily disrupt context.
dsh-grafana is a plugin for DeepSeek Harness: first, it fetches the dashboard by pasting the dashboard URL or UID, then modifies the JSON through conversation, and finally writes it back via the Grafana HTTP API. It integrates the “fetch dashboard, query data, modify configuration, and push back” steps into DSH’s conversational and approval workflow.
DSH’s philosophy is “everything is a plugin.” The DSH community directory is an independent site with no official affiliation with DeepSeek /幻方.
What This Is¶
dsh-grafana is maintained by guhanfei-ai, licensed under MIT, and is in a pre-1.0 project state.
It addresses the issue where DSH users need to frequently maintain Grafana dashboards: panels, queries, thresholds, template variables, layout, and other contents can be modified through conversation, rather than manually editing JSON each time.
Core Capabilities¶
The following capabilities are all based on verified facts:
- Fetch dashboards via browser URL or UID.
- Request a compact structural summary for large dashboards.
- Search dashboards by title and tags.
- Paste a dashboard or panel-view URL to query real-time data behind panels.
- Copy a dashboard to create a new copy and retrieve the URL of the new dashboard.
- Edit panels, queries, thresholds, variables, and layout through conversation.
- Automatically preserve the folder where the dashboard is located.
- Detect concurrent edits before writing.
- Require native DSH user approval for each write operation.
- Service Account Token is stored in the local DSH credential store.
Installation and Activation¶
First, confirm the environment baseline:
- Node.js:
20.11or higher. - DeepSeek Harness:
0.1.0-rc.6. - Grafana: Grafana 10/11 legacy Dashboard HTTP API.
Grafana 12+ has not yet been included in the certified compatibility scope.
The installation command is as follows:
dsh plugin --profile <profile> add github:guhanfei-ai/dsh-grafana
After executing the above steps, restart the selected DSH profile.
Configuration and Permissions¶
Open in DSH Web:
Settings → Plugins → Grafana dashboard editor
Two items need to be configured:
Service Account Token
Grafana URL
The Service Account Token is used to access Grafana. This token is stored in DSH’s privileged loopback credential store in a write-only manner; the stored value will not be read back or displayed.
The Grafana URL is the absolute base URL of Grafana.
Regular HTTP sends the service-account token in plaintext. When using untrusted networks, HTTPS should be used. If you wish to allow only HTTPS, you can disable insecure HTTP in the plugin configuration:
allowInsecureHttp: false
It is recommended to configure RBAC on the Grafana side with the principle of least privilege:
dashboards:read
dashboards:write
folders:read
datasources:query
Among these, folders:read should cover the folders being edited, and datasources:query also needs to allow access to the actual datasources being queried.
If fine-grained RBAC cannot be used, Grafana’s Editor role is an alternative. Avoid using Admin tokens.
Typical Usage¶
First, fetch the dashboard. For large dashboards, you can request a compact structural summary instead of the full JSON:
grafana_get
summary: true
After the above step, decide which panels, queries, thresholds, variables, or layouts to modify based on the summary.
When querying real-time data behind panels, you can paste the dashboard or panel-view URL. If template variables need to be overridden, you can pass the variables parameter.
Single-value example:
{ "env": "prod" }
Multi-value example:
{ "host": ["www.ttpai.cn", "m.ttpai.cn"] }
After the modification is complete, the write path will require native DSH user approval and detect concurrent edits before writing. The folder will be automatically preserved.
Use Cases and Considerations¶
Suitable for the following scenarios:
- Using DSH to manage Grafana dashboards.
- The Grafana environment is Grafana 10/11, using the legacy Dashboard HTTP API.
- Want to modify dashboard JSON through conversation rather than frequently opening the Grafana page for manual editing.
- Need to integrate dashboard maintenance actions into DSH’s approval and credential management workflow.
Please note:
- The project status is pre-1.0.
- Grafana 12+ has not been certified.
- Each write operation requires DSH user approval.
- Concurrent edits are detected before writing.
- Regular HTTP transmits the service-account token in plaintext; HTTPS should be used on untrusted networks.
- The plugin runs with the current
dshprocess permissions; review the source code and MIT license before installation.
Links¶
- Plugin directory page:
https://www.skillhub.cn/plugins/guhanfei-ai/dsh-grafana - GitHub repository:
https://github.com/guhanfei-ai/dsh-grafana