README.md
changeset 0 d99e1dffbc72
child 4 1801334b8dc4
equal deleted inserted replaced
-1:000000000000 0:d99e1dffbc72
       
     1 # Arborist-fping
       
     2 
       
     3 home
       
     4 : http://bitbucket.org/mahlon/Arborist-fping
       
     5 
       
     6 code
       
     7 : http://code.martini.nu/Arborist-fping
       
     8 
       
     9 fping
       
    10 : http://fping.org/
       
    11 
       
    12 
       
    13 ## Description
       
    14 
       
    15 Arborist is a monitoring toolkit that follows the UNIX philosophy
       
    16 of small parts and loose coupling for stability, reliability, and
       
    17 customizability.
       
    18 
       
    19 This adds fping sweeping support to Arborist monitoring, which is an
       
    20 efficient means to check the ICMP reachability of many, many hosts
       
    21 simultaneously.
       
    22 
       
    23 It requires the fping binary to be installed in your path.  Use your
       
    24 package manager of choice.
       
    25 
       
    26 
       
    27 ## Prerequisites
       
    28 
       
    29 * Ruby 2.2 or better
       
    30 
       
    31 
       
    32 ## Installation
       
    33 
       
    34     $ gem install arborist-fping
       
    35 
       
    36 
       
    37 ## Usage
       
    38 
       
    39 In this example, we're using ICMP reachability as the method to
       
    40 determine if a host node is available/present on network.
       
    41 
       
    42 	Arborist::Host( 'example' ) do
       
    43 		description "Example host"
       
    44 		address     '10.6.0.169'
       
    45 	end
       
    46 
       
    47 
       
    48 From a monitor file, require this library, and exec() to fping.  We'll
       
    49 record RTT per node in this example with the -e flag, and lower the
       
    50 timeout-per-host:
       
    51 
       
    52 	require 'arborist/monitor/fping'
       
    53 
       
    54 	Arborist::Monitor 'ping check' do
       
    55 		every 10.seconds
       
    56 		match type: 'host'
       
    57 		include_down true
       
    58 		use :addresses
       
    59 		exec 'fping', '-e', '-t', '150'
       
    60 		exec_callbacks( Arborist::Monitor::FPing )
       
    61 	end
       
    62 
       
    63 That's it.
       
    64 
       
    65 
       
    66 ## License
       
    67 
       
    68 Copyright (c) 2016, Michael Granger and Mahlon E. Smith
       
    69 All rights reserved.
       
    70 
       
    71 Redistribution and use in source and binary forms, with or without
       
    72 modification, are permitted provided that the following conditions are met:
       
    73 
       
    74 * Redistributions of source code must retain the above copyright notice,
       
    75   this list of conditions and the following disclaimer.
       
    76 
       
    77 * Redistributions in binary form must reproduce the above copyright notice,
       
    78   this list of conditions and the following disclaimer in the documentation
       
    79   and/or other materials provided with the distribution.
       
    80 
       
    81 * Neither the name of the author/s, nor the names of the project's
       
    82   contributors may be used to endorse or promote products derived from this
       
    83   software without specific prior written permission.
       
    84 
       
    85 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
       
    86 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
       
    87 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
       
    88 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
       
    89 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
       
    90 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
       
    91 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
       
    92 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
       
    93 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
       
    94 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
    95 
       
    96