.. _Monitoring Storage Cluster Objects via SNMP: Monitoring Storage Cluster Objects via SNMP ------------------------------------------- You can monitor cluster objects via the Simple Network Management Protocol (SNMP). The implementation conforms to the same Structure of Management Information (SMI) rules as the data in the standard SNMP context: all objects are organized in a tree; each object identifier (OID) is a series of integers corresponding to tree nodes and separated by dots. General information: - The OID of the root subtree with all the objects you can monitor is 1.3.6.1.4.1.8072.161.1. - The ``VSTORAGE-MIB.txt`` information base file is required to monitor the objects. You can download the file at ``https://:8888/api/v2/snmp/mibs/``. The following subsections describe ways to enable and use SNMP to monitor cluster objects. .. _Enabling SNMP Access: Enabling SNMP Access ~~~~~~~~~~~~~~~~~~~~ To monitor cluster objects, enable the SNMP access on the node. Do the following in the admin panel: #. Open UDP port 161 on the management node as follows: #. On the **INFRASTRUCTURE** > **Networks** screen, click **Edit**. #. Add the **SNMP** traffic type to your public network by ticking the corresponding checkbox. #. Click **Save** to apply changes. #. On the **SETTINGS** > **Advanced settings** > **SNMP** tab, check **Enable SNMP on management node**. The network management system (SNMP monitor) will be enabled, giving you access to the cluster via the SNMP protocol. .. only:: ac .. image:: /images/stor_image28_7_ac.png :align: center :class: align-center .. only:: vz .. image:: /images/stor_image28_7_vz.png :align: center :class: align-center #. Click the provided link to download the MIB file and set it up in your SNMP monitor. #. If required, have |product_name| send SNMP traps to your SNMP monitor. Do the following: #. Check **Send SNMP traps to this network management system**. #. Specify the **IP address** of the system, and, if required, change the default **Port** and **Community**. #. If required, click **SEND TEST TRAP** to test the service. #. Click **SAVE** to apply changes. .. _Accessing Storage Cluster Information Objects via SNMP: Accessing Storage Cluster Information Objects via SNMP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can access storage cluster information objects with SNMP tools of your choice, e.g., the free Net-SNMP suite for Linux. To obtain storage cluster information on a node with the admin panel, place the MIB file to ``/usr/share/snmp/mibs`` and run the ``snmpwalk`` command. For example: .. only:: latex :: # snmpwalk -M /usr/share/snmp/mibs -m VSTORAGE-MIB -v 2c -c public \ localhost:161 VSTORAGE-MIB:cluster .. only:: html :: # snmpwalk -M /usr/share/snmp/mibs -m VSTORAGE-MIB -v 2c -c public localhost:161 VSTORAGE-MIB:cluster Typical output may be the following: :: VSTORAGE-MIB::clusterName.0 = STRING: "cluster1" VSTORAGE-MIB::healthStatus.0 = STRING: "healthy" VSTORAGE-MIB::usedSpace.0 = Counter64: 173732322 VSTORAGE-MIB::totalSpace.0 = Counter64: 1337665179648 VSTORAGE-MIB::freeSpace.0 = Counter64: 1318963253248 VSTORAGE-MIB::licenseStatus.0 = STRING: "unknown" VSTORAGE-MIB::licenseCapacity.0 = Counter64: 1099511627776 VSTORAGE-MIB::licenseExpirationStatus.0 = STRING: "None" VSTORAGE-MIB::ioReadOpS.0 = Counter64: 0 VSTORAGE-MIB::ioWriteOpS.0 = Counter64: 0 VSTORAGE-MIB::ioReads.0 = Counter64: 0 VSTORAGE-MIB::ioWrites.0 = Counter64: 0 VSTORAGE-MIB::csActive.0 = Counter64: 11 VSTORAGE-MIB::csTotal.0 = Counter64: 11 VSTORAGE-MIB::mdsAvail.0 = Counter64: 4 VSTORAGE-MIB::mdsTotal.0 = Counter64: 4 <...> .. _Listening to SNMP Traps: Listening to SNMP Traps ^^^^^^^^^^^^^^^^^^^^^^^ To start listening to SNMP traps, do the following: #. Configure the ``snmptrapd`` daemon to log SNMP traps, allow them to trigger executable actions, and resend data to the network. To do this, add the following ``public`` community string to the ``/etc/snmp/snmptrapd.conf`` file: :: authCommunity log,execute,net public #. Start the daemon and specify the MIB file: :: # snmptrapd -M /usr/share/snmp/mibs -m VSTORAGE-MIB -n -f -Lf /tmp/traps.log #. Send a test trap from the **SETTINGS** > **Advanced settings** > **SNMP** tab in the admin panel. #. View the log file: :: # tail -f /tmp/traps.log 2017-04-23 02:48:18 UDP: [127.0.0.1]:58266->[127.0.0.1]:162 [UDP: \ [127.0.0.1]:58266->[127.0.0.1]:162]: SNMPv2-SMI::mib-2.1.3.0 = Timeticks: (1687405) 4:41:14.05 \ SNMPv2-SMI::snmpModules.1.1.4.1.0 = OID: VSTORAGE-MIB::generalAlert \ VSTORAGE-MIB::trapType = STRING: Test Case VSTORAGE-MIB::trapMsg = \ STRING: This Is Text Message to end-user \ VSTORAGE-MIB::trapPriority = Counter64: 1 The test trap is considered a ``generalAlert``. .. _Monitoring the Storage Cluster with Zabbix: Monitoring the Storage Cluster with Zabbix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To configure cluster monitoring in Zabbix, do the following: #. On the **SETTINGS** > **Advanced settings** > **SNMP** tab, click the provided link to download a template for Zabbix. .. note:: The template is compatible with Zabbix 3.x. #. In Zabbix, click **Configuration** > **Templates** > **Import** and **Browse**. .. image:: /images/stor_image28_1.png :align: center :class: align-center #. Navigate to the template, select it, and click **Import**. #. Click **Configuration** > **Hosts** > **Create host**. .. image:: /images/stor_image28_2.png :align: center :class: align-center #. On the **Host** tab, do the following: #. Specify the **Host name** of the management node and its **Visible name** in Zabbix. #. Specify ``vstorage`` in the **New group** field. #. **Remove** the **Agent Interfaces** section. #. **Add** an **SNMP interfaces** section and specify the management node IP address. #. On the **Templates** tab, click **Select** next to the **Link new templates** field. #. In the **Zabbix Server: Templates** window, check the ``Template VStorageSNMP`` template and click **Select**. .. image:: /images/stor_image28_3.png :align: center :class: align-center #. Back on the **Templates** tab, click the **Add** link in the **Link new templates** section. The ``VStorageSNMP`` template will appear in the **Linked templates** group. .. image:: /images/stor_image28_4.png :align: center :class: align-center #. Having configured the host and added its template, click the **Add** button. .. image:: /images/stor_image28_5.png :align: center :class: align-center In a few minutes, the cluster's ``SNMP`` label in the **Availability** column on the **Configuration** > **Hosts** screen will turn green. .. image:: /images/stor_image28_6.png :align: center :class: align-center To monitor cluster's parameters, open the **Monitoring** > **Latest data** screen, set the filter's **Host groups** to ``vstorage`` and click **Apply**. You can create performance charts on the **Configuration** > **Hosts** > **** > **Graphs** tab and a workplace for them on the **Monitoring** > **Screens** tab. .. _Storage Cluster Objects and Traps: Storage Cluster Objects and Traps ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cluster-related objects that you can monitor: **VSTORAGE-MIB:cluster** General cluster information. **VSTORAGE-MIB:csStatTable** Chunk server statistics table. **VSTORAGE-MIB:mdsStatTable** Metadata server statistics table. **VSTORAGE-MIB::clusterName** Cluster name. **VSTORAGE-MIB::healthStatus** Cluster health status. **VSTORAGE-MIB::usedSpace** The space occupied by all data chunks and their replicas plus the space occupied by any other data stored on cluster nodes' disks. **VSTORAGE-MIB::totalSpace** The total space on all cluster nodes' disks. **VSTORAGE-MIB::freeSpace** The unused space on all cluster nodes' disks. **VSTORAGE-MIB::licenseStatus** License status. **VSTORAGE-MIB::licenseCapacity** The maximum disk space available as defined by license. **VSTORAGE-MIB::licenseExpirationStatus** License expiration status. **VSTORAGE-MIB::ioReadOpS** Current read speed in operations per second. **VSTORAGE-MIB::ioWriteOpS** Current write speed in operations per second. **VSTORAGE-MIB::ioReads** Current read speed in bytes per second. **VSTORAGE-MIB::ioWrites** Current read write in bytes per second. **VSTORAGE-MIB::csActive** The number of active chunk servers. **VSTORAGE-MIB::csTotal** The total number of chunk servers. **VSTORAGE-MIB::mdsAvail** The number of running metadata servers. **VSTORAGE-MIB::mdsTotal** The total number of metadata servers. **VSTORAGE-MIB::s3OsAvail** The number of running S3 object servers. **VSTORAGE-MIB::s3OsTotal** The total number of S3 object servers. **VSTORAGE-MIB::s3NsAvail** The number of running S3 name servers. **VSTORAGE-MIB::s3NsTotal** The total number of S3 name servers. **VSTORAGE-MIB::s3GwAvail** The number of running S3 gateways. **VSTORAGE-MIB::s3GwTotal** The total number of S3 gateways. CS-related objects that you can monitor: **VSTORAGE-MIB::csId** Chunk server identifier. **VSTORAGE-MIB::csStatus** Current chunk server status. **VSTORAGE-MIB::csIoReadOpS** Current read speed of a chunk server in operations per second. **VSTORAGE-MIB::csIoWriteOpS** Current write speed of a chunk server in operations per second. **VSTORAGE-MIB::csIoWait** The percentage of time spent waiting for I/O operations. Includes time spent waiting for synchronization. **VSTORAGE-MIB::csIoReadS** Current read speed of a chunk server in bytes per second. **VSTORAGE-MIB::csIoWriteS** Current write speed of a chunk server in bytes per second. MDS-related objects you can monitor: **VSTORAGE-MIB::mdsId** Metadata server identifier. **VSTORAGE-MIB::mdsStatus** Current metadata server status. **VSTORAGE-MIB::mdsMemUsage** The amount of memory used by a metadata server. **VSTORAGE-MIB::mdsCpuUsage** The percentage of the CPU's capacity used by a metadata server. **VSTORAGE-MIB::mdsUpTime** Time since the startup of a metadata server. SNMP traps triggered by the specified alerts: **licenseExpired** The license has expired. **tooFewClusterFreeLogicalSpace** Too few free space is left. **tooFewClusterFreePhysicalSpace** Too few physical space is left. **tooFewNodes** Too few nodes are left. **tooFewMdses** Too few MDSs are left. **generalAlert** Other.