System monitoring is an important part of daily administrative tasks. Following our recent webinars, showing the ways we can monitor our Open-E DSS V7, we decided to prepare a how-to instruction for you.
We will show you how to configure the necessary tools, update your Open-E DSS V7 and finally, access and use the monitoring interface.
What is Nagios, OMD and check_mk?
Before we jump into a configuration process, you may need a quick introduction to the tools we will mention in this post.
Nagios is one of the most popular open-source monitoring software applications. It offers monitoring and alerting for servers, switches, applications and services.
OMD (Open Monitoring Distribution) bundles Nagios together with many important add-ons and can easily be installed on every major Linux distribution. Using it, we can avoid compiling and integrating Nagios add-ons manually.
Check_mk is a status GUI written in Python which supports user definable views and is able to display the status of several sites in one combined view. A very intuitive design and an easy operation are one of the strongest points of this tool.
The following instruction was made in Ubuntu. However, a similar configuration can be made in other Linux distributions.
Installing and configuring OMD
We start with the installation and configuration of OMD packages. Please follow the steps below:
- From root level*, update and upgrade your distribution’s package index using the following commands:
In addition you can upgrade your distribution’s kernel:
*You may need to use “sudo su –” command, as Ubuntu do not login root by default.
- In order to install the OMD package, go to OMD website and navigate to Downloads section.
- Go to package repositories and choose the relevant version of the repository (in our case it will be “Ubuntu Precise 12.04”).
- Install the relevant GPG key in Ubuntu.
gpg --keyserver keys.gnupg.net --recv-keys F8C1CA08A57B9ED7
gpg --armor --export F8C1CA08A57B9ED7 | apt-key add -
- Next, we enable the stable release repository (in our case, it is the one dedicated to Ubuntu Precise 12.04):
echo 'deb https://labs.consol.de/OMD/ubuntu precise main' >> /etc/apt/sources.list
- Following the installation, we run apt-get update to refresh our distribution repository:
- We then install the OMD:
apt-get install omd-0.56
Following the installation of OMD repository, we go to our Open-E DSS V7 server to perform an additional configuration and install a small update.
Applying the small update to Open-E DSS V7
To install the necessary update, we need to log in to our Open-E DSS V7 GUI and do the following:
- From the Maintenance tab, select System update and navigate to System software update.
- Click Choose File to pick the small update upd_70139-DSS-V7.upd, then click on upload and apply.You will then need to manually restart the system.
- Go to Maintenance tab, Shutdown, find System Restart and click on Restart button in order to reboot the server.
After the installation, the small update will be visible in the menu (it can be removed by clicking on the trash bin).
Enabling API in Open-E DSS V7
- Go to Setup tab and Administrator settings, then navigate to CLI/API Configuration.
- Tick the box to Use CLI/API, then specify port – 22223 and password.
- In order to use the CLI/API functionality without password, you need to generate ssh key. You can do it by expanding show advanced menu and clicking on the generate and download button.
- Save the file in the relevant location (in this example, we will call it “dss60.key”).
To be able to use the ssh key in our Linux distribution, we may create a NAS share and then mount it in Ubuntu.
- After creating a NAS share, enable SMB with “Guest” access and NFS access (with default settings) for that share, so you will be able to use it under Ubuntu.
- Connect to the created share (via IP address of your storage server e.g. Run -> \\192.168.232.60) and copy the ssh key to the “Test” share.
- In Ubuntu, create directory /mnt/test:
- Mount our Open-E DSS V7 share to that location:
mount –t nfs 192.168.232.60:/test /mnt/test
- Now, you can copy the file to the OMD folder (/opt/omd) – created during installation. You can use midnight commander to copy the file.
- The next step is the creation of a new site (ours will be called “dssmonitor”)
omd create dssmonitor
What you get is:
- • a site directory with preconfigured configuration files
- • a new user “dssmonitor” and a new group “dssmonitor” (identical with the name of your site). The new user is also a member of the group omd, which is created during installation.
- Then, we start the omd on our newly created site:
We are now ready to perform an additional configuration of OMD.
- We edit the file “/opt/omd/sites/dssmonitor/etc/check_mk/main.mk” (we can use mcedit command for that purpose):
- In the relevant space, we insert the host’s IP and type of the protocol used:
all_hosts = [‘192.168.232.60|ssh’]
- Next, we append the following entries, to define commands that will be used to connect to API (see convention below):
datasource_programs = [ (“ssh –p default port number – i ssh key's location path –l username for API + host IP + command that will be run over API to DSS, [‘protocol used’] , in which section our monitoring statuses will be shown), ]
In our case, it will be:
datasource_programs = [ (“ssh –p 22223 –i /omd/dss60.key –l api 192.168.232.60 check_mk_agent”, [‘ssh’], ALL_HOSTS ), ]
- Save changes to file.
- The important part is to ensure the correct ownership (our OMD user) and access permission (read and execute for owner only) of our ssh key.
- To change the owner of our ssh key file, we use the following command:
chown dssmonitor /omd/dss60.key
- To change access permission, so only the owner has read and execute rights, we use:
chmod 500 /cmd/dss.key
- Then, we log to OMD as dssmonitor using “su” command:
- To test the configuration, we can run “api” command:
ssh –p 22223 –i /omd/dss60.key –l api 192.168.232.60 check_mk_agent
When prompted to continue connecting type yes.
The output will be returned in the terminal, which will later be interpreted in check_mk tool.
- We need to run two more commands:
First will do the following: retrieve data from our Open-E DSS V7, find all available services, and list them:
The second, will reload the OMD configuration and validate that it is working properly:
Monitoring the Open-E DSS V7
- In order to check the status of our Open-E DSS V7 in OMD, go to your internet browser and navigate to the following address: your Ubuntu IP*/name of your site – in our case it will be:
*you can check the IP of your Ubuntu using the ifconfig command
- When prompted for a username and password – the default credentials are:
- We will then be able to choose one of the available GUIs. In our example we will go for “Check_MK Multisite”
- When in GUI, from available views, choose Hosts -> All hosts, and select the relevant host (see below).
You will then see the statuses of all available services (that are being monitored by the tool):
You will also have access to detailed statistics (including graphs) about each service:
The services that you can monitor with the tool include:
- CPU load
- CPU utilization
- Disk IO Summary
- NI information
- Memory utilization
- TCP connections
- NAS Volume space taken
- and many more…
Check out the videos below and watch our engineers performing the same configuration (English and German version).