gpt4 book ai didi

Telegraf - 如何监控多个 Tomcat 实例?

转载 作者:行者123 更新时间:2023-12-04 13:22:52 29 4
gpt4 key购买 nike

我设法从单个 Tomcat 实例收集数据到 Telegraf,如下所示。

[[inputs.tomcat]]
## URL of the Tomcat server status
url = "http://127.0.0.1:19090/manager/status/all?XML=true"

## HTTP Basic Auth Credentials
username = "admin"
password = "fD*(*DSS"

## Request timeout
# timeout = "5s"

## Optional SSL Config
# ssl_ca = "/etc/telegraf/ca.pem"
# ssl_cert = "/etc/telegraf/cert.pem"
# ssl_key = "/etc/telegraf/key.pem"
## Use SSL but skip chain & host verification
# insecure_skip_verify = false

现在想监控多个Tomcat实例,但是好像没有实例说明如何监控多个。有人知道吗?

最佳答案

原来答案很简单。只需多次声明 inputs.tomcat block ,如下所示。

[[inputs.tomcat]]
## URL of the Tomcat server status
url = "http://127.0.0.1:19090/manager/status/all?XML=true"

## HTTP Basic Auth Credentials
username = "admin"
password = "fD*(*DSS"

[[inputs.tomcat]]
## URL of the Tomcat server status
url = "http://127.0.0.1:29090/manager/status/all?XML=true"

## HTTP Basic Auth Credentials
username = "admin"
password = "fD*(*DSS"

关于Telegraf - 如何监控多个 Tomcat 实例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47259614/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com