Skip to main content

Monitoring:Nacos Server monitoring

Hertzbeat monitors metrics of the Nacos Server by calling the Nacos Metrics Api.

PreRequisites

Deploy Nacos cluster to expose metrics data

  1. Deploy the Nacos cluster according to deployment document.
  2. Configure the application. properties file to expose metrics data.
management.endpoints.web.exposure.include=*
  1. Access {ip}:8848/nacos/actuator/prometheus to see if metrics data can be accessed.

More information see Nacos monitor guide.

Configuration parameter

Parameter nameParameter help description
Target HostMonitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://)
Target nameIdentify the name of this monitoring. The name needs to be unique
Nacos PortPort provided by the Nacos Server. The default is 8848
Collection intervalInterval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds
Description remarksFor more information about identifying and describing this monitoring, users can note information here

Collection Metric

Metric set:jvm

Metric nameMetric unitMetric help description
system_cpu_usagenonecpu usage
system_load_average_1mnoneload
jvm_memory_used_bytesbytejvm memory used
jvm_memory_max_bytesbytejvm max memory
jvm_gc_pause_seconds_countnonegc count
jvm_gc_pause_seconds_sumsecondgc time
jvm_threads_daemonnonejvm threads count

Metric set:Nacos

Metric nameMetric unitMetric help description
http_server_requests_seconds_countsecondhttp requests count
http_server_requests_seconds_sumsecondhttp requests time
nacos_timer_seconds_sumsecondNacos config notify time
nacos_timer_seconds_countnoneNacos config notify count
nacos_monitor{name='longPolling'}noneNacos config connection count
nacos_monitor{name='configCount'}noneNacos configuration file count
nacos_monitor{name='dumpTask'}noneNacos config dump task count
nacos_monitor{name='notifyTask'}noneNacos config notify task count
nacos_monitor{name='getConfig'}noneNacos config read configuration count
nacos_monitor{name='publish'}noneNacos config update configuration count
nacos_monitor{name='ipCount'}noneNacos naming ip count
nacos_monitor{name='domCount'}noneNacos naming domain count(1.x version)
nacos_monitor{name='serviceCount'}noneNacos naming domain count(2.x version)
nacos_monitor{name='failedPush'}noneNacos naming push fail count
nacos_monitor{name='avgPushCost'}secondNacos naming push cost time(average)
nacos_monitor{name='leaderStatus'}noneNacos naming if node is leader
nacos_monitor{name='maxPushCost'}secondNacos naming push cost time(max)
nacos_monitor{name='mysqlhealthCheck'}noneNacos naming mysql health check count
nacos_monitor{name='httpHealthCheck'}noneNacos naming http health check count
nacos_monitor{name='tcpHealthCheck'}noneNacos naming tcp health check count

Metric set:Nacos exception

Metric nameMetric unitMetric help description
nacos_exception_total{name='db'}nonedatabase exception
nacos_exception_total{name='configNotify'}noneNacos config notify exception
nacos_exception_total{name='unhealth'}noneNacos config server health check exception
nacos_exception_total{name='disk'}noneNacos naming write disk exception
nacos_exception_total{name='leaderSendBeatFailed'}noneNacos naming leader send heart beat fail count
nacos_exception_total{name='illegalArgument'}nonerequest argument illegal count
nacos_exception_total{name='nacos'}noneNacos inner exception

Metric set:client

Metric nameMetric unitMetric help description
nacos_monitor{name='subServiceCount'}nonesubscribed services count
nacos_monitor{name='pubServiceCount'}nonepublished services count
nacos_monitor{name='configListenSize'}nonelistened configuration file count
nacos_client_request_seconds_countnonerequest count
nacos_client_request_seconds_sumsecondrequest time