diff --git a/src/app/partials/opentsdb/editor.html b/src/app/partials/opentsdb/editor.html index b74b1d7a269..51a575d933c 100644 --- a/src/app/partials/opentsdb/editor.html +++ b/src/app/partials/opentsdb/editor.html @@ -89,6 +89,32 @@ ng-model="target.isCounter" ng-change="targetBlur()"> +
  • + Counter Max: +
  • +
  • + +
  • +
  • + Counter Reset Value: +
  • +
  • + +
  • Alias:
  • diff --git a/src/app/services/opentsdb/opentsdbDatasource.js b/src/app/services/opentsdb/opentsdbDatasource.js index f6a36c6f035..0cf3e5f1148 100644 --- a/src/app/services/opentsdb/opentsdbDatasource.js +++ b/src/app/services/opentsdb/opentsdbDatasource.js @@ -136,6 +136,14 @@ function (angular, _, kbn) { query.rateOptions = { counter: !!target.isCounter }; + + if (target.counterMax && target.counterMax.length) { + query.rateOptions.counterMax = parseInt(target.counterMax); + } + + if (target.counterResetValue && target.counterResetValue.length) { + query.rateOptions.resetValue = parseInt(target.counterResetValue); + } } if (target.shouldDownsample) {