Skip to content

Commit

Permalink
Adjust frequency of autocomplete requests to improve performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
graefen committed May 5, 2023
1 parent 3a35082 commit 98c5335
Show file tree
Hide file tree
Showing 23 changed files with 923 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.9.28

* Adjusted frequency of autocomplete requests to improve performance.

## 0.9.27

* Added anonymized usage statistics so we can prioritize development time based
Expand Down
Binary file added dist/.DS_Store
Binary file not shown.
152 changes: 152 additions & 0 deletions dist/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
## 0.9.28

* Adjusted frequency of autocomplete requests to improve performance.

## 0.9.27

* Added anonymized usage statistics so we can prioritize development time based
on feature usage.

## 0.9.26

* A new variable query type is available: "Last Metric Value" which will
support text metric values. This allows you to show text metric values in
text panel widgets.

## 0.9.25

* Now when histogram streams are found by Graphite-style searches, their data
is displayed, even on line graphs which aren't set to heatmap rendering.

## 0.9.24

* Eliminates the need for a call to the graphite_translate IRONdb extension
in the alerting backend for Graphite style queries.
* Ensures that all CAQL queries issued via the API /caql endpoint by the
alerting backend contain a #min_period prefix if a min_period value has been
defined for the Grafana query object.
* Adds handling for the possibility of null or non-numeric data values being
returned to the alerting backend by its calls to the API /caql endpoint.

## 0.9.23

* Fix base64 encoding of variable values when used inside other variable
queries.

## 0.9.22

* When substituting CAQL queries inside other CAQL queries, remove directives
from sub-queries.

## 0.9.21

* Now when CAQL warnings are returned, they're thrown as UI errors by default;
there's a datasource configuration setting to hide these errors.

## 0.9.20

* Fix Graphite-style autocomplete results when an empty leaf is returned.

## 0.9.19

* Updates dependencies to latest versions.
* Fixed a bug where the API client used by the datasource could retry on
response errors multiple times, potentially causing a large number of
API requests to be generated.

## 0.9.16

* Fixed a bug where values of zero weren't being plotted from CAQL data.

## 0.9.15

* re-synchronizing package metadata

## 0.9.11

* The alerting backend will now process queries in parallel.
* Update plugin.json to use newer grafanaDependency setting.

## 0.9.10

* Update release build actions.

## 0.9.9

## 0.9.8

* Implements support for graphite type queries in the alerting backend.

## 0.9.7

## 0.9.6

* Corrects an issue caused by grafana not including the URL for the data source
in the configuration JSON.
* Improves the logging performed by the IRONdb alerting back end. Errors
parsing JSON passed to the back end will now log better descriptions of the
problem along with the erroneous JSON.

## 0.9.5

* Fixes the alerting backend so that the min_period value for generated CAQL
queries is correctly using the setting or default from the UI.

## 0.9.4

* Fix labels for untagged metrics

## 0.9.3

* Support histogram transforms for graphs

## 0.9.2

* Expand time range start and end by one interval each
* Fix subsecond queries with interval below 10ms

## 0.9.1

* Support custom rollup resolution
* Support for IRONdb activity tracking
* Add client-side caching of requests
* Upgrade to new Grafana plugin TypeScript SDK
* Use IRONdb /fetch API
* Handle Base64 encoded metrics correctly
* Native histogram support
* Support for custom metric labels and CAQL label interpolation syntax

## 0.9.0

* New version of plugin that is fully IRONdb native without using Graphite APIs.

## 0.8.7

* Use Grafana dropdown control rather than `select` element
* 0.8.7 is the last version of the datasource designed for use with our graphite endpoints and with graphite-centric design

## 0.8.6

* Allow flip back and forth between CAQL mode.
* Allow override of egress of searched datapoints.

## 0.8.5

* Fix graphite series pulls for tagged metrics.

## 0.8.4

* Switch to DF4 from CAQL
* Support CAQL named streams
* Auto-detect histograms in CAQL output, simplify code.
* Improve period selection for CAQL queries.
* Improve histogram coalescing and conversion performance.
* Avoid making blank CAQL queries
* Add dev notes to README.md
* Provider a docker-up script to help development and testing.

## 0.8.3

* Started a changelog.
* Fixed error messages to be more expressive for bad CAQL expressions.
* Pass X-Circonus-Account header in standalone mode.
27 changes: 27 additions & 0 deletions dist/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2018 Circonus, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name Circonus, Inc. nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48 changes: 48 additions & 0 deletions dist/MANIFEST.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

{
"manifestVersion": "2.0.0",
"signatureType": "private",
"signedByOrg": "bradywoods",
"signedByOrgName": "bradywoods",
"rootUrls": [
"http://localhost:3000/"
],
"plugin": "circonus-irondb-datasource",
"version": "0.9.28",
"time": 1683301640455,
"keyId": "7e4d0c6a708866e7",
"files": {
"irondb-backend_linux_arm": "ccb26f767211899a8bd5a2ca3e56348a70de0c62427b386b797146ae9b865600",
".DS_Store": "e8816cbf3bf9ea1ea54722e876471d14bea099ce8068404ef16dfe0777bc628a",
"LICENSE": "e95eddfb7967cc7d6b4a5544ec7584be4a1e4e0fc307a6590714ea9048b228f8",
"CHANGELOG.md": "3a5c08c9a3273089c7af81108dba70b815f16404c64b3bf64283fcf1042b08e2",
"irondb-backend_windows_amd64.exe": "6076d698d6567c7c0e2a106eb622cb552672e8521e36393a38533fa9d256a9dd",
"module.js.LICENSE.txt": "2f09e0191d966f6c003d2f868c0dd5ac488a233af80e50b5152ccbbc8cce7971",
"irondb-backend_linux_arm64": "d2ceb7cad0263f95eb91af63bd7c85ccfbeb33581c855ab1b26c6c4c927e09f4",
"module.js.map": "aeb6f6898f0b7d1390a79adc0588aec9f6f73cd0b8cf63c6264a9da59fdcd9ae",
"irondb-backend_darwin_amd64": "7d117d8219cd6d1771d67030f90a30519a0f6f7e669829b9082ce6559b996cd8",
"plugin.json": "f91064319125475c0b9059d20be26f6eebdbaa5e4f5152e9fd66174b503fb3da",
"README.md": "9f63c4cec866260308cc8986bdd1a3fbe3671fbc6c7ccf6af3a7ab5f03e742f6",
"img/irondb-icons-data-retina-sprite.png": "f42badd24b7d6eb4fce54700982097ffeb6c60dc068130163e7274a9f003e67d",
"img/irondb-logo.svg": "caa948925e637e89086a59bbec9747fe6af53d362753d7ec92c2fcad68c4f32a",
"module.js": "f3a629fb1f4e63e12c9368f3b7dc538d8a6d32c82d3753e7a728e4c8884f2f7b",
"irondb-backend_linux_amd64": "c48581f85beca779b726f1a43cd86798e50c8295a8f90bcf626eac122b7eff26",
"partials/query.editor.html": "a7e0c8dc091804e336f2fcd87741af57f9a5562809f61d1ee7515668638ebf76",
"partials/config.html": "934dbda266cf5042d08eb8b7a3d82c3e3fdc66e8dc1c90d84f5424705682e3ea",
"partials/annotation.editor.html": "df520954a3bd975d6a01c0beac00a03c3581bcad14df7367c16faef774688a9b"
}
}
-----BEGIN PGP SIGNATURE-----
Version: OpenPGP.js v4.10.10
Comment: https://openpgpjs.org

wrgEARMKAAYFAmRVJQgAIQkQfk0ManCIZucWIQTzOyW2kQdOhGNlcPN+TQxq
cIhm51BVAgkBn9P+8rvFlU16WXj1QE3gH5DmEnymQwI9GWFtcqvAKthj5fo8
gZX/Q7a6akLIfIUlySvcphx4qFT04Lm8i3UcQeICCNwqVRyDy1rLFTp3KSWK
Yr+H3ey0/IVewbgdJ5DisnuO7C5ORman+aSykscwtYR4ESncpI1zUcLcJOac
MJxMrvSk
=tpzS
-----END PGP SIGNATURE-----
118 changes: 118 additions & 0 deletions dist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# IRONdb Datasource

This is the plugin for IRONdb 0.17.1 and newer. It is evolving and we continue to track its API.

Read more about IRONdb here:

[https://www.circonus.com/irondb/](https://www.circonus.com/irondb/)

## Installation
* The default location for the plugins directory is `/var/lib/grafana/plugins`, though the location may be different in your installation, see [http://docs.grafana.org/plugins/installation/](http://docs.grafana.org/plugins/installation/) for more plugin information.

### From Releases
1. Download the desired [release version](https://github.com/circonus-labs/circonus-irondb-datasource/releases).

2. Unzip into plugins directory.

3. Restart Grafana.

### From GitHub
1. `git clone https://github.com/circonus-labs/circonus-irondb-datasource.git` into plugins directory.

2. Restart Grafana.

## Configuration

1. Create a new datasource and select IRONdb from the `Type` drop down.

1. Change the IRONdb configuration options at the bottom of the datasource configuration page.
![](img/irondb-datasource-configuration.png)

### IRONdb Type
* Standalone: An IRONdb cluster accessible directly, requires entry of Account ID.
* Hosted: An IRONdb instance hosted by Circonus, requires entry of API token.

### Account ID
The Account ID associated with the account to pull metrics from.

### API Token
The API Token associated with the account to pull metrics from. This can be found on your API Tokens page after logging in at [https://www.circonus.com/](https://www.circonus.com/) in the "User Profile" section.

## Usage

1. Create a new panel and set the datasource to name selected in the IRONdb datasource configuration.

### Normal Queries
For normal queries, use the metric browser to navigate the metric hierarchy of your IRONdb instance or type queries manually using the *Toggle Edit Mode* menu item to the right.
![](img/irondb-graph-metric-browser.png)

### CAQL Queries
[CAQL queries](https://login.circonus.com/resources/docs/user/CAQL.html) must be entered manually by selecting the *CAQL* checkbox or switching manually to the editor mode.
![](img/irondb-graph-caql-editor.png)

### Histograms
Histograms currently require a special checkbox to be selected in order for the returned data to be processed correctly.
![](img/irondb-graph-metric-browser.png)
Once selected, histogram data processing will be utilized for any returned data related to the specific metric.

### Heatmaps
Using the histogram checkbox to process returned data allows for histograms to be displayed on the heatmap panel type.

![](img/irondb-heatmap-sample.png)

For this processed data to be displayed on the heatmap panel as the sample above, select *Time Series Buckets* as the Data Format to be used on the Heatmap panel.

![](img/irondb-heatmap-tsbuckets.png)

### Template Variables

**How to configure a template variable for IRONdb**

1. From a dashboard, click `Settings` in the top right.

1. On the left hand side, select the `Variables` section.

1. Click `+New` and choose a name for your new variable.

1. Select the proper data source: `IRONdb`.

1. Under `Query`, enter the metric you wish to use in this variable (without tags), **or** enter the fully formed tag query, ala: `and(__name:foo,or(bar:baz,quux:*))`. Note that this query can contain references to other variables (see example below)

1. If you enable `Include All Option`, enter `*` for the `Custom all value`.

1. Click `Enabled` under `Value groups/tags` to enable tags support.

1. Enter the tag category you wish to use in your variable under `Tag values query`. See example below.

1. If you successfully completed the prior steps, `Preview of values` should now auto-complete the tag values.

1. Finish setup by clicking `Add` and then `Save`.

Example:

![](img/irondb-variable-config.png)

In this example, we are creating a variable called `namespace` using the query `and(__name:used,cluster:$cluster)` which contains a reference to another variable (not pictured). We are then pulling the values out of a tag called `namespace` (you can see the preview values).

In this way you can make dependent variables that change in a hierarchy based on prior chosen variables.

Your new template variable should now appear in the query builder!

# Development

The build process requires node, npm, yarn, typescrypt, and tslint

On Cent7 setup:

```
# One time setup
sudo yum install node bzip2
sudo npm install -g typescript tslint
yarn
# Build
yarn build
# Test
yarn test
```
Binary file added dist/img/irondb-icons-data-retina-sprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 98c5335

Please sign in to comment.