Monitor QNAP NAS devices with vROPS SNMP Adapter

SNMP AdaptervRealize Operations (vROPS) is a great tool to monitor your vSphere environment. What’s so great about vROPS is that it can be extended with (3rd-party) Management Packs to communicate with a wide variety of infrastructure components such as servers, network switches and storage devices and integrate the provided metrics into vROPS to monitor your complete infrastructure stack. But what if there’s no Management Pack available for your device? This is where you can use the vROPS SNMP Adapter.

The SNMP adapter comes with the latest vROPS Management Pack for SNMP. Earlier versions of the SNMP adapter only supported SNMP v1. Support has been added for SNMP v2c and v3. 

The Management Pack also includes automatic discovery of SNMP devices, build-in support for common MIB’s, adding custom MIB’s and the availability of predefined MIB statistics.

In this blogpost I’ll explain how to download and install a QNAP MIB file, add and configure a SNMP Adapter instance, add and configure a policy to monitor specific QNAP SNMP metrics and build a dashboard to visualize and monitor QNAP NAS device KPI’s.

Installation of the vROPS Management Pack for SNMP requires a vRealize Operations 8.1 Advanced or Enterprise environment.

Enable SNMP on the QNAP NAS device

  1. Login to the QNAP Management GUI with admin rights.
  2. Go to Control Panel. Under Network & File Services, select SNMP.SNMP Adapter
  3. Enable SNMP Service.
  4. Select which traps you want to receive.
  5. Enter the IP address of your vROPS server as trap receiver.
  6. Select the SNMP version you want to use, V1/V2 or V3.
  7. Enter a community string and credentials depending on the SNMP version you have chosen.
  8. Download the NAS SNMP MIB file by clicking the Download button.
  9. Finally click Apply.SNMP Adapter

Install the SNMP Management Pack and add NAS MIB file to vROPS

  1. Download the PAK file from VMware Marketplace and save it in a temporary folder on your local system.
  2. Login to vROPS with admin rights.
  3. In the top menu, select Administration.
  4. In the left menu, select Repository. Scroll down and click Add/Upgrade.
  5. Select the downloaded PAK file and click Upload.
  6. Accept the EULA, click Next.
  7. When the installation is complete, click Finish.SNMP Adapter

MIB’s define the management information and structure of the information available via SNMP for a specific device. Before monitoring any device via SNMP with vRealize Operations, the proper MIB’s must be available to support the collection and processing of the SNMP information. VMware already included a collection of commonly utilized MIB’s in the SNMP Management Pack. The complete list of MIB’s included in the SNMP Management Pack can be found here. In my case I want to use the MIB file I downloaded from my QNAP NAS device.

  1. Make sure SSH is enabled on your vROPS node(s).
  2. Login with root using SSH.
  3. Copy the NAS MIB file to $ALIVE_BASE/user/plugins/inbound/snmp_adapter3/conf/mibs.SNMP Adapter
  4. Provide executive permissions to the file in $ALIVE_BASE/user/plugins/inbound/snmp_adapter3/conf.SNMP Adapter
  5. Run the updateMibs script and check the mib-import.log for errors.SNMP Adapter
  6. Open the describe.xml file and increase the version number. For example, if the version is ‘8’, change it to ‘9’.SNMP Adapter
  7. If you have more then one vROPS node, you have to repeat step 3 through 6 on every node.
  8. Go back to the vROPS GUI. On the Administration page, in the left menu, select Support.
  9. Under Support, select Redescribe. Click Redescribe.SNMP Adapter
  10. When the redescribe operation is successfully completed you can select the NAS MIB from the MIB file drop-down menu when you configure the SNMP adapter instance.

Add a SNMP Adapter instance

  1. On the vROPS Administration page, in the left menu, select Other Accounts.
  2. Click Add Account. Select SNMP Adapter.
  3. Enter a name for the Adapter instance.
  4. Enter a Start and End IP for the discovery.
  5. Select the NAS MIB file.
  6. Add a credential by clicking on the + button.
  7. Select the credential kind.
  8. Give the credential a name and enter the community string and username and password if you have chosen for SNMP v3. Click Ok.SNMP Adapter
  9. If you successfully validated the connection click Save.SNMP AdapterSNMP Adapter

Add a Custom Group

  1. In the vROPS top menu, select Environment.
  2. Select the Custom Groups tab. Click Add.
  3. Enter a name for the Group, for example QNAP NAS devices, and select Environment as Group Type.
  4. Under Object to always Include, search and select the QNAP NAS device(s), click Add and then Ok.SNMP Adapter

Create a policy to collect SNMP data

  1. On the vROPS Administration page, in the left menu, select Policies.

  2. Go to the Policy Library tab and click Add.

  3. Enter a name for the Policy.

  4. Under Start with:, select the vSphere Solution’s Default Policy as Base Policy.SNMP Adapter

  5. Under Collect Metrics and Properties, select NAS.mib as Object Type. This wil show you all the metrics available in the QNAP NAS MIB file.

  6. Use the filter and search for systemCPU-Usage. This will show you one entry,
    NAS-MIB| iso|org|dod|internet|private|enterprises|storage|storageSystem|systemInfoEx|systemCPU-UsageEX

  7. Change the state of this metric from Inherited to Local.SNMP Adapter

  8. Repeat these steps for the metrics:

    • systemFreeMemEX
    • systemTemperatureEX
    • cpu-TemperatureEX
    • sysFanSpeedEX
  9. Under Apply Policy to Groups, select the QNAP NAS devices group. Click Save.SNMP Adapter

Create a dashboard to visualize the SNMP data

In my case I wanted to have an overview dashboard of my QNAP NAS devices and their actual state. Also, did I want it to be able to select a specific QNAP NAS device and see the average, minimum and maximum over a one week period.

So, first I builded five Views for CPU Usage, Free Memory, System Temperature, CPU Temperature and System FAN Speed.

  1. In the vROPS top menu, select Dashboards.
  2. In the left menu, select Views.
  3. Click on the Actions drop-down button and select Create View.
  4. Enter a name for the view, for example QNAP CPU Usage.
  5. Select List for Presentation.
  6. Select NAS.mib for Subjects.
  7. In the filter, search for systemCPU-Usage. Drag this metric to the right to include it in the view. Do this four times.SNMP Adapter
  8. Select the Data tab and edit the Transformation configuration of the four metrics. Change the first metric in to Last, second metric in to Average, third metric in to Minimum and fourth metric in to Maximum. Also enter a Label name for each metric.SNMP Adapter
  9. Select the Time Settings tab and change the Time Range accordingly. In my case, I use 7 Days (or 1 Week).SNMP Adapter
  10. Select the Summary tab, click on the + button and change the Summary title into CPU Usage (%). Click Save.SNMP Adapter
  11. You can see the result of your View by selecting a Preview Source. In my case, one of my QNAP NAS devices.SNMP Adapter
  12. Repeat step 3 through 10 to build a view for the metrics:
    • systemFreeMemEX
    • systemTemperatureEX
    • cpu-TemperatureEX
    • sysFanSpeedEX

Then I created a Dashboard with several widgets. The first widget I added was a Scoreboard with a custom color schema for the actual state of the NAS devices, then I added an Object List where you can select each NAS device and use this as input for the five View widgets I created earlier.

  1. In the vROPS top menu, select Dashboards.
  2. In the left menu, select Dashboards.
  3. Click on the Actions drop-down button and select Create Dashboard.
  4. Select the Scoreboard widget and drag it on the Dashboard.
  5. Click on the pencil to edit the configuration of the Scoreboard widget.SNMP Adapter
  6. Enter a name for the scoreboard, for example QNAP System KPI’s.
  7. Under Configuration, change Refresh Content and Self Provider from Off to On.
  8. Change the Visual Theme from Default to Opaque and select Sparkline to Show.
  9. Change the Period Length to Last 24 hours.
  10. Change Layout Mode to Fixed Size and show Old Metric Values.SNMP Adapter
  11. Under Input Data, select Metrics and click on the + button.
  12. In the first filter, enter the IP address of your QNAP NAS device and select your NAS device object.
  13. In the second filter, enter systemCPU-Usage and select the yellow metric. Click Ok.SNMP Adapter
  14. Repeat step 11 through 13 for all your NAS devices and the metrics:
    • systemFreeMemEX
    • systemTemperatureEX
    • cpu-TemperatureEX
    • sysFanSpeedEX
  15. Enter a Box Label and Unit for each metric. Also change the Color Method from Symptom to Custom and enter values for Yellow, Orange and Red.SNMP Adapter
  16. Click Save.
  17. Select the Object List widget and drag it on the Dashboard.
  18. Click on the pencil to edit the configuration of the Object List widget.
  19. Enter a name for the Object List, for example Select QNAP NAS device.
  20. Under Configuration, change Self Provider from Off to On.SNMP Adapter
  21. Under Input Data, select Objects and click on the + button.
  22. Enter the IP address of your NAS device in the filter and select the NAS device object. Click Ok. Repeat this step for all your NAS devices.SNMP Adapter
  23. Click Save.
  24. Toggle from Widgets to Views and select the List widget and drag it on the Dashboard.
  25. Click on the pencil to edit the configuration of the List widget.SNMP Adapter
  26. Enter a name for the List View, for example System CPU Usage (1 week).
  27. Under Output Data, select the System CPU Usage View you created earlier. Click Save.SNMP Adapter
  28. Repeat step 24 through 27 for the other four Views, System Free Memory, System Temperature, CPU Temperature and System Fan Speed.
  29. In the dashboard, click Show Interactions and drag a line from the Object List output to each View input.SNMP Adapter
  30. Save the Dashboard.SNMP Adapter

This is just a very simple example of what you can do to visualize important information of your infrastructure components using SNMP. I already connected my QNAP NAS Devices to vRealize Log Insight to gather the logs and and send login alerts to vROPS in my dashboard. In a next release of my dashboard I’m adding also availability and performance data of the physical disks, volumes and LUN’s.