Monitor NCache Using SNMP Counters
SNMP, which is short for Simple Network Management Protocol is considered to be a standard protocol through which different devices on a network communicate and share information with each other. NCache now provides support for monitoring of its counters using SNMP.
Configure NCache for SNMP Monitoring
You have to follow some steps before you are able to monitor NCache counters using SNMP. These steps are as follows.
Pre-requisites
- If you are using a windows machine, you have to enable SNMP on it. On Linux it is enabled by default.
- NCache service must be running
- The cache(s) which you wish to monitor must be up and running.
Configure NCache Service Config
The Alachisoft.NCache.Service.dll.config
config file shipped at %NCHOME%/bin/service allows you to enable and disable cache counter monitoring via SNMP through configurable tags. These tags are as follows:
<add key="NCacheServer.EnableSnmpMonitoring" value="true"/>
<add key="NCacheServer.SnmpListenersInfoPort" value="8256"/>
<add key="NCacheServer.EnableMetricsPublishing" value="false"/>
Important
The value for NCacheServer.EnableMetricsPublishing
tag must be set to true
in order to monitor NCache counters using SNMP.
The
NCacheServer.EnableSnmpMonitoring
tag allows you to enable/disable the monitoring of NCache cache counters via SNMP. On Windows this tag is set tofalse
by default.The
NCacheServer.SnmpListenersInfoPort
tag allows you to configure the port at which SNMP listens to. By default the value of this is set to8256
, but you can change this value as per your requirements.The
NCacheServer.EnableMetricsPublishing
tag is used to enable metrics publishing to NCache service. By default, this tag is set to false. You can enable metrics publishing by setting this tag's value as true.
Note
Make sure to restart the NCache service after you have made the respective changes to the service config files
Monitoring Using SNMP
MIB, which is short for Management Information Base is a key component of SNMP. It is a text file where SNMP network elements are described as a list of data objects. Consider the MIB as a dictionary of the SNMP langugage, where every object that is being referred in an SNMP message must be listed in the MIB. If a network component isn't described in the MIB, it practically doesn't exist.
NCache provides the MIB files for the counters which can be monitored with SNMP. These are shipped at %NCHOME%/bin/resources. The MIB files are as follows:
alachisoft-bridge.mib
is used for monitoring the counters of the bridge. The bridge itself is used for the purposes of WAN replication. It contains components like the queue and the replicator queue etc. For more details on the bridge click here.alachisoft-bridgedcache.mib
is used for monitoring the counters of the bridge cache. The bridge cache refers to the cache that is present inside the bridge itself.alachisoft-cache.mib
is used for monitoring the counters of the cache.alachisoft-client.mib
is used for monitoring the counters of the cache client.alachisoft-metric-listeners.mib
is the main file for SNMP monitoring. It basically informs you about all the ports where the cache, bridge, bridge cache and client counters are being published.
To monitor these cache counters with SNMP you have to load these MIB files into the tool which you are using for monitoring the network or browsing MIB files.
See Also
Cache Counters
Monitor NCache Using Prometheus
Monitor NCache Using Grafana