Hi team,
I am using telegraf version 1.28.3. I am reading data from tail plugin from two different source and want to filter out my data in elasticsearch on basis of tags.
But tagpass is not working in elasticsearch output plugin. Just wanted to know tagpass works in elasticsearch output plugin or not ?
Below are my configurations:
telegraf.conf
[agent]
collection_jitter = "0s"
debug = true
flush_interval = "30s"
flush_jitter = "0s"
interval = "30s"
logfile = ""
metric_batch_size = 1000
metric_buffer_limit = 10000
omit_hostname = false
precision = ""
quiet = false
round_interval = true
hostname = "telus-dev"
statefile = "/usr/share/telegraf/data/statefile"
This is my config file
[[inputs.tail]]
alias = "file1loginput"
files = ["/var/log/containers/file1*"]
data_format = "grok"
grok_patterns = ['%{GREEDYDATA:log_message}']
tags = {file1_logs = "kc"}
[[inputs.tail]]
alias = "file2loginput"
files = ["/var/log/containers/file2*"]
data_format = "grok"
grok_patterns = ['%{GREEDYDATA:log_message}']
tags = {file2_logs = "lc"}
[[processors.regex]]
alias = "file1logprocess"
namepass = ["tail"]
[[processors.regex.tags]]
key = "path"
pattern = "^(.*?)_.*?log"
replacement = "${1}"
result_key = "podname"
append = false
[[outputs.elasticsearch]]
alias = "file1logoutput"
tagpass = ["file1_logs"]
urls = ["http://opensearch-master:9200"]
index_name = "file1-%Y.%m.%d"
username = "admin"
password = "admin"
metric_batch_size = 100
[[outputs.elasticsearch]]
alias = "file2logoutput"
tagpass = ["file2_logs"]
urls = ["http://opensearch-master:9200"]
index_name = "file2-%Y.%m.%d"
username = "admin"
password = "admin"
metric_batch_size = 100
Please help me to understand what I am doing wrong