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:

<code>$ 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
</code>

Prometheus Scrape Nacos Metrics

Add a job named

nacos

to the Prometheus configuration:

<code>$ 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
</code>

Verify collection with a curl query:

<code>$ 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]}'
</code>

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.

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

login 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.