api.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # 监控应用类型名称(与文件名保持一致) eg: linux windows tomcat mysql aws...
  2. app: api
  3. # 参数映射map. type是参数类型: 0-number数字, 1-string明文字符串, 2-secret加密字符串
  4. # 强制固定必须参数 - host
  5. configmap:
  6. - key: host
  7. type: 1
  8. - key: port
  9. type: 0
  10. - key: uri
  11. type: 1
  12. - key: method
  13. type: 1
  14. - key: ssl
  15. type: 1
  16. - key: username
  17. type: 1
  18. - key: password
  19. type: 2
  20. # 指标组列表
  21. metrics:
  22. # 第一个监控指标组 cpu
  23. # 注意:内置监控指标有 (responseTime - 响应时间)
  24. - name: summary
  25. # 指标组调度优先级(0-127)越小优先级越高,优先级低的指标组会等优先级高的指标组采集完成后才会被调度,相同优先级的指标组会并行调度采集
  26. # 优先级为0的指标组为可用性指标组,即它会被首先调度,采集成功才会继续调度其它指标组,采集失败则中断调度
  27. priority: 0
  28. # 指标组中的具体监控指标
  29. fields:
  30. # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
  31. - field: responseTime
  32. type: 0
  33. unit: ms
  34. # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk
  35. protocol: http
  36. # 当protocol为http协议时具体的采集配置
  37. http:
  38. # 主机host: ipv4 ipv6 域名
  39. host: ^_^host^_^
  40. # 端口
  41. port: ^_^port^_^
  42. # url请求接口路径
  43. url: ^_^uri^_^
  44. # 请求方式 GET POST PUT DELETE PATCH
  45. method: ^_^method^_^
  46. # 是否启用ssl/tls,即是http还是https,默认false
  47. ssl: false
  48. # 认证
  49. authorization:
  50. # 认证方式: Basic Auth, Digest Auth, Bearer Token
  51. type: Basic Auth
  52. basicAuthUsername: ^_^username^_^
  53. basicAuthPassword: ^_^password^_^
  54. # 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-网站可用性指标监控
  55. # todo xmlPath-xmlPath脚本,prometheus-Prometheus数据规则
  56. parseType: website