Visualizing your Nagios network with NagVis
Configuring Maps
By selecting Manage | Maps from the popup menu, you can create a map or perform administrative functions like renaming or deleting an existing map. At the top of the form (Figure 3), you input the map name, then enter which users have read access (allowed_user) and which can change the map configuration (allowed_for_config). These users are the same users the web server recognizes, but NagVis does not do any checking at this point. Therefore, you need to be sure that the users are defined correctly.
Note that you get a warning if you leave either of the User fields blank. By default, you should include at least nagiosadmin or the name you use for your primary Nagios administrator. If security is an issue, you can use a different user. Also, you can set this parameter to EVERYONE, without listing the users explicitly, so that every authenticated user can see the map.
Next, select the background image from the drop-down menu map_image. In this case, The image map you created earlier needs to already be present on the system. Keep in mind that NagVis does not scale images, so it is possible that your image looked fine in whatever application you used to create it, then ended up being too large on a particular monitor, forcing you to scroll to see all of it. If necessary, you can scale the image in an external graphics tool.
If you have several maps with a deep hierarchy, you can use the show_in_lists parameter to reduce clutter. A 0 setting prevents NagVis from displaying the map in the drop-down list or start page.
The Map Iconset field defines the set of icons used to display the status. By default, NagVis uses three sets of icons (big, medium, and small), which reside in ../nagvis/nagvis/images. If you want, you can edit the existing image to suit your needs or create your own set of new images. The set is configured for the entire map, but you can also elect to define an icon for individual services and hosts. For details on creating your own set, see the documentation on the Nagvis homepage [1].
When you are done, click Save to return to the Map Image window.
Adding Objects to Maps
At this point, the map exists only as the background image, and you need to add the icons for your hosts and services. First, right-click the map and select Add Object, then Icon for a choice of Host, Service, Hostgroup, Servicegroup, and Map. The first four options are self-explanatory. The Map icon lets you create a link to a different map.
Linking different maps is useful for creating a map hierarchy of buildings, servers, and server cabinets. Also, you can define icons for host or services to link to a URL completely outside of NagVis and Nagios. For example, if you are monitoring the availability of a website, you could link to the site to verify the status.
When you select the option to add an object, the cursor changes into a cross. Now you move the mouse and left-click on the location you want to place the icon. A pop-up window lets you input configuration information for the host or service you want to add.
Like Nagios, NagVis employs the use field to define configuration templates that are accessible to all services and hosts on the map. Then you only need to configure options that are different from the template.
When editing an icon, you do not necessarily need to click on it to make changes. If you mouse over an icon, a small window pops up in a couple of seconds with the icon's configuration and a link that allows you to change that configuration. If you prefer a hands-off approach, you can also configure icons to automatically display text rather than wait for a mouse-over event.
When configuring a host, NagVis only shows the status of the host itself by default. The recognize_services parameter tells NagVis to include the services on the given host. If you include both services and the host icon on a single map, this is probably not necessary. However, for higher level maps, it can be useful to combine this information.
Note that you are not limited just to individual services and hosts. NagVis supports both host groups and service groups, which appear in the configuration menu alongside hosts and services. Because hosts or services within a given group can have different priorities, Nagvis displays the status with the highest priority.
It Ain't Over Yet
NagVis helps you visualize your Nagios environment with custom maps. Once your maps are set up with the basic configuration, you are ready to experiment with some more advanced options to see how they fit into your environment.
Infos
- NagVis: http://www.nagvis.org
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.