View Source

h6. Overview

Fping is a ping like program which uses the Internet Control Message Protocol (ICMP) echo request to determine if a host is up. GroundWork Monitor's fping feeder is a script that runs the fping tool to ping all the hosts in a GroundWork Monitor installation and feeds the results to the Nagios command pipe. It can run either as a daemon feeder or as a plugin. The Fping Feeder is included in GroundWork Monitor.
* Settings: {{/usr/local/groundwork/config/fping_process.conf}}
* Logfile: (set in the {{.conf}} file above): {{/usr/local/groundwork/foundation/container/logs/fping.log}}
* Retention control: logrotate{section}
{column:width=33%}CONTENTS
{toc:minLevel=1|maxLevel=1|printable=false}
{column}{column:width=33%}RELATED RESOURCES
* [fping on Sourceforge|http://fping.sourceforge.net/]
* [fping.org|http://fping.org/]
{column}{column}WAS THIS PAGE HELPFUL?

* {html}<a href="mailto:training@gwos.com?subject=Fping Feeder">Leave Feedback</a>{html}{column}{section}

h1. 1.0 About Fping Feeder

This page describes the setup of the fping feeder. It is a script that runs the fping tool (fping.sourceforge.net) to ping some or all the hosts in a GroundWork Monitor installation, and feed the results to the Nagios® command pipe or broker. It can be run either as a daemon feeder (default) or as a plugin.

{tip}Best practice is to use it as a daemon.{tip}

Ping testing hosts externally to Nagios reduces Nagios overhead. This feeder can check every host with a ping, in groups of 100 or so at a time, in a continuous cycle starting typically every 5 minutes, and can therefore do this function for Nagios. The feeder function can also be scheduled as a plugin, and will then run periodically as determined by the Nagios scheduler.

The hosts to check are pulled from the GroundWork Monitor Architect (Monarch) database automatically. Results are then submitted to Nagios as passive checks, via NSCA or the command pipe. This feeder will also submit service checks for specific service names, which will be processed only if they exist. The services it looks for are _ping only_ services, based on the service name, for example {{icmp_ping}}. See the script code itself for details.

Performance data is taken from the fping run, using the {{fping \-e}} option, which will return the round trip time in milliseconds.

GroundWork Monitor includes the supervise utility, which keeps programs running (restarts them when they crash). This is how all the GroundWork _feeder_ programs are installed. The main GroundWork installer places the fping feeder under supervise, with an initial configuration set to disable its operation.

Fping supports the ability to _walk_ the Nagios dependency tree, and submit host status that matches the Nagios host-dependency calculation. The logic is identical to that in Nagios, in that if a host is down, and it has no parents, it will get a down status assigned by this feeder. If it has at least one parent that is up, it will likewise be set to down, but if all the parents are down or unreachable, it will be set to unreachable, thus emulating the dependency logic that Nagios uses. Setting the host notification options to down and recovery, and NOT setting notification for unreachable status will effectively suppress alarm storms.

Fping feeder includes several means to smooth out the processing.
* default 0.1\- second interval between successive batches of host pings, so as not to overload the system.
* limit on the number of host check results that can be submitted at once, using a default batch of 500 hosts and services at a time. Edit the configuration file to adjust.
* Delay between sent batches of results

h6. Release Notes

Version 5.1.0 provides the following enhancements:
* Fping feeder is a standard, supervised feeder provided with every installation of GroundWork Monitor.
* The fping processing script emits a final service check result for the {{fping_process}} service, so the state of this processing can be tracked and alarmed on if it runs too long. This service is associated with the host on which the script runs. Use the fping service profile to set this passive service into place.
* The fping processing is supported on a child server, only probing the corresponding subset of the hosts identified by a Monarch Group of your choice.
* Fping check results may be optionally directed to two separate target locations, fed via NSCA, so parent and child servers, or parent and standby can be updated from the same probing activity.
* The pause time between successive fping invocations has been generalized to allow fractional-second sleeps, to minimize the latency of reported results.
* The size of batches of hosts on fping commands has been decoupled from the size of batches of results sent to the monitoring server via NSCA, to provide greater operating efficiency.
* Ping round-trip times are now properly reported as both host-check and service-check result performance metrics (_rta_, supposedly the round-trip average time (ms) for pings, but in practice it may represent the round-trip time for only the last, successful ping to each host).
* Support included for direct writing to a local Nagios command pipe
* The daemon feeder run under {{base_services}} (supervised processes) executes as {{nagios}}.

h6. Prerequisites

# Current GroundWork Monitor.
# Properly enabled and edited {{fping_process.conf}} configuration file.
# Corresponding Monarch Group with associated hostgroup of hosts or individual hosts to be pinged. If no group is identified then all hosts in Monarch will be pinged.

h1. 2.0 Installation

Decide whether you will run the feeder as a plugin or as a daemon. The daemon service is ready to run as soon as the configuration file is properly localized and processing is enabled.

In either case modify the configuration options in {{/usr/local/groundwork/etc/fping_process.conf file}}, following the comments in that file and in the _Tuning and Options_ section below. The last value to change is the {{enable_processing}} setting, to {{yes}}.

h6. As a plugin

First disable running the daemon, by renaming {{/usr/local/groundwork/base_services/nagios-fping/run}} as {{run.original}} so it is not found by {{base_services}} and the daemon will not be started in that context.

Apply the service profile {{fping_feeder}} to the parent or other GroundWork server host definition. Remove the {{fping_process}} and {{local_process_fping_feeder}} services. The service {{fping_sweep}} will run the feeder and receive overall operational status.

h6. As a daemon

Apply the service profile {{fping_feeder}} to the parent or other GroundWork server host definition. Remove the {{fping_sweep}} and {{local_process_fping_feeder}} services, not needed in this mode. Use the {{fping_process}} service to keep watch on the feeder’s operation.

h6. Tuning and options for either feeder or plugin

* Create a Monarch Group, and assign to it all the hosts to be served by fping. Identify this Monarch Group in the configuration file.
* Adjust Nagios configuration. The best way to do this is to set up a _passive_ host profile. An example of a passive host profile is one where:
** Active host checks are disabled
** Passive host checks are enabled
** Host freshness is being checked
* Retain the default host check command as a ping check. Turn off active checks of that host, by disabling them either in the template, for the host itself, or globally in the main Nagios configuration file. Enable passive host checks at the same time. It is then unlikely that a host check will ever be executed. If you do notice that a host check is coming in as _Active_, check the status of the fping feeder.
* Setting a host freshness interval will allow the host to be actively checked, even if active checks are disabled, if no result from the fping feeder is received for this host within the timeout interval. The {{fping_process.pl}} script will run continuously, starting another cycle every 5 minutes (or less) if run by supervise, or every time it completes a run if run as a plugin. It will stage batches of hosts to avoid spiking the cpu with ping checks, and the command pipe or broker with check results. It is unlikely that the fping feeder will fail, but leaving the active check in place provides insurance that hosts will be actively checked in case it does.
* The downside of setting a freshness check is that many checks may be launched at once in the case that the fping feeder does not run. GroundWork does not recommend setting a freshness threshold for host checks.
{warning:title=IMPORTANT}Do not use BOTH the feeder and plugin methods on the same system, or you will be unnecessarily loading your system\! Do not apply the {{fping_sweep}} service if you enabled the feeder method. If you DO use the plugin method, apply {{fping_sweep}} ONLY TO ONE host\!{warning}
The fping feeder will also submit service check results. This function is on by default, but it can be turned off or on by editing the configuration file:
{noformat}vi /usr/local/groundwork/config/fping_process.conf{noformat}
Modify the line:
{noformat}send_service_check = no{noformat}
to not send service checks, and set it back to:
{noformat}send_service_check = yes{noformat}
to send service checks.
Similarly, the host check submission can be disabled:
{noformat}send_host_check = no{noformat}
means disabled, and:
{noformat}send_host_check = yes{noformat}
means enabled (default).
\\
Identify the host where {{fping_process}} is applied by editing the line in the configuration:
{noformat}fping_host = "localhost"{noformat}
{note}The service {{icmp_ping}} will be the only service that receives a passive check result by default. You may change this service name by editing the {{services_list}} entry in the configuration file, using a comma-delimited list (no spaces\!). Be advised that this feeder will only submit results for services that exist in Monarch and are assigned to hosts.{note}
{warning:title=IMPORTANT}Enable Processing{warning}
Once you have set up all the configuration options edit this line in the configuration file:
{noformat}enable_processing = no{noformat}
and change it to:
{noformat}enable_processing = yes{noformat}
Until you make this change, no results will be returned by the script.