Skip to content

Commit d92e7e3

Browse files
authored
Fixed missing metrics by adding groupby (#80)
- Fixed missing metrics by adding groupby (#80) - Updated versions, dateTime and readme
1 parent e1d32bf commit d92e7e3

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

datasource.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ func (o *OCIDatasource) searchResponse(ctx context.Context, tsdbReq *datasource.
301301
var ts GrafanaSearchRequest
302302
json.Unmarshal([]byte(query.ModelJson), &ts)
303303
reqDetails := monitoring.ListMetricsDetails{}
304+
// Group by is needed to get all metrics without missing any as it is limited by the max pages
305+
reqDetails.GroupBy = []string{"name"}
304306
reqDetails.Namespace = common.String(ts.Namespace)
305307
if ts.ResourceGroup != "NoResourceGroup" {
306308
reqDetails.ResourceGroup = common.String(ts.ResourceGroup)

docs/linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ grafana-cli plugins install oci-datasource
4242
The plugin will be installed into your Grafana plugins directory, which by default is located at /var/lib/grafana/plugins. [Here is more information on the CLI tool](http://docs.grafana.org/plugins/installation/).
4343

4444
### Manual installation
45-
Alternatively, you can manually download the .tar file and unpack it into your /grafana/plugins directory. To do so, change to the Grafana plugins directory: `cd /usr/local/var/lib/grafana/plugins`. Download the OCI Grafana Plugin: wget `https://github.com/oracle/oci-grafana-plugin/releases/download/v2.2.2/plugin.tar`. Create a directory and install the plugin: `mkdir oci && tar -C oci -xvf plugin.tar` and then remove the tarball: `rm plugin.tar`.
45+
Alternatively, you can manually download the .tar file and unpack it into your /grafana/plugins directory. To do so, change to the Grafana plugins directory: `cd /usr/local/var/lib/grafana/plugins`. Download the OCI Grafana Plugin: wget `https://github.com/oracle/oci-grafana-plugin/releases/download/v2.2.3/plugin.tar`. Create a directory and install the plugin: `mkdir oci && tar -C oci -xvf plugin.tar` and then remove the tarball: `rm plugin.tar`.
4646

4747
> **Additional step for Grafana 7**. Open the grafana configuration *grafana.ini* file and add the `allow_loading_unsigned_plugins = "oci-datasource"`in the *plugins* section.
4848

docs/linuxoci.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ grafana-cli plugins install oci-metrics-datasource
3535
The plugin will be installed into your Grafana plugins directory, which by default is located at /var/lib/grafana/plugins. [Here is more information on the CLI tool](http://docs.grafana.org/plugins/installation/).
3636

3737
### Manually installation
38-
Alternatively, you can manually download the .tar file and unpack it into your /grafana/plugins directory. To do so, change to the Grafana plugins directory: `cd /usr/local/var/lib/grafana/plugins`. Download the OCI Grafana Plugin: wget `https://github.com/oracle/oci-grafana-plugin/releases/download/v2.2.2/plugin.tar`. Create a directory and install the plugin: `mkdir oci && tar -C oci -xvf plugin.tar` and then remove the tarball: `rm plugin.tar`.
38+
Alternatively, you can manually download the .tar file and unpack it into your /grafana/plugins directory. To do so, change to the Grafana plugins directory: `cd /usr/local/var/lib/grafana/plugins`. Download the OCI Grafana Plugin: wget `https://github.com/oracle/oci-grafana-plugin/releases/download/v2.2.3/plugin.tar`. Create a directory and install the plugin: `mkdir oci && tar -C oci -xvf plugin.tar` and then remove the tarball: `rm plugin.tar`.
3939

4040
> **Additional step for Grafana 7**. Open the grafana configuration *grafana.ini* file and add the `allow_loading_unsigned_plugins = "oci-datasource"`in the *plugins* section.
4141

docs/macos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ grafana-cli plugins install oci-metrics-datasource
4040
The plugin will be installed into your Grafana plugins directory, which by default is located at /var/lib/grafana/plugins. [Here is more information on the CLI tool](http://docs.grafana.org/plugins/installation/).
4141

4242
### Manually installation
43-
Alternatively, you can manually download the .tar file and unpack it into your /grafana/plugins directory. To do so, change to the Grafana plugins directory: `cd /usr/local/var/lib/grafana/plugins`. Download the OCI Grafana Plugin: wget `https://github.com/oracle/oci-grafana-plugin/releases/download/v2.2.2/plugin.tar`. Create a directory and install the plugin: `mkdir oci && tar -C oci -xvf plugin.tar` and then remove the tarball: `rm plugin.tar`
43+
Alternatively, you can manually download the .tar file and unpack it into your /grafana/plugins directory. To do so, change to the Grafana plugins directory: `cd /usr/local/var/lib/grafana/plugins`. Download the OCI Grafana Plugin: wget `https://github.com/oracle/oci-grafana-plugin/releases/download/v2.2.3/plugin.tar`. Create a directory and install the plugin: `mkdir oci && tar -C oci -xvf plugin.tar` and then remove the tarball: `rm plugin.tar`
4444

4545
> **Additional step for Grafana 7**. Open the grafana configuration *grafana.ini* file and add the `allow_loading_unsigned_plugins = "oci-datasource"`in the *plugins* section.
4646

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "oci-metrics-datasource",
33
"private": true,
4-
"version": "2.2.2",
4+
"version": "2.2.3",
55
"description": "Oracle Cloud Infrastructure Metrics Data Source for Grafana",
66
"main": "index.js",
77
"scripts": {

src/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
{"name": "GitHub", "url": "https://github.com/oracle/oci-grafana-plugin"},
2727
{"name": "UPL", "url": "https://oss.oracle.com/licenses/upl"}
2828
],
29-
"version": "2.2.2",
30-
"updated": "2021-01-11"
29+
"version": "2.2.3",
30+
"updated": "2021-01-21"
3131
},
3232

3333
"dependencies": {

0 commit comments

Comments
 (0)