gpt4 book ai didi

linux - 设置 sensu 时出错 "sensu must be a hash"

转载 作者:太空宇宙 更新时间:2023-11-04 10:12:07 25 4
gpt4 key购买 nike

<分区>

我遇到了这个错误

{"timestamp":"2018-01-24T18:59:32.875053+0530","level":"fatal","message":"sensu 必须是哈希","object":[ {"name":"Datacenter 1","host":"localhost","port":4567}]}

我的配置是:配置.json

{}

conf.d/api.json

{
"api": {
"host": "127.0.0.1",
"bind": "0.0.0.0",
"port": 4567

}
}

conf.d/client.json

{
"client": {
"name": "sensu-server",
"address": "127.0.0.1",
"environment": "development",
"subscriptions": [
"dev",
"ubuntu"
],
"socket": {
"bind": "127.0.0.1",
"port": 3030
}
}
}

conf.d/redis.json

{
"redis": {
"host": "127.0.0.1",
"port": 6379
}
}

conf.d/rabbitmq.json

{
"rabbitmq": {
"host": "127.0.0.1",
"port": 5672,
"vhost": "/sensu",
"user": "sensu",
"password": "secret"
}
}

conf.d/transport.json

{
"transport": {
"name": "rabbitmq",
"reconnect_on_error": true

}
}

我的 sensu-srever 日志是

{"timestamp":"2018-01-24T19:11:00.726690+0530","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/transport.json"}
{"timestamp":"2018-01-24T19:11:00.726728+0530","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/transport.json","changes":{}}
{"timestamp":"2018-01-24T19:11:00.726751+0530","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/rabbitmq.json"}
{"timestamp":"2018-01-24T19:11:00.726780+0530","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/rabbitmq.json","changes":{"rabbitmq":[null,{"host":"127.0.0.1","port":5672,"vhost":"/sensu","user":"sensu","password":"REDACTED"}]}}
{"timestamp":"2018-01-24T19:11:00.726804+0530","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/check_disk_usage_linux.json"}
{"timestamp":"2018-01-24T19:11:00.726838+0530","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/check_disk_usage_linux.json","changes":{"checks":{"check-disk-usage-linux":[null,{"handlers":["mailer"],"command":"/opt/sensu/embedded/bin/check-disk-usage.rb -w 80 -c 90","interval":60,"occurrences":5,"subscribers":["linux"]}]}}}
{"timestamp":"2018-01-24T19:11:00.726864+0530","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/check_memory_linux.json"}
{"timestamp":"2018-01-24T19:11:00.726902+0530","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/check_memory_linux.json","changes":{"checks":{"check_memory_linux":[null,{"handlers":["mailer"],"command":"/opt/sensu/embedded/bin/check-memory-percent.rb -w 90 -c 95","interval":60,"occurrences":5,"subscribers":["linux"]}]}}}
{"timestamp":"2018-01-24T19:11:00.726934+0530","level":"fatal","message":"sensu must be a hash","object":[{"name":"Datacenter 1","host":"localhost","port":4567}]}
{"timestamp":"2018-01-24T19:11:00.726957+0530","level":"fatal","message":"SENSU NOT RUNNING!"}

我的配置 json 格式正确,仍然显示此错误

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