It is important to remember that an external worker needs all of the plugins installed on it so it can execute the checks that are handed to it.

Similar documents
Article Number: 722 Rating: Unrated Last Updated: Thu, Jul 20, 2017 at 12:31 AM

Article Number: 513 Rating: 5/5 from 1 votes Last Updated: Tue, Jul 19, 2016 at 10:09 PM

Article Number: 549 Rating: Unrated Last Updated: Tue, May 30, 2017 at 11:02 AM

Article Number: 602 Rating: Unrated Last Updated: Tue, Jan 2, 2018 at 5:13 PM

This is sometimes necessary to free up disk space on a volume that cannot have extra disk space easily added.

Mod-Gearman Distributed Monitoring based on the Gearman Framework

This guide is broken up into several sections and covers different Linux distributions and non- Linux operating systems.

OK: {C: 68% free / 99.51GB total} 'C: free'= g; ; ;0; 'C: free %'=68%;20;10;0;100

Article Number: 38 Rating: Unrated Last Updated: Thu, Apr 28, 2016 at 9:49 PM

Argument 1 = A number (0, 1, 2, 3) that will be used as the exit code the script will exit with (this is how Nagios determines the status)

Article Number: 552 Rating: Unrated Last Updated: Sun, Nov 20, 2016 at 6:09 PM. This guide will show you how to integrate Nagios XI with ServiceNow.

Nagios XI Host and Service Details Overview

Understanding And Using Configuration Wizards In Nagios XI. This document describes how to use Configuration Wizards in Nagios XI.

There are separate firewall daemons for for IPv4 and IPv6 and hence there are separate commands which are provided below.

Using The Core Config Manager For Service Management

Microsoft CSharp. MS Office SharePoint Server 2007-Application.

CCT-1301 MK2 USER MANUAL

VB. Microsoft. TS- Visual Studio Tools for 2007 MS Office System (VTSO)

PeerLink Help Manual

M a p s 2. 0 T h e c o o p era tive w ay t o ke e p m a p s u p t o d a t e. O l iver. Kü h n

In addition to this document, Nagios administrators should be familiar with the following documentation: Nagios XI Users and Contacts

Article Number: 802 Rating: 4/5 from 1 votes Last Updated: Wed, Mar 7, 2018 at 5:20 PM

This document is intended for use by Nagios Administrators that want to use Slack for notifications.

Training manual: An introduction to North Time Pro 2019 ESS at the terminal

Next. Welcome! This guide will get you started down the path to bulk text messaging excellence. Let s start by going over the basics of the system

Article Number: 801 Rating: Unrated Last Updated: Tue, Mar 13, 2018 at 9:19 PM

Monitoring Apache Tomcat Servers With Nagios XI

The Novell Application Launcher

Nagios Snmp External Command Error With No Output (return Code 3)

Purpose. Target Audience. Solution Overview NCPA. Using NCPA For Passive Checks

Let's have a look at the normal Joomla! URLs:

Purpose. Target Audience. Summary. Automation Overview. Nagios XI. Automated Host Management

Nagios XI Using The Core Config Manager For Host Management

Monitoring tools and techniques for ICT4D systems. Stephen Okay

Nagios XI Monitoring Websites With Nagios XI

MONITOR YOUR ENTIRE IT INFRASTRUCTURE WITH NAGIOS XI

Lesson 4 Transcript: DB2 Architecture

Sccm 2012 Manually Remove Package From Distribution Point

Business Communications Solutions 9910 Irvine Center Drive Irvine, CA [ m ] [ f ]

Learning Nagios 4. Wojciech Kocjan. Chapter No.1 "Introducing Nagios"

CSharp. Microsoft. PRO-Design & Develop Enterprise Appl by Using MS.NET Frmwk

SiteProxy adds security, reduces network traffic on the camera, and improves performance.

PowerTOC v3 User Guide

Article Number: 77 Rating: 4.8/5 from 4 votes Last Updated: Mon, Feb 27, 2017 at 5:54 PM

The Return of Gearman

For those who might be worried about the down time during Lync Mobility deployment, No there is no down time required

Nagios XI Monitoring Windows Event Logs With NagEventLog

CSharp. Microsoft. UPGRADE- MCAD Skills to MCTS Web Apps Using MS.NET Frwrk

Is this a known issue? Seems to affect only recurring events. I have some of them and all are shifted. Non-recurring events show properly.

Abusing Windows Opener to Bypass CSRF Protection (Never Relay On Client Side)

VMM Virtual MIDI Machine - Network Introduction. Mark Meeus, Sven Hermans

CSharp. Microsoft. UPGRADE-MCAD Skills to MCPD Dvlpr by Using the MS.NET Frmwk

BlueSpray Getting Started Guide

Redhat OpenStack 5.0 and PLUMgrid OpenStack Networking Suite 2.0 Installation Hands-on lab guide

Missing Assignment s to Parents instructions for Teachers

Outlook Integration Guide

DHCP H3C Low-End Ethernet Switches Configuration Examples. Table of Contents

A Letting agency s shop window is no longer a place on the high street, it is now online

DC Console Using DC Co nso le Applic atio n De sign So ftware

Understanding Notification Escalations

Install Error Code 43 Nvidia Geforce 8500 Gt >>>CLICK HERE<<<

Outputs. Inputs. the point where the graph starts, as we ll see on Example 1.

Cisco PCP-PNR Port Usage Information

When you first launch CrushFTP you may be notified that port 21 is locked. You will be prompted to fix this.

COMP 2000 W 2012 Lab no. 3 Page 1 of 11

Oracle WebLogic Server (WLS) 11gR1 ( and ) Installation on Oracle Linux 5 and 6

This document is intended for use by Nagios XI Administrators who need a boost in I/O performance.

Install and Configure the TS Agent

ipsec securing vpns BFF71AA880C7E031D92BDAE69281BC0A Ipsec Securing Vpns 1 / 6

Scaling Solr in the Cloud

Experiences of Europeans seeking health information in the cyberspace November 2005, Dubrovnik. Ivica Milicevic. Work Research Centre, Dublin

These instructions cover how to install and use pre-compiled binaries to monitor AIX 5.3 using NRPE.

Archive Manager - SMTP feature

Historical Collection Best Practices. Version 2.0

Installing and Configuring Citrix XenApp 6.5 (Part 1)

RIPE Atlas for Network Operators

Automated system and service monitoring with openqrm and Nagios

Installing and Configuring the TS Agent

How to Configure And Text Notifications

Divisibility Rules and Their Explanations

Introduction 3. Compatibility Matrix 3. Prerequisites 3

SurveyToGo Scripting Best Practices

Remote Desktop Services Deployment Guide

Nagios User Guide. You can use apt-get to install these packages by running the following commands:

Windows Xp Ping Unable To Contact Ip Driver Error Code 2

Endian Proxy / Firewall

Gateway for IP equipment

Table of contents. DMXzoneUniformManual DMXzone

HEXDATA DOCUMENTATION

Install and Configure the TS Agent

Web Registration. New User Registration & Update 12/01/2013

An Introduction APRICOT 2008 Network Management Workshop February Taipei, Taiwan

Cisco Smart CallConnector Server

CAMPAIGNS. For further assistance please contact us at

Article Number: 406 Rating: 3/5 from 2 votes Last Updated: Mon, Jun 5, 2017 at 3:08 AM. This document describes how to install NDOUtils from source.

BIG-IP Virtual Edition and Citrix XenServer: Setup. Version 12.1

magento_1:full_page_cache

PASSPORTAL PLUGIN DOCUMENTATION

Network setup and troubleshooting

BIG-IP Virtual Edition and Citrix XenServer: Setup. Version 13.1

Transcription:

Nagios XI - Mod-Gearman Queues and Workers Article Number: 484 Rating: 5/5 from 3 votes Last Updated: Thu, Jul 6, 2017 at 5:30 PM O ve r vie w The purpose of this article is to explain how queues work in Mod-Gearman (MG). Having a clear understanding of this will allow you to distribute the execution of checks to specific workers. The Ba s ic s When you install the MG server broker module on your XI server, by default this also installs a worker module. At this point the checks being handed over to MG to do the executing instead of the Nagios Core engine. A MG worker is what executes the check from Nagios, like ping, CPU load, memory usage etc. A worker can be located on the Nagios XI server or it can be on an external server. Being on an external server means the load is taken away from the Nagios XI server. Queues in MG are how checks are handed out to the workers. With a default configuration, when nagios starts it hands off the host and service checks to MG. MG creates two queues called host and service. You can think of these queues as the default "catch all" queues. By default, any worker that connects will execute checks from these queues. It is important to remember that an external worker needs all of the plugins installed on it so it can execute the checks that are handed to it. Re mo t e Wo r ke r C o ns ide r a t io ns When you add a remote worker, there are some things that need to be taken into account. The most important question you need to ask is: "What checks should NOT be executed by the remote worker?" Why do you need to ask such a question? Lets look at the standard checks that the Nagios XI server has built in for the localhost object: Current Load Current Users HTTP PING Root Partition SSH Swap Usage Total Processes Let's look at the service "Root Partition", the command it executes is: /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p / If a re mo te wo rke r was to execute this check, the results that came back would be for the remote workers root partition, not the root partition of the Nagios XI server. So it's pretty obvious that you don't want these checks being executed on the remote workers, how do you configure MG to do this? The key to this is with host groups and service groups. One other important point to be made about remote workers is that the plugins need to be installed on the workers. MG is passing the command that needs to be executed, the worker executes the command so it needs to be able to execute the plugin. Ho s t gr o ups a nd S e r vic e gr o ups

The first step to stop MG from sending local checks to remote workers is to create a host group or service group in Nagios that contains the objects you don't want executed on remote workers. What's the difference between a host group and a service group in MG? host group If you use a host group in a MG configuration, MG will automatically include the services for the hosts in the host group This allows for simple configurations service group Using a service group in a MG configuration allows for more granular control of what services are handled by MG For the purpose of simplicity, we will focus on a host group. Log into Nagios XI and open Core Configuration Manager (CCM) Under Mo nito ring click Ho s t Gro up s Click the + Ad d Ne w button Name: mg _o b je c ts _lo c a l Description: Mo d - Ge a rma n O b je c ts - Lo c a l Click the Ma na g e Ho s ts button Click S a ve Add lo c a lho s t to the right hand side Click C lo s e Click the Ap p ly C o nfig ura tio n button Now we need to configure MG to use this host group to exclude checks. On your Nagios XI server edit the file /etc/mod_gearman2/module.conf Find the section like this: # sets a list of hostgroups which will not be executed # by gearman. They are just passed through. # Default is none localhostgroups= Update the line as follows: localhostgroups=mg_objects_local Save the module.conf file. Now you need to restart some services: service nagios stop service gearmand restart service nagios start From now on, MG will not execute any host or service checks for the hosts in the mg_objects_local group, instead Nagios Core will execute them as it normally would. What other checks should be prevented from executing on a remote worker? Any devices that are being monitored by the "Switch / Router Wizard" will also need to be added to the mg_objects_local group, as they target some files specific to MRTG which is run locally on the Nagios XI server. Once you add these hosts to the mg_objects_local group, when you Apply Configuration Nagios will restart and MG will then know about the updated host group.

Us ing A Wo r ke r Fo r A S pe c if ic S it e In this scenario, you have a remote site where you want all the checks to be executed at the remote site by the worker at the remote site. In this example, we will focus on a host group. Log into Nagios XI and open Core Configuration Manager (CCM) Under Mo nito ring click Ho s t Gro up s Click the + Ad d Ne w button Name: mg _o b je c ts _s ite _a Description: Mo d - Ge a rma n O b je c ts - S ite A Click the Ma na g e Ho s ts button Click S a ve Add <a ll the ho s ts a t the re mo te s ite > to the right hand side Click C lo s e Click the Ap p ly C o nfig ura tio n button Before we configure the MG server to use this host group as a queue, we'll configure the remote worker. Most importantly, we ONLY want this worker to execute checks for the hosts in the host group. With that in mind, we'll configure the worker so it doesn't touch the default host and services queues. On your remote worker edit the file /etc/mod_gearman2/worker.conf services=yes hosts=yes Change them to no as follows: services=no hosts=no # sets a list of hostgroups which this worker will work # on. Either specify a comma seperated list or use # multiple lines. #hostgroups=name1 #hostgroups=name2,name3 hostgroups=mg_objects_site_a Save the worker.conf file. You need to restart the worker service:

You need to restart the worker service: service mod-gearman2-worker restart Now we need to configure the MG server to use this host group as a queue. On your Nagios XI server edit the file /etc/mod_gearman2/module.conf Find the section like this: # sets a list of hostgroups which will go into seperate # queues. Either specify a comma seperated list or use # multiple lines. #hostgroups=name1 #hostgroups=name2,name3 hostgroups=mg_objects_site_a Save the module.conf file. Now you need to restart some services: service nagios stop service gearmand restart service nagios start From now on, MG will allocate any host or service checks for the hosts in the mg_objects_site_a group into a queue. Any workers that are configured to target it will execute them. You can see this new queue by using the gearman_top2 command on the XI server: gearman_top2 It will look like the screenshot below: Us ing A Wo r ke r Fo r A S pe c if ic Mo nit o r ing Plugin Some monitoring plugins have the following requirements and behaviours: Specific modules installed The more "common" workers you deploy require you to install these modules on all the workers Create temporary files that are accessed the next time the plugin is executed These files are used for comparing the last value to the current value

If the check is being shifted from worker to worker, these files are not going to have valid data and cause monitoring inconsistencies A good example of such a plugin is check_wmi_plus.pl which can be used to perform agent-less monitoring on Windows machines. In this scenario we will create a service group that contains all the services that use the check_wmi_plus.pl plugin. We'll configure a worker to use this service group. Log into Nagios XI and open Core Configuration Manager (CCM) Under Mo nito ring click S e rvic e Gro up s Click the + Ad d Ne w button Name: mg _o b je c ts _wmi_s e rvic e s Description: Mo d - Ge a rma n O b je c ts - WMI S e rvic e s Click the Ma na g e S e rvic e s button Click S a ve Add <a ll the s e rvic e s tha t us e the check_wmi_plus.pl p lug in> to the right hand side Click C lo s e Click the Ap p ly C o nfig ura tio n button Before we configure the MG server to use this host group as a queue, we'll configure the remote worker. Most importantly, we ONLY want this worker to execute checks for the services in the service group. With that in mind, we'll configure the worker so it doesn't touch the default host and services queues (however there is no reason why this worker couldn't also do other service checks). On your remote worker edit the file /etc/mod_gearman2/worker.conf services=yes hosts=yes Change them to no as follows: services=no hosts=no # sets a list of servicegroups which this worker will # work on. #servicegroups=name1,name2,name3 servicegroups=mg_objects_wmi_services Save the worker.conf file. You need to restart the worker service:

service mod-gearman2-worker restart Now we need to configure the MG server to use this service group as a queue. On your Nagios XI server edit the file /etc/mod_gearman2/module.conf Find the section like this: # sets a list of servicegroups which will go into seperate # queues. #servicegroups=name1,name2,name3 servicegroups=mg_objects_wmi_services Save the module.conf file. Now you need to restart some services: service nagios stop service gearmand restart service nagios start From now on, MG will allocate any service checks in the mg_objects_wmi_services group into a queue. Any workers that are configured to target it will execute them. You can see this new queue by using the gearman_top2 command on the XI server: gearman_top2 It will look like the screenshot below: Ens ur e Wo r ke r Do e s n't To uc h Ho s t And S e r vic e Q ue ue s This was briefly mentioned in the "Using A Worker For A Specific Site" scenario, however it is worth re-iterating. The goal is that you ONLY want the worker to execute checks in the specific queues that it it has been configured for, using the hostgroups and/or servicegroups directives. You DO NOT want it executing checks in the default host and service queues. Why would you want this type of configuration? Let's say you have a remote worker that is executing checks for the devices located at that physically remote location. The local worker on the Nagios XI server is executing the host and service queues. If the remote worker was executing checks for the host and service queues, the following would happen: Remote worker gets plugin command to execute and executes it The host address is actually for a device back at the Nagios XI server location

Network traffic is generated to go back across to the Nagios XI server location to perform the plugin check against the host Network traffic is generated to return the plugin result to the remote worker Network traffic is generated to from the remote worker to return the plugin result back to the MG server on the Nagios XI server You can see that there is a lot of unnecessary traffic being generated across network links. Hence it is important when have remote workers at physically different locations, they need to be correctly configured so they don't touch the host and service queues. On your worker edit the file /etc/mod_gearman2/worker.conf services=yes hosts=yes Change them to no as follows: services=no hosts=no Save the worker.conf file. You need to restart the worker service: service mod-gearman2-worker restart Fina l Tho ught s For any support related questions please visit the Nagios Support Forums at: http://support.nagios.com/forum/ Posted by: tle a - Fri, Mar 4, 2016 at 1:34 AM. This article has been viewed 7768 times. Online URL: https://support.nagios.com/kb/article/nagios-xi-mod-gearman-queues-and-workers-484.html