apache / hertzbeat

Apache HertzBeat(incubating) is a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
https://hertzbeat.apache.org/
Apache License 2.0
5.42k stars 941 forks source link

[Question] < PING connectivity> #2260

Open QiangQiangshiyanshi opened 1 month ago

QiangQiangshiyanshi commented 1 month ago

Question

I found the interface documentation, ran the test code, and did not find it on the console.

{
  "monitor": {
    "name": "Api-TanCloud.cn",
    "app": "TanCloud",
    "host": "192.167.25.11",
    "intervals": 600,
    "status": "string",
    "description": "Availability monitoring of the SAAS website TanCloud",
    "tags": [
      {
        "name": "app",
        "tagValue": "23",
        "color": "#ffff",
        "description": "Used for monitoring mysql",
        "type": "string"
      }
    ]
  },
  "params": [
    {
      "monitorId": 875846754543,
      "field": "port",
      "paramValue": "8080",
      "type": "string"
    }
  ],
  "detected": true,
  "collector": "string"
}
{
  "data": null,
  "msg": "Cannot construct instance of `org.apache.hertzbeat.manager.pojo.dto.MonitorDto` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('monitor')\n at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 1, column: 3]",
  "code": 1
}
QiangQiangshiyanshi commented 1 month ago

If I want to use Ping's connectivity for batch import, are there any relevant interface templates available. For my reference and reference

tomsun28 commented 1 month ago

you can refer the monitor export and import api.

QiangQiangshiyanshi commented 1 month ago

I have a question and would like to ask for advice. I run the API to add monitoring, and the script execution shows that the addition is successful, but there is no related monitoring item displayed on the dashboard.