Managing hosts and services in Nagios

Managing hosts

Nagios offers several pages that can be used to view and modify host information. The Nagios web interface offers a view of all defined hosts, their status, and basic information. These can be used to determine the status of hosts. Host group-related views also show the status for services bound to hosts. Host Information pages can also modify several parameters related to the host configuration.

Checking status

Nagios offers a panel that shows all hosts along with their status. It can be accessed by clicking on the Hosts link in the menu on the left.

The following is a screenshot reporting four hosts, all of which are currently up:

 

 

The page in the preceding image shows a list of all hosts, their status, and basic information such as when the host was last checked and when the status changed last. It also shows the information text response from the check. The order of how the table is shown can be changed by using the arrow buttons next to each column’s header.

Similar to the Tactical Overview page, the Totals at the top of the page can be used to filter hosts or services to only the ones with a specific status. After clicking on any status type in the Host Status Totals table, the list of hosts is filtered by the ones that currently have that status. Clicking on any status type in Service Status Totals will show a list of services filtered by the ones that currently have the specified status.

There is also a quick jump menu on the left that allows moving to a list of all services and views related to the host groups.

Nagios also offers three views that show the status of all host groups. One such view is the status grid, which shows host groups along with the hosts in them, and each service for that host along with its status. It can be accessed by clicking on the Grid option under the Host Groups link in the menu on the left.

The following is a screenshot of such a status grid view:

 

 

Similar to the previous view, clicking on Host Status Totals or Service Status Totals will cause Nagios to filter results according to the specified criteria. The page also contains a quick jump menu on the left that can be used to change the currently selected view.

Clicking on any host group description will show a list of all services on all hosts within that group.

Clicking on a host group name, which is specified in brackets, will show a host group menu that allows modifying attributes for all hosts or services related to that host group.

Clicking on a host name in any host or service-related view will cause Nagios to show detailed information about the chosen host.

Viewing host information

Clicking on a host in any view of the web interface will take you to the Host Information page. It contains details about the current host status, a list of comments, and a commands panel that allows modifying the host configuration, scheduling checks, and sending custom notifications.

The following is a screenshot of the Host (Windows machine) Information page:

 

 

This page contains detailed information on the selected host. It shows the current status and host checks that have been or will be performed. It also contains information on what functionality is enabled or disabled for the specified host, whether the host is flapping along with the flapping threshold value.

The menu on the right can be used to perform operations related to this host. It allows toggling whether active checks should be performed, if Nagios should accept passive check results or if it should detect flapping. You can also configure if Nagios should obsess over a host or send notifications and events. It is also possible to view options or schedule checks for all services bound to this host. You can also submit passive check results over the web interface.

The Host Information page also allows reading and modifying all comments related to this host. All current comments are listed under the Host Comments section. Clicking on a trash icon under the Actions column will delete a comment. You can also delete all comments and add a new comment bound to this host.

Managing services

Similar to the host-related information and operations, Nagios has similar panels for working with services. It consists of several service and service group views along with being able to view, detailed information on each service and modify its parameters.

Checking status

The Nagios web interface offers a view of all the defined services, their statuses, and basic information. It can be accessed by clicking on the Services link in the menu on the left.

The following is a screenshot reporting 18 services where 2 are failing and the rest are currently working correctly. We can quickly see that one of the Linux hosts has no SSH access, and the free disk space on Windows machine is very low.

 

 

The main part of the page is the table showing all services along with their statuses and detailed information on the output from checks.

The default order by which the table is sorted is that all services are grouped by the host they are configured for and they are sorted by service description. It is possible to sort the table according to your needs by clicking on the arrows in any column in the header of the table.

Above the table, there are total values for each host and service statuses. They can also be used to filter the service table to show specific statuses or services for the host with a specific status.

The page also contains a quick menu that allows navigation to commonly used views. It allows jumping to the history and notification log as well as navigating to a list of all hosts along with their detailed statuses.

Clicking on any host will take you to a Host Information page for the selected object. Similarly, clicking on any service will show the detailed information page for that object.

Another interesting view is a summary of all services specified for each service group. It can be accessed by clicking on the Grid option under the Service Groups link from the menu on the left.

In our configuration, we defined two service groups (Critical Services and Noncritical Services) and added some of the services to them. Note that some services are not bound to any of the groups. The following is a screenshot of the page:

 

 

It shows each service group along with the count of all services for each status. The page contains the status summary for all services that are members of a specific service group. It also shows the status summary for all hosts that have at least one service configured.

Clicking on any status summary column will show a list of all services in that group along with detailed information. Clicking on a service group will show an overview of services split into individual hosts.

Viewing service information

Clicking on a service in any view of the web interface will take you to the Service Information page. It contains details on the current service status, list of comments, and a commands panel that allows modifying service configuration, scheduling checks, or sending custom notifications.

Let’s check the status of the HTTP service running on one of the Linux hosts. The service is running correctly and is not added to any of the service groups, as shown here:

 

 

The main table on the left shows detailed information on the service, namely the current status, output from the check, and detailed information on the last and next planned checks. The page also shows whether the service is flapping along with the flapping threshold and when the last notification was sent out.

The menu on the right allows modifying whether checks should be performed, notifications and events should be done, and if Nagios should obsess over this service. There is also an option to schedule when the next check is to be performed.

At the bottom, there is a Service Comments section containing a table that shows all existing comments related to this service similar to the Host Information page. It is also possible to add a comment and delete a single or all comments related to this service.

Related Articles

How to add swap space on Ubuntu 21.04 Operating System

How to add swap space on Ubuntu 21.04 Operating System

The swap space is a unique space on the disk that is used by the system when Physical RAM is full. When a Linux machine runout the RAM it use swap space to move inactive pages from RAM. Swap space can be created into Linux system in two ways, one we can create a...

read more

Lorem ipsum dolor sit amet consectetur

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

two × 2 =