author | Mahlon E. Smith <mahlon@laika.com> |
Thu, 22 Mar 2018 13:52:07 -0700 | |
changeset 4 | 1801334b8dc4 |
parent 0 | d99e1dffbc72 |
child 10 | e738ef5f8742 |
permissions | -rw-r--r-- |
0 | 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 |
||
4
1801334b8dc4
Fix documentation, bump copyright.
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
19 |
This adds fping sweeping support to Arborist monitoring, providing an |
1801334b8dc4
Fix documentation, bump copyright.
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
20 |
efficient method to check the ICMP reachability of many, many hosts |
0 | 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 |
||
4
1801334b8dc4
Fix documentation, bump copyright.
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
29 |
* Ruby 2.4 or better |
0 | 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 |
exec 'fping', '-e', '-t', '150' |
|
58 |
exec_callbacks( Arborist::Monitor::FPing ) |
|
59 |
end |
|
60 |
||
61 |
That's it. |
|
62 |
||
63 |
||
64 |
## License |
|
65 |
||
4
1801334b8dc4
Fix documentation, bump copyright.
Mahlon E. Smith <mahlon@laika.com>
parents:
0
diff
changeset
|
66 |
Copyright (c) 2016-2018, Michael Granger and Mahlon E. Smith |
0 | 67 |
All rights reserved. |
68 |
||
69 |
Redistribution and use in source and binary forms, with or without |
|
70 |
modification, are permitted provided that the following conditions are met: |
|
71 |
||
72 |
* Redistributions of source code must retain the above copyright notice, |
|
73 |
this list of conditions and the following disclaimer. |
|
74 |
||
75 |
* Redistributions in binary form must reproduce the above copyright notice, |
|
76 |
this list of conditions and the following disclaimer in the documentation |
|
77 |
and/or other materials provided with the distribution. |
|
78 |
||
79 |
* Neither the name of the author/s, nor the names of the project's |
|
80 |
contributors may be used to endorse or promote products derived from this |
|
81 |
software without specific prior written permission. |
|
82 |
||
83 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
84 |
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
85 |
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
86 |
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE |
|
87 |
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
88 |
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
|
89 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
|
90 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
91 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
92 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
93 |
||
94 |