Fping Feeder


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.

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.

Best practice is to use it as a daemon.

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
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.
  1. Current GroundWork Monitor.
  2. Properly enabled and edited fping_process.conf configuration file.
  3. 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.

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.

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.

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.

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.
    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!

    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:

    vi /usr/local/groundwork/config/fping_process.conf

    Modify the line:

    send_service_check = no

    to not send service checks, and set it back to:

    send_service_check = yes

    to send service checks.
    Similarly, the host check submission can be disabled:

    send_host_check = no

    means disabled, and:

    send_host_check = yes

    means enabled (default).
    Identify the host where fping_process is applied by editing the line in the configuration:

    fping_host = "localhost"
    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.
    Enable Processing

    Once you have set up all the configuration options edit this line in the configuration file:

    enable_processing = no

    and change it to:

    enable_processing = yes

    Until you make this change, no results will be returned by the script.


fping fping Delete
feeder feeder Delete
ping ping Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.