代码之家  ›  专栏  ›  技术社区  ›  vishal

sensu客户端订阅无响应

  •  1
  • vishal  · 技术社区  · 8 年前

    我已经成功地安装了sensu服务器和客户端,除了一件事之外,其他都正常工作。在此图像中 enter image description here

    您可以看到mysql和web端口有警报。但我现在在我的客户机中只提供了“mysql”订阅。我的客户端系统中的json文件。我已经从客户端删除了“webserver”订阅。json(在用“mysql”替换之前,我最初添加了json),但仍然显示了与“webserver”订阅相关的检查。为什么会这样?以及如何仅显示与给定子描述相关的检查。这是我的客户。json

        {
          "client": {
           "name": "sensuclient2",
           "address": "127.0.0.1",
           "keepalive": {
          "thresholds": {
           "warning": 60,
           "critical": 120
      },
    
       "handlers": ["default", "mailer", "sns"]
    },
      "subscriptions": [
          "mysql"
       ]
    
    }
    }
    
    1 回复  |  直到 8 年前
        1
  •  0
  •   Rebeca Maia    8 年前

    在您更改客户端配置文件之前,Uchiwa可能显示了旧的检查(至少我检查过一次!)。尝试删除事件。如果API不再运行检查,事件将不会再次出现。

    您可以使用sensu cli删除事件:

    sensu-cli event delete sensuclient2 check_http
    

    https://github.com/agent462/sensu-cli

    或者进行API调用。。。

    curl -s -i -X DELETE http://yourhost:yourport/events/sensuclient2/check_http
    

    https://sensuapp.org/docs/1.1/api/events-api.html#eventsclientcheck-delete

    如果检查确实返回,您应该检查服务器端和客户端检查以及客户端配置。

    而且,最简单的就是最好的,@vishal。k本人提醒我:

    推荐文章