pyrax云监控系统

2024-06-01 07:58:47 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经使用Rackspace云监控api创建了实体和检查,现在我需要运行/测试检查,以便在现有的监控系统中每隔60秒左右输入一次值,并可以触发警报或主要报告数据。你知道吗

我可以通过命令行实用程序raxmon checks test和raxmon checks test existing来使用,但是我找不到使用pyrax模块的直接方法。可能这可以通过请求实例来完成吡咯烷酮但我找不到任何好的例子。任何帮助都将不胜感激。你知道吗


Tags: 模块数据命令行test实体实用程序api系统
1条回答
网友
1楼 · 发布于 2024-06-01 07:58:47

等价于raxmon-checks-test的方法是使用create_check并传入test_only=True。此时没有直接等价于raxmon-checks-test-existing

以下是create_check方法中提供的docstring:

Creates a check on the entity with the specified attributes. The 'details' parameter should be a dict with the keys as the option name, and the value as the desired setting.

If the 'test_only' parameter is True, then the check is not created; instead, the check is run and the results of the test run returned. If 'include_debug' is True, additional debug information is returned. According to the current Cloud Monitoring docs: "Currently debug information is only available for the remote.http check and includes the response body."

create_check的文档可以在https://github.com/rackspace/pyrax/blob/master/docs/cloud_monitoring.md#create-the-check找到,尽管它们目前缺少关于test_only的信息。你知道吗

相关问题 更多 >