Filebeat custom module for nodejs logs

Hi All,
I trying to write a custom module for file beat that can send Nodejs application logs directory to elasticsearch. It's showing me below error on the execution using the plugin.

2018-08-01T22:05:12.348+0530 ERROR instance/beat.go:743 Exiting: Error getting config for fileset rb_app_logs/rb_app_stdout: Error interpreting the template of the input: template: text:3:22: executing "text" at <.paths>: range can't iterate over /tmp/abc.txt
Exiting: Error getting config for fileset rb_app_logs/rb_app_stdout: Error interpreting the template of the input: template: text:3:22: executing "text" at <.paths>: range can't iterate over /tmp/abc.txt

Sample log
cat /tmp/abc.log
2018-08-01T10:57:58.976Z - debug: audit - API NOT WHITELISTED FOR AUDITING

pipeline.json used in module
cat ingest/pipeline.json
{
"description": "Pipeline for parsing rb_app_logs rb_app_stdout logs",
"processors": [{
"grok": {
"field": "message",
"patterns":["%{TIMESTAMP_ISO8601:rb_app_logs.rb_app_stdout.time} [0-9\-] %{LOGLEVEL:rb_app_logs.rb_app_stdout.loglevel}[:] %{GREEDYDATA:rb_app_logs.rb_app_stdout.message}"],
"ignore_missing": true,
"pattern_definitions": {
"GREEDYMULTILINE": "(.|\n)*"
}
}
},
{
"remove": {
"field": "message"
}
}],
"on_failure" : [{
"set" : {
"field" : "error.message",
"value" : "{{ _ingest.on_failure_message }}"
}
}]
}

I have checked its working fine on elasticsearch pipeline simulator Other details as below.
FIlebeat : 7.0.0-alpha1
Elasticsearch:6.3.1

Thanks you
Jogendra

Resolved My bad its configuration relented issue. Its not working with file located in /tmp

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.