Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch committed May 18, 2018
1 parent 168ce06 commit 85703d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions filebeat/fileset/fileset.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (fs *Fileset) GetScriptsToStore() (map[string]string, error) {
return scripts, nil
}

// getScriptIDTemplate returns the Ingest Node pipeline ID
// getScriptIDTemplate returns the Ingest Node script ID template
func (fs *Fileset) getScriptIDTemplate(beatVersion string) *template.Template {
tStr := formatScriptIDTemplate(fs.mcfg.Module, fs.name, beatVersion)
return template.Must(template.New("script_id").Parse(tStr))
Expand Down Expand Up @@ -438,7 +438,7 @@ func substituteScriptIDs(jsonString, name string, t *template.Template) (string,

}

// formatScriptIDTemplate generates the ID to be used for the pipeline ID in Elasticsearch
// formatScriptIDTemplate generates the ID to be used for the pipeline script ID in Elasticsearch
func formatScriptIDTemplate(module, fileset, beatVersion string) string {
return fmt.Sprintf("filebeat-%s-%s-%s-{{.}}", beatVersion, module, fileset)
}
Expand Down
6 changes: 3 additions & 3 deletions filebeat/module/auditd/log/ingest/script/trim-quotes.painless
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ String trimQuotes(def v) {
}
if (v.endsWith(\"'\") || v.endsWith('\"')) {
v = v.substring(0, v.length()-1);
}
}
return v;
}

boolean isHexAscii(String v) {
def len = v.length();
if (len == 0 || len % 2 != 0) {
return false;
return false;
}

for (int i = 0 ; i < len ; i++) {
Expand Down Expand Up @@ -42,7 +42,7 @@ Iterator entries = audit.entrySet().iterator();
while (entries.hasNext()) {
def e = entries.next();
def k = e.getKey();
def v = e.getValue();
def v = e.getValue();

// Remove entries whose value is ?
if (v == \"?\" || v == \"(null)\" || v == \"\") {
Expand Down

0 comments on commit 85703d2

Please sign in to comment.