Monitor NCache using Grafana
NCache supports integration with Grafana application that collects and displays metrics data from your NCache cluster. It uses Prometheus server as its data source from where all metrics are pulled.
Configure Grafana for NCache Monitoring
Follow these steps to configure Grafana application to monitor NCache metrics on a feature-rich metrics dashboard:
- To use Grafana, you need to configure monitoring of NCache using Prometheus as Grafana collects the metrics published on Prometheus server. To know how to enable monitoring using Prometheus, refer to Monitor NCache using Prometheus.
- NCache service must be running.
- The caches you want to monitor should be started.
Set Up Grafana Application
Install Grafana application on the machine from where you want to monitor your NCache servers. Refer to Grafana Getting Started guide to find the steps required to set up Grafana on your machine.
Once setup, you need to configure Prometheus server as Grafana's data source. Follow the add data source guide to add Prometheus as default data source.
Create Dashboard for NCache Monitoring
After you have configured your Prometheus server as data source, you can go ahead and start creating monitoring dashboards. There are two ways through which you can create a dashboard with multiple panels showing NCache counters. You can use an NCache plugin that includes pre-configured dashboards or you can create your custom dashboard and populate it with NCache metrics.
Use NCache Plugin to Create Dashboard
NCache provides three major dashboard plugins as JSON files:
- Cache dashboard for cache server counters.
- Client dashboard for client cache counters.
- Bridge dashboard for bridge and bridge cache counters.
Follow the steps provided below to configure NCache plugin in your Grafana application:
Go to Grafana Marketplace and search for NCache. This will show you the NCache application that holds the pre-configured dashboards.
Go to Configuration -> Plugins.
On the search bar, search for NCache.
Click on Enable to add NCache plugin.
Go to Dashboards tab of Plugins/NCache to view all dashboards shipped with this plugin. You can delete/re-import these dashboards from here.
- Enabling NCache plugin will preload the following dashboards in your application:
- Cache Dashboard: Cache dashboard includes panels to monitor cache servers.
- Client Dashboard: Client dashboard includes panels to monitor cache clients.
- Bridge Dashboard: Bridge dashboard includes panels to monitor bridge and bridge caches.
Create Custom Dashboard
After you have configured your Prometheus server as data source, you can go ahead and start creating monitoring dashboards.
To create a new monitoring dashboard, go to Create -> Dashboard -> Add New Panel.
Under Metrics, select ncache. This will show you the list of all metrics collected from Prometheus server.
From the list, select the metric you want to monitor in that panel. You can customize this panel as well. Follow Grafana's guide on Dashboards to know how you can play around with this panel.
Click on Apply to apply these configurations to your dashboard.
Save the dashboard by assigning a name to it.
Click on the Add panel button and follow the same steps to add more monitoring panels to your custom dashboard.