Hello our team has used telegraf - influxdb v2 - grafana for a long time and decided to use tail plugin this time for nginx access.log
I added tail plugin options in the conf file and restarted telegraf and telegraf.log showed it was successful.(and tail plugin was loaded) However, I can’t see any tail data in the _measurement on InfluxDB UI, while I can see ipmi_sensor data that we have used for a long time. So I assume that telegraf doesn’t send tail plugin data while it does ipmi plugin data.
Could I ask for any help?
P.S. one thing strange is that the telegraf server can connect to the influxdb server with telnet, but it doesn’t get any reponse with ping request.
/etc/telegraf/telegraf.conf
[global_tags]
rack = "vc99"
category = "WEB"
[agent]
interval = "60s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "50s"
flush_jitter = "0s"
precision = "0s"
omit_hostname = false
logfile = "/var/log/telegraf/telegraf.log"
[[outputs.influxdb_v2]]
urls = ["http://{url}:8086"]
token = "{token}"
organization = "tnh"
bucket = "nginx_log_test_2"
[[inputs.ipmi_sensor]]
metric_version = 2
interval = "5m"
use_sudo = true
[[inputs.tail]] --> added this time
files = ["/var/log/nginx/access.log"]
from_beginning = false
name_override = "nginx_access_log"
data_format = "value"
data_type = "string"
[inputs.tail.tags]
source = "nginx"
Best Regards
Luke