我正在Kibana试用的正常时间功能。我下载了“心跳”并使用默认设置运行了它。它可以正常工作。
但是,当我试图在heartbeat.monitors中heartbeat.yml中添加更多监视器时。我遇到了一个错误。
下面是缺省值,它运行正常。
haertbeat.yml
# Configure monitors inline
heartbeat.monitors:
- type: http
# List or urls to query
urls: ["http://localhost:9200"]
# Configure task schedule
schedule: '@every 10s'
# Total test connection and data exchange timeout
#timeout: 16s 但是,当我添加以下内容时,会得到一个错误。
# Configure monitors inline
heartbeat.monitors:
- type: http
# List or urls to query
urls: ["http://localhost:9200"]
# Configure task schedule
schedule: '@every 10s'
# Total test connection and data exchange timeout
#timeout: 16s
- type: icmp <------ When I try to add tcp or icmp,
schedule: '@every 10s' <------ I get an error. I am doing something
hosts: ["localhost"] <------ wrong. How can I add more monitors?PS C:\Program Files\Heartbeat> Start-Service heartbeat
Start-Service : Service 'heartbeat (heartbeat)' cannot be started due to the following error: Cannot start service heartbeat on computer '.'.
At line:1 char:1
+ Start-Service heartbeat
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
+ FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Commands.StartServiceCommand当我删除我想要添加的内容时,效果很好。如何在heartbeat.yml中添加更多监视器
发布于 2019-10-14 12:13:25
我坚信这是YAML文件中的缩进问题。
看看您的icmp监视器:
- type: icmp <------ When I try to add tcp or icmp,
schedule: '@every 10s' <------ I get an error. I am doing something
hosts: ["localhost"] <------ wrong. How can I add more monitors?在schedule和hosts设置之前有空白。
现在看看默认监视器:
heartbeat.monitors:
- type: http
# List or urls to query
urls: ["http://localhost:9200"]
# Configure task schedule
schedule: '@every 10s'
# Total test connection and data exchange timeout
#timeout: 16s 在type字段下对齐设置并再次运行。
https://stackoverflow.com/questions/58371483
复制相似问题