proxy.golang.org : github.com/clambin/simplejson/v3 : v3.7.0
Package simplejson provides a Go implementation for Grafana's SimpleJSON datasource: https://grafana.com/grafana/plugins/grafana-simple-json-datasource A simplejson server is an HTTP server that supports one or more handlers. Each handler can support multiple targets, each of which can be supported by a timeseries or table query. Optionally tag can be used to alter the behaviour of the query (e.g. filtering what data should be returned). Finally, a handler can support annotation, i.e. a set of timestamps with associated text. To create a SimpleJSON server, create a Server and run it: This starts a server, listening on port 8080, with one target "my-target", served by myHandler. A handler serves incoming requests from Grafana, e.g. queries, requests for annotations or tag. The Handler interface contains all functions a handler needs to implement. It contains only one function (Endpoints). This function returns the Grafana SimpleJSON endpoints that the handler supports. Those can be: Here's an example of a handler that supports timeseries queries: SimpleJSON supports two types of query responses: timeseries responses and table responses. Timeseries queries return values as a list of timestamp/value tuples. Here's an example of a timeseries query handler: Table Queries, on the other hand, return data organized in columns and rows. Each column needs to have the same number of rows: The /annotations endpoint returns Annotations: NOTE: this is only called when using the SimpleJSON datasource. simPod / GrafanaJsonDatasource does not use the /annotations endpoint. Instead, it will call a regular /query and allows to configure its response as annotations instead. The /tag-keys and /tag-values endpoints return supported keys and key values respectively for your data source. A Grafana dashboard can then be confirmed to show those keys and its possible values as a filter. The following sets up a key & key value handler: When the dashboard performs a query with a tag selected, that tag & value will be added in the request's AdHocFilters. simplejson exports two Prometheus metrics for performance analytics: For information on query arguments and tags, refer to the documentation for those data structures.
Registry -
Documentation -
Download -
JSON -
codemeta.json
purl: pkg:golang/github.com/clambin/simplejson/v3@v3.7.0
Published:
Indexed:
- github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40
- github.com/beorn7/perks v1.0.1
- github.com/cespare/xxhash/v2 v2.1.2
- github.com/cheekybits/genny v1.0.0
- github.com/clambin/httpserver v0.3.1
- github.com/davecgh/go-spew v1.1.1
- github.com/golang/protobuf v1.5.2
- github.com/golang/snappy v0.0.3
- github.com/google/flatbuffers v2.0.0+incompatible
- github.com/google/go-cmp v0.5.8
- github.com/gorilla/mux v1.8.0
- github.com/grafana/grafana-plugin-sdk-go v0.141.0
- github.com/json-iterator/go v1.1.12
- github.com/klauspost/compress v1.13.1
- github.com/kr/text v0.2.0
- github.com/mattetti/filebuffer v1.0.1
- github.com/mattn/go-runewidth v0.0.9
- github.com/matttproud/golang_protobuf_extensions v1.0.4
- github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
- github.com/modern-go/reflect2 v1.0.2
- github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e
- github.com/olekukonko/tablewriter v0.0.5
- github.com/pierrec/lz4/v4 v4.1.8
- github.com/pmezard/go-difflib v1.0.0
- github.com/prometheus/client_golang v1.14.0
- github.com/prometheus/client_model v0.3.0
- github.com/prometheus/common v0.37.0
- github.com/prometheus/procfs v0.8.0
- github.com/sirupsen/logrus v1.9.0
- github.com/stretchr/testify v1.8.1
- golang.org/x/sys v0.2.0
- golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
- google.golang.org/protobuf v1.28.1
- gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f
- gopkg.in/yaml.v3 v3.0.1