• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

Monitor NCache using Grafana

Note

This feature is only available in NCache Enterprise Edition

NCache provides a Grafana Application Plugin that collects and displays NCache metrics data from your cluster using Prometheus as data source. These metrics are published by NCache Cluster to Prometheus which are then queried by the Grafana Application.

Configure Grafana for NCache Monitoring

Follow these steps to configure Grafana application to monitor NCache metrics on a feature-rich metrics dashboard:

Note

Grafana currently supports Prometheus 2.3.7.1 (LTS) or above.

Prerequisites

  • To use Grafana, you need to configure monitoring of NCache using Prometheus as Grafana collects the metrics published on the 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 configured and running.
  • Go to the %NCHOME%/config/monitoring.ncconf file in Windows and the /opt/ncache/config/monitoring.ncconf file in Linux and ensure the following counters are set to true based on your requirements.
    1. For Distributed Cache, enable the following counters from the NCache Category
      • Request/sec
      • Average us/Cache Operations
      • Additions/sec
      • Fetches/sec
      • Updates/sec
      • Deletes/sec
      • Cache Size (MB)
      • NCache CPU Usage
      • NCache Memory Usage (MB)
      • Count
      • Expirations/sec
      • Evictions/sec
    2. For Distributed Cache with Persistence, enable the following counters from the NCache Persistence Category
      • Requests/sec
      • Average us/Cache Operations
      • Additions/sec
      • Fetches/sec
      • Updates/sec
      • Deletes/sec
      • Db Reads/sec
      • Db Writes/sec
      • PersistQ Count
      • Count
      • NCache CPU Usage
      • NCache Memory Usage (MB)
    3. For Pub/Sub Messaging, enable the following counters from the NCache Category
      • Request/sec
      • Messages Count
      • Messages Published/sec
      • Messages Delivered/sec
      • Messages Expired/sec
      • Cache Size (MB)
      • Message Store Size
      • NCache CPU Usage
      • NCache Memory Usage
      • Topics Count
      • Evictions/sec
      • Average us/Cache Operations
    4. For Distributed Lucene with Persistence, enable the following counters from the NCache Lucene Category
      • Request/sec
      • Searches/sec
      • Additions/sec
      • Fetches/sec
      • Updates/sec
      • Deletes/sec"
      • Index Size
      • NCache CPU Usage
      • NCache Memory Usage
      • Documents
      • Evictions/sec
      • Expirations/sec
    5. For Client, enable the following counters from the NCache Client Category
      • Average Item Size
      • Read Operations/sec
      • Write Operations/sec
      • Additions/sec
      • Updates/sec
      • Fetches/sec
      • Avg us/Add
      • Avg us/Update
      • Avg us/Fetch
    6. For Bridge, enable the following counters from the NCache Bridge Category
      • Bridge Cache Size
      • Bridge Cache Count
      • Bridge Operations Sent
      • Bridge Operations Sent/sec
      • Bridge Operations Received
      • Bridge Operations Received/sec
      • Queue Count
      • Replicator Queue Count
      • Replicator Queue Size

Set Up Grafana Application

Note

Grafana version 9.1.4 and above are supported in this setup.

  • 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 six major dashboard plugins as JSON files:

  1. Distributed Cache Dashboard for cache server counters.
  2. Distributed Cache with Persistence Dashboard for persistence store counters.
  3. Pub/Sub Messaging Dashboard for the pub/sub message store counters.
  4. Distributed Lucene with Persistence Dashboard for Lucene counters.
  5. Client Dashboard for client cache counters.
  6. Bridge Dashboard for bridge and bridge cache counters.

Follow the steps provided below to configure NCache plugin in your Grafana application:

  • Download NCache Grafana plugin, unzip the downloaded file and place the NCache folder (found inside the extracted ncache-grafana folder) on this path %GRAFANA-INSTALL-DIR%\grafana\plugins-bundled\internal\input-datasource.

  • Go to %GRAFANA-INSTALL-DIR%\conf\default.ini file, set app_mode=development.

  • Restart the Grafana service.

  • Run Grafana (which should open on the default port 3000).

  • Go to Configuration -> Plugins.

  • On the search bar, search for NCache.

  • Click on Enable to add the NCache plugin.

Tip

Go to Dashboards tab of Plugins/NCache to view all dashboards shipped with this plugin. You can delete/re-import these dashboards from here.

Important

Please ensure that the NCacheSvc and NBridgeSvc services are running using your Windows Task Manager and it is best if you restart them.

Enabling the NCache plugin will preload the following dashboards in your application:

Distributed Cache Dashboard

NCache Distributed Cache Dashboard Grafana

Distributed Cache with Persistence Dashboard

NCache Distributed Cache with Persistence Dashboard

Pub/Sub Messaging Dashboard

NCache Pub/Sub Messaging Dashboard

Distributed Lucene with Persistence Dashboard

NCache Distributed Lucene with Persistence Dashboard

Client Dashboard

NCache Client Dashboard Grafana

Bridge Dashboard

NCache Bridge Dashboard Grafana

Tip

If your dashboards are not working try reimporting them as you did during intial installation.

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.

Create New Grafana Dashboard

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

Note

Click on the Add panel Add Panel Button in Grafana button and follow the same steps to add more monitoring panels to your custom dashboard.

NCache Counters on Grafana Dashboard

See Also

Monitor NCache using Web Monitor
Monitor NCache using PerfMon Tool
Monitor NCache using Prometheus
Monitor NCache using SNMP Counters

Back to top Copyright © 2017 Alachisoft