Compare commits

..

2 Commits

Author SHA1 Message Date
Wesley van Tilburg
7bb1b38c06 datasource: add testing error to make sure its the right place
Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled
2026-01-14 09:12:19 +00:00
Wesley van Tilburg
3711fdd990 fix built for newer versions 2026-01-14 09:11:59 +00:00
3 changed files with 5 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ all: install build test lint
# Install dependencies # Install dependencies
install: install:
# Frontend # Frontend
yarn install --pure-lockfile yarn install
# Backend # Backend
go install -v ./pkg/ go install -v ./pkg/
go install golang.org/x/lint/golint@latest go install golang.org/x/lint/golint@latest

View File

@@ -1,6 +1,6 @@
{ {
"name": "grafana-zabbix", "name": "grafana-zabbix",
"version": "6.1.0", "version": "6.1.1",
"description": "Zabbix plugin for Grafana", "description": "Zabbix plugin for Grafana",
"homepage": "http://grafana-zabbix.org", "homepage": "http://grafana-zabbix.org",
"bugs": { "bugs": {

View File

@@ -22,6 +22,7 @@ import (
var ( var (
ErrNonMetricQueryNotSupported = errors.New("non-metrics queries are not supported") ErrNonMetricQueryNotSupported = errors.New("non-metrics queries are not supported")
test = errors.New("This is a test error")
) )
type ZabbixDatasource struct { type ZabbixDatasource struct {
@@ -147,6 +148,8 @@ func (ds *ZabbixDatasource) QueryData(ctx context.Context, req *backend.QueryDat
frames, queryErr = zabbixDS.queryNumericItems(queryCtx, &query) frames, queryErr = zabbixDS.queryNumericItems(queryCtx, &query)
case MODE_ITEMID: case MODE_ITEMID:
frames, queryErr = zabbixDS.queryItemIdData(queryCtx, &query) frames, queryErr = zabbixDS.queryItemIdData(queryCtx, &query)
case MODE_PROBLEMS:
queryErr = backend.DownstreamError(test) //send a test error
default: default:
queryErr = backend.DownstreamError(ErrNonMetricQueryNotSupported) queryErr = backend.DownstreamError(ErrNonMetricQueryNotSupported)
} }