Operations 4 min read

Enable Nacos Metrics in Prometheus and Visualize with Grafana

This guide shows how to enable Nacos metrics, configure Prometheus to scrape them, and visualize the data with a Grafana dashboard, providing a centralized view across different departments for enterprise monitoring and decision‑making.

Linux Ops Smart Journey
Linux Ops Smart Journey
Linux Ops Smart Journey
Enable Nacos Metrics in Prometheus and Visualize with Grafana

In today’s fast‑moving business environment, the NSCOS enterprise‑level monitoring panel offers a powerful, centralized view of key performance indicators, helping IT operations, marketing, and finance teams quickly spot trends and anomalies.

Nacos Enable Metrics

To expose Nacos metrics for Prometheus, edit /etc/kubernetes/addons/nacos/application.properties to include management.endpoints.web.exposure.include=*, then create a ConfigMap:

$ cat /etc/kubernetes/addons/nacos/application.properties
#***********Expose prometheus and health **************************#
management.endpoints.web.exposure.include=*

$ kubectl -n nacos create configmap nacos-config --from-file=application.properties=/etc/kubernetes/addons/nacos/application.properties --dry-run=client -o yaml | kubectl apply -f -
configmap/nacos-config configured

Prometheus Scrape Nacos Metrics

Add a job named nacos to the Prometheus configuration:

$ kubectl -n kube-system edit cm prometheus
- job_name: nacos
  metrics_path: /nacos/actuator/prometheus
  scheme: http
  kubernetes_sd_configs:
  - role: endpoints
  relabel_configs:
  - action: keep
    source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_endpoints_name, __meta_kubernetes_endpoint_port_name]
    regex: nacos;nacos;server

Verify collection with a curl query:

$ curl -s $(kubectl -n kube-system get svc prometheus -ojsonpath='{.spec.clusterIP}:{.spec.ports[0].port}')/prometheus/api/v1/query --data-urlencode 'query=up{job=~"nacos"}' | jq '.data.result[] | {job: .metric.job, instance: .metric.instance ,status: .value[1]}'

Grafana Dashboard for Nacos

Import the official Nacos Grafana dashboard JSON from the repository https://github.com/nacos-group/nacos-template/blob/master/nacos-grafana-upper-2.4.json to visualize the metrics.

Conclusion

The NSCOS enterprise monitoring panel provides a centralized, visual interface for key business indicators, enhancing internal communication, cross‑department collaboration, and strategic decision‑making during digital transformation.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

monitoringKubernetesmetricsNacosPrometheusGrafana
Linux Ops Smart Journey
Written by

Linux Ops Smart Journey

The operations journey never stops—pursuing excellence endlessly.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.