Having a monitoring system that works well has become one of the most important prerequisites of any modern IT environment, and with operations expanding and changing quickly, we need a monitoring system that is as flexible and adaptive as possible.
In times where we are seeing companies move to the cloud or using a more service-based environment, effectively monitoring all these various systems is of paramount importance.
In this chapter we will look into some of the concepts behind Opsview and how to install and get started using the various tools provided by Opsview to help us deploy a simple monitoring solution.
Opsview offers an easy to use, highly configurable, and robust monitoring platform, providing IT departments with a unique view into the health of their IT estate.
For those already well versed with the world of monitoring, there are some conceptual differences in how Opsview approaches monitoring in comparison to other solutions (if you are new to the subject, please read on as these concepts will help you understand how Opsview operates).
If you are new to the subject, have a look at the official documentation site for Opsview (http://docs.opsview.com) and the blogs from Opsview (http://www.opsview.com/whats-new).
At its core, Opsview aims to be a single window for your IT operations, giving a centralized, multi-layered view into the heart of your environment and offering a variety of ways to keep it healthy and operating at peak efficiency.
Flexibility is the key part of a system and using smart and adaptive methods allows for a versatile setup, and seemingly complex monitoring challenges can be easily configured and maintained.
Information gathered by Opsview can be viewed in various different forms and depending on what type of data we are looking at, using these different forms can help you better understand and interpret vital information related to your IT operations.
While in most cases being flexible means there are too many options to configure, Opsview aims at being easy to use and easy to configure by using templates, cloning, and automation to vastly simplify running and maintaining a system. Opsview uses the powerful Nagios engine at its core, performing various tasks when users interact with the Opsview web interface (http://your-opsview-system:3000
) to handle all the configuration and display tasks.
Getting your first Opsview system running is actually relatively easy as Opsview offers three different ways of getting started:
Packages
Virtual appliance
On demand
Depending on your requirements you can choose the installation type that suits you best.
Please note that the username/password or even installation instructions might change, so check out the Opsview documentation website for the latest instructions and the Opsview download page (http://www.opsview.com/technology/downloads/opsview-core).
Opsview provides packages for the most common Linux distributions, and if you are already running any of these packages, installing them becomes very easy indeed.
The Linux distributions supported are:
Red Hat Enterprise Linux
Ubuntu (LTS releases)
Debian
SUSE Linux Enterprise
CentOS
For the most up-to-date list of supported systems, visit http://docs.opsview.com/doku.php?id=opsview-core:platforms.
Depending on your operating system, you may need to take some additional steps to address the few prerequisites that Opsview has:
Security-Enhanced Linux extensions (SELinux): Currently, Opsview is not compatible with SELinux, so if SELinux is enabled on your system, you have to disable it.
CentOS: On CentOS systems, RPMForge must be set up to resolve any dependencies Opsview may have, so make sure it is enabled (visit http://repoforge.org for the latest version).
Red Hat Enterprise Linux: On Red Hat EL 6, the Red Hat Optional Server 6 repositories must be enabled in RHN (Red Hat Network).
Both EL 5 and EL 6 systems need to have a recent version of libmcrypt installed, which can be downloaded at
http://dl.fedoraproject.org/pub/epel/<version>/x86_64
. Check the repository for the latest version, and enter it in the URL. For example, the URL http://dl.fedoraproject.org/pub/epel/6/x86_64 is for RHEL 6.Debian/Ubuntu: The Opsview repositories for Debian and Ubuntu are GPG-signed (where GPG stands for GNU Privacy Guard) for security. To prevent issues with APT (Advanced Packaging Tool) not being able to verify the contents of the repository, enter the following in the command line:
sudo gpg --keyserver subkeys.pgp.net --recv-key 0FC6984B sudo gpg --export --armor 0FC6984B | sudo apt-key add -
This will install the APT key for Opsview (on occasions, retrieving the key fails due to an unresponsive pgp.net server; simply wait for a couple of minutes and try again).
SUSE Linux Enterprise: To resolve all dependencies make sure the Extras repo is enabled on your system. For this we type the following command:
zypper mr -e nu_novell_com:SLES11-Extras
Once all the prerequisites are met you can add the repositories, and install Opsview using your favorite package manager.
From the Opsview download page, select the distribution you would like to install as shown in the following screenshot, and you will be redirected to the latest install guides:

Opsview also offers a virtual appliance version of Opsview Core that can be installed into ESX, vSphere, or VMware Player environments.
Download the virtual appliance from the Opsview download page as shown in the following screenshot:

Deploy it and power up the Virtual Machine (VM).
By default, VM is configured to use DHCP (Dynamic Host Configuration Protocol) for an IP address which might be undesirable (the current IP is displayed on the console when the server is running).
You can change this by logging into the server with
SSH (Secure Shell) using both the username and password as conf
and running the NETCONF utility.
The last of the three possible installation methods of Opsview Core is the on-demand version that runs in Amazon EC2.
Running Opsview Core is free of charge, but the EC2 instance will be charged by Amazon.
Opsview Core running on the recommended m1.small general purpose type should be able to monitor up to 250 hosts (the number might vary depending on the number of checks, frequency, and so on).
To install, first make sure you have a working AWS account, then select the datacenter closest to you from the Opsview website, and within seconds you can have a running instance of Opsview Core by simply following the instructions. The selection list is shown in the following screenshot:

Now that we have our Opsview installation up and running, it's time to log in (http://your-opsview-system:3000
) with the default username (admin
) and password (initial
).
During the course of this book, we will be looking at a lot of different items in Opsview. So keep an Opsview system close at hand to try out the various items we will be covering.
The first page we see once we log in is the main status screen, which at the moment will show only the Opsview host group. Simply drill down into the group to get more information about your Opsview system. At the top of the screen we have various menus we can open to perform various tasks in Opsview.
The first very important feature of Opsview is the help system, which we can use while configuring various items; the second is the contextual menu.
To see both in action, go to the settings menu (as shown in the following screenshot) and click on hosts in the Basic column.

This will bring up the host list. The host list shown in the following screenshot shows you all the hosts currently in Opsview. As it has been newly installed, only the default Opsview host is listed.

If you look carefully at the host list, you will see a small arrow just after the Opsview icon. This small arrow is the contextual menu and it will appear on various pages and have various functions depending on the page you are looking at.
Have a go at checking the contextual menu in different pages under the monitoring menu, before returning to the host list.
Now let's go back to the host list and select the Opsview host by clicking on the name.
By doing this we will enter the edit page for the host and you will see the various fields and tabs that are used to define a host. A small portion of the first screen is shown in the following screenshot:

Each field is preceded by a short text describing the field. Clicking on any of the descriptions will redirect you to a help page explaining the field and any restrictions it might have. This is the Opsview help system, and is available within all the pages in the settings menu.
Now that we have a running Opsview installation, it is time to look at user management.
Within Opsview, a user is referred to as a contact while the group he or she belongs to is called a role.
Permissions and views (what a contact can see in Opsview) are based on the role a contact belongs to. The Opsview help system is available within these screens, and so we'll only cover the most important parts just to get you going (I strongly advise you to play around with various settings to get a feel for the permissions).
Creating roles is done by going to settings | Administration | Roles.
You can either add a new role by clicking on the green plus sign (located at the upper-left corner of the screen), or use the clone function to copy an existing set (removing a role can be achieved by clicking on the trash bin icon). The following screenshot shows the three icons add, delete, and clone:

Note
Clone and delete are available in all configuration pages, allowing you to quickly add or remove items.
During the installation a number of predefined roles were created; the names reflect the type of access they provide.
Select any of the predefined roles to bring up the edit screen. Each role has been split into a number of subsections, each responsible for specific parts of the system, as shown in the following screenshot:

Of these, Status Access, Status Objects, and Configuration are the three most important roles, as they define which parts of Opsview the contact can view (Status Access), which objects the contact can see (Status Objects), and which parts the contact can configure (Configuration).
Depending on your organizational needs, we can use these permissions to create various types of roles.
Just to illustrate how powerful this is, imagine we have a single system running an OS, a web server, and a database. Each is maintained by different groups (system admins, web admins, and database admins). Using the correct Status Objects and Status Access settings, we can make sure each group only sees the information relevant to its role (so database admins only see information related to the databases, web admins only see information related to the web server, and so on).
When we apply this to the Configuration settings, we can even allow our database admins to make changes within this host, while the web admins might not perform such actions.
As each organization is unique in its needs, try to create a role setup that reflects these needs.
Once we have finished creating the various roles we need, it's time to add some contacts to our system by navigating to settings | Basic | Contacts, to go to the contacts list.
Creating contacts is a fairly straightforward task, simply click on the add or clone button and enter the requested information as shown in the following screenshot (Name, Username, and so on), and select the role the user belongs to.

Click on Next to create the contact and go to the Notifications screen from where we can finalize the contact; if you are planning on using e-mails to alert contacts, you can add the e-mail address as well.
Instead of creating contacts manually, it is possible to integrate Opsview with your Active Directory (AD) or your Lightweight Directory Access Protocol (LDAP) server. This allows you to either authenticate against LDAP (you will need to create the contacts), or automatically create, delete, and update contacts within Opsview based on your LDAP.
You can get more information on LDAP integration at http://docs.opsview.com/doku.php?id=opsview-core:ldap.
Any configuration changes made will not go into effect until Opsview has performed a reload. You can see the changes that have not yet taken place in the settings menu as shown in the following screenshot:

Click on settings | Configuration | Apply Changes and from the Status and Reload screen, click on Reload Configuration to apply any changes.

In this chapter we have covered quite a bit of ground.
We looked at the main concepts of Opsview and the various ways of installing Opsview, and made some headway in getting your Opsview system ready for business.
In the next chapter we will look into configuring hosts, creating service checks, and even introduce you to some new special features included in Opsview.