Skip to content

Instantly share code, notes, and snippets.

@postwait
Created August 21, 2018 19:00
Show Gist options
  • Save postwait/4ff4c78f1b02f99200644a876f8d7b79 to your computer and use it in GitHub Desktop.
Save postwait/4ff4c78f1b02f99200644a876f8d7b79 to your computer and use it in GitHub Desktop.
diff --git a/src/datasource.ts b/src/datasource.ts
index 25e4427..e5aa5df 100644
--- a/src/datasource.ts
+++ b/src/datasource.ts
@@ -126,12 +126,14 @@ export default class IrondbDatasource {
headers['X-Circonus-App-Name'] = this.appName;
}
if ('standalone' == this.irondbType && !isCaql) {
+ headers['X-Circonus-Account'] = this.accountId;
baseUrl = baseUrl + '/graphite/' + this.accountId;
if (!isFind) {
baseUrl = baseUrl + '/' + this.queryPrefix + '/series_multi';
}
}
if (isCaql && !isFind) {
+ headers['X-Circonus-Account'] = this.accountId;
baseUrl = baseUrl + '/extension/lua/caql_v1';
}
@@ -156,6 +158,8 @@ export default class IrondbDatasource {
if ('hosted' == this.irondbType) {
headers['X-Circonus-Auth-Token'] = this.apiToken;
headers['X-Circonus-App-Name'] = this.appName;
+ } else {
+ headers['X-Circonus-Account'] = this.accountId;
}
if (irondbOptions['std']['names'].length) {
options = {};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment