0

我正在尝试电报输入尾部插件。我是第一次这样做,语法很混乱。请更正语法。日志文件是多行文本。

[[inputs.tail]]
## file(s) to tail:
files = ["/home/test.log"]
     
from_beginning = true
#name of the "Metric" (which I want to see in prometheus)
name_override = "test"
data_format = "grok"
grok_patterns = ["%{CUSTOM_LOG}"]
grok_custom_patterns = '’’CUSTOM_LOG %{TIMESTAMP_ISO8601} %{LOGLEVEL} %GREEDYDATA:logMessage:tag}'''
[[outputs.prometheus_client]]
## Address to listen on.
listen = "localhost:9273"
## Path to publish the metrics on.
path = "/metrics"
4

0 回答 0