Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance nacos.yml #766

Merged
merged 1 commit into from
Mar 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 62 additions & 23 deletions manager/src/main/resources/define/app-nacos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,51 +19,90 @@ params:
required: true
defaultValue: 8848
metrics:
- name: cpu
- name: system
priority: 0
fields:
- field: system_cpu_usage
type: 0
unit: '%'
- field: system_average_load
type: 0
- field: system_memory_usage
type: 0
unit: '%'
aliasFields:
- cpu
- load
- mem
calculates:
- system_cpu_usage=cpu * 100
- system_average_load=load
- system_memory_usage=mem * 100
protocol: http
http:
host: ^_^host^_^
port: ^_^port^_^
url: /nacos/v2/ns/operator/metrics?onlyStatus=false
method: GET
parseType: jsonPath
parseScript: $.data

- name: jvm_gc_count
priority: 1
fields:
- field: total_gc_count
type: 0
aliasFields:
- value
calculates:
- system_cpu_usage=value * 100
- total_gc_count=value
protocol: http
http:
host: ^_^host^_^
port: ^_^port^_^
url: /nacos/actuator/metrics/jvm.gc.pause
method: GET
parseType: jsonPath
parseScript: $.measurements[0]

- name: jvm_gc_time
priority: 1
fields:
- field: total_gc_time
type: 0
unit: 's'
aliasFields:
- value
calculates:
- total_gc_time=value
protocol: http
http:
# 主机host: ipv4 ipv6 域名
host: ^_^host^_^
# 端口
port: ^_^port^_^
# url请求接口路径
url: /nacos/actuator/metrics/system.cpu.usage
# 请求方式 GET POST PUT DELETE PATCH
url: /nacos/actuator/metrics/jvm.gc.pause
method: GET
# 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-api可用性指标监控
parseType: jsonPath
parseScript: $.measurements[*]
- name: memory
parseScript: $.measurements[1]

- name: nacos
priority: 1
fields:
- field: jvm_memory_used
- field: service_count
type: 0
- field: client_count
type: 0
unit: 'MB'
aliasFields:
- value
- serviceCount
- clientCount
calculates:
- jvm_memory_used=value
units:
- jvm_memory_used=B->MB
- service_count=serviceCount
- client_count=clientCount
protocol: http
http:
# 主机host: ipv4 ipv6 域名
host: ^_^host^_^
# 端口
port: ^_^port^_^
# url请求接口路径
url: /nacos/actuator/metrics/jvm.memory.used
# 请求方式 GET POST PUT DELETE PATCH
url: /nacos/v2/ns/operator/metrics?onlyStatus=false
method: GET
# 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-api可用性指标监控
parseType: jsonPath
parseScript: $.measurements[*]
parseScript: $.data