Skip to content

Commit

Permalink
Fix review comments for indices filter feature
Browse files Browse the repository at this point in the history
Signed-off-by: nhuttran <[email protected]>
  • Loading branch information
nhuttran authored and lukas-vlcek committed May 10, 2023
1 parent 06ce0ac commit bc9a609
Show file tree
Hide file tree
Showing 5 changed files with 489 additions and 70 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@ prometheus.nodes.filter: "_all"

#### Indices filter

Prometheus exporter can be configured to filter indices statistics with indices starting with prefixes.
Prometheus exporter can be configured to filter indices statistics from selected indices.
To target all indices, use '' or * or _all
Default value: `""`.

For example to filter indices statistics with indices starting with prefixes such as logs, alarms:
For example to filter indices statistics:
```
prometheus.indices_filter: "logs-*,alarms*"
prometheus.indices_filter: "log-*,*log,*log*,log*-test"
```

## Usage
Expand Down
62 changes: 30 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,8 @@ import org.opensearch.gradle.test.RestIntegTestTask
import java.util.regex.Matcher
import java.util.regex.Pattern

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'opensearch.opensearchplugin'
apply plugin: 'opensearch.yaml-rest-test'

def pluginName = pluginName
def pluginDescription = pluginDescription
//def projectPath = 'org.opensearch'
//def pathToPlugin = 'path.to.plugin'
def pluginClassName = pluginClassname

opensearchplugin {
name pluginName
description pluginDescription
// classname "${projectPath}.${pathToPlugin}.${pluginClassName}"
classname pluginClassName
licenseFile rootProject.file('LICENSE.txt')
noticeFile rootProject.file('NOTICE.txt')
}

// thirdparty audit needs can be enabled
thirdPartyAudit.enabled = false

// This requires an additional Jar not published as part of build-tools
loggerUsageCheck.enabled = false

// No need to validate pom, as we do not upload to maven/sonatype
validateNebulaPom.enabled = false

buildscript {

ext {

// Four {digit(s)} concatenated with a "." followed by -rc{digit(s)}
// Examples: 1.0.0.1-rc2, 2.10.4.0-rc5
// Group (3) refers to the last .{digit{(s)} pattern (this is what we want to remove for OpS version)
Expand All @@ -49,7 +18,6 @@ buildscript {
String opensearch_version
String plugin_version = version


Matcher rc_matcher = RC_pattern.matcher(plugin_version)
Matcher other_matcher = OTHER_pattern.matcher(plugin_version)

Expand Down Expand Up @@ -83,6 +51,36 @@ buildscript {
}
}

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'opensearch.opensearchplugin'
apply plugin: 'opensearch.yaml-rest-test'
//apply plugin: 'checkstyle'

def pluginName = pluginName
def pluginDescription = pluginDescription
//def projectPath = 'org.opensearch'
//def pathToPlugin = 'path.to.plugin'
def pluginClassName = pluginClassname

opensearchplugin {
name pluginName
description pluginDescription
// classname "${projectPath}.${pathToPlugin}.${pluginClassName}"
classname pluginClassName
licenseFile rootProject.file('LICENSE.txt')
noticeFile rootProject.file('NOTICE.txt')
}

// thirdparty audit needs can be enabled
thirdPartyAudit.enabled = false

// This requires an additional Jar not published as part of build-tools
loggerUsageCheck.enabled = false

// No need to validate pom, as we do not upload to maven/sonatype
validateNebulaPom.enabled = false

repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/releases" }
Expand Down
Loading

0 comments on commit bc9a609

Please sign in to comment.