[-]
[+]
|
Changed |
nagios-plugins-bonding.changes
|
|
[-]
[+]
|
Changed |
nagios-plugins-bonding.spec
^
|
|
[-]
[+]
|
Deleted |
check_linux_bonding-1.3.1.tar.bz2/INSTALL
^
|
@@ -1,23 +0,0 @@
-Automatic installation
-----------------------
-
-Run the script install.sh to install automatically. The install.sh
-script will ask where to install the files, unless given the '-q'
-option, which will install the files in the default location.
-
-
-Manual installation
--------------------
-
-To install check_linux_bonding, copy the file check_linux_bonding to the
-Nagios plugin directory (usually /usr/lib/nagios/plugins):
-
- cp check_linux_bonding /usr/lib/nagios/plugins
-
-To install the manual page:
-
- cp check_linux_bonding.8 /usr/share/man/man8
-
-This is all.
-
--trond
|
[-]
[+]
|
Deleted |
check_linux_bonding-1.3.1.tar.bz2/README
^
|
@@ -1,51 +0,0 @@
-README file for check_linux_bonding
-===================================
-
-Files included in the tarball and zip archive:
-
- check_linux_bonding - The plugin
- check_linux_bonding.8 - Man page
- check_linux_bonding.spec - RPM spec file
- COPYING - License information
- INSTALL - Install HOWTO
- install.sh - Linux/UNIX install script
- README - This file
-
-
-About this program
-==================
-
-check_linux_bonding is a plugin for Nagios that checks bonded network
-interfaces on Linux. The plugin is fairly simple and will report any
-interfaces that are down (both masters and slaves). It will also alert
-you of bonding interfaces with only one slave, since that usually
-points to a misconfiguration. If no bonding interfaces are detected,
-the plugin will exit with an OK value by default. It is therefore safe
-to run this plugin on all your Linux machines.
-
-The plugin will first try to use the sysfs (/sys) filesystem to detect
-bonding interfaces. If that does not work, i.e. the kernel or bonding
-module is too old for the necessary files to exist, the plugin will
-use procfs (/proc) as a fallback. The plugin supports an unlimited
-number of bonding interfaces.
-
-check_linux_bonding is designed to be used with NRPE, i.e. run
-locally. Example:
-
- $ ./check_linux_bonding
- Bonding interface bond0 [mode=4 (802.3ad)]: Slave eth2 is down
-
-In the OK output, the plugin will indicate which of the slaves is
-active with an exclamation mark "!", if applicable. If one of the
-slaves is configured as primary, this is indicated with an asterisk
-"*":
-
- $ ./check_linux_bonding
- Interface bond0 is up: mode=1 (active-backup), 2 slaves: eth0*!, eth1
-
-
-More information avilable online:
-=================================
-
-http://folk.uio.no/trondham/software/check_linux_bonding.html
-
|
[-]
[+]
|
Deleted |
check_linux_bonding-1.3.1.tar.bz2/check_linux_bonding.8
^
|
@@ -1,300 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.if n .na
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "CHECK_LINUX_BONDING 8"
-.TH CHECK_LINUX_BONDING 8 "2010-08-23" "check_linux_bonding 1.3.1" "Nagios plugin"
-.SH "NAME"
-check_linux_bonding \- Nagios plugin for checking the status of bonded
-network interfaces (masters and slaves) on Linux servers.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-check_linux_bonding [\fI\s-1OPTION\s0\fR]...
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-check_linux_bonding is a plugin for the Nagios monitoring software
-that checks bonding interfaces on Linux. The plugin is fairly simple
-and will report any interfaces that are down (both masters and
-slaves). It will also alert you of bonding interfaces with only one
-slave, since that usually points to a misconfiguration. If no bonding
-interfaces are detected, the plugin will exit with an \s-1OK\s0 value
-(modifiable with the \f(CW\*(C`\-\-no\-bonding\*(C'\fR option). It is therefore safe to
-run this plugin on all your Linux machines:
-.PP
-.Vb 2
-\& $ ./check_linux_bonding
-\& OK: No bonding interfaces found
-.Ve
-.PP
-The plugin will first try to use the sysfs (/sys) filesystem to detect
-bonding interfaces. If that does not work, i.e. the kernel or bonding
-module is too old for the necessary files to exist, the plugin will
-use procfs (/proc) as a fallback. The plugin supports an unlimited
-number of bonding interfaces.
-.PP
-In the \s-1OK\s0 output, the plugin will indicate which of the slaves is
-active with an exclamation mark \f(CW\*(C`!\*(C'\fR, if applicable. If one of the
-slaves is configured as primary, this is indicated with an asterisk
-\&\f(CW\*(C`*\*(C'\fR:
-.PP
-.Vb 2
-\& $ ./check_linux_bonding
-\& Interface bond0 is UP: mode=1 (active-backup), 2 slaves: eth0*, eth1!
-.Ve
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-.IP "\-b, \-\-blacklist \fI\s-1STRING\s0\fR or \fI\s-1FILE\s0\fR" 4
-.IX Item "-b, --blacklist STRING or FILE"
-Blacklist one or more interfaces. The option can be specified multiple
-times. If the argument is a file, the file is expected to contain a
-single line with the same syntax, i.e.:
-.Sp
-.Vb 1
-\& interface1,interface2,...
-.Ve
-.Sp
-Examples:
-.Sp
-.Vb 3
-\& check_linux_bonding -b bond1 -b eth1
-\& check_linux_bonding -b bond1,eth1
-\& check_linux_bonding -b /etc/check_linux_bonding.black
-.Ve
-.IP "\-n, \-\-no\-bonding \fI\s-1STRING\s0\fR" 4
-.IX Item "-n, --no-bonding STRING"
-This option lets you specify the return value of the plugin if no
-bonding interfaces are found. The option expects \f(CW\*(C`ok\*(C'\fR, \f(CW\*(C`warning\*(C'\fR,
-\&\f(CW\*(C`critical\*(C'\fR or \f(CW\*(C`unknown\*(C'\fR as the argument. Default is \f(CW\*(C`ok\*(C'\fR if the
-option is not present.
-.IP "\-\-slave\-down \fI\s-1STRING\s0\fR" 4
-.IX Item "--slave-down STRING"
-This option lets you specify the return value of the plugin if a slave
-interface is down. The option expects \f(CW\*(C`ok\*(C'\fR, \f(CW\*(C`warning\*(C'\fR, \f(CW\*(C`critical\*(C'\fR
-or \f(CW\*(C`unknown\*(C'\fR as the argument. Default is \f(CW\*(C`warning\*(C'\fR if the option is
-not present.
-.IP "\-t, \-\-timeout \fI\s-1SECONDS\s0\fR" 4
-.IX Item "-t, --timeout SECONDS"
-The number of seconds after which the plugin will abort. Default
-timeout is 5 seconds if the option is not present.
-.IP "\-s, \-\-state" 4
-.IX Item "-s, --state"
-Prefix each alert with its corresponding service state (i.e. warning,
-critical etc.). This is useful in case of several alerts from the same
-monitored system.
-.IP "\-S, \-\-short\-state" 4
-.IX Item "-S, --short-state"
-Same as the \fB\-\-state\fR option above, except that the state is
-abbreviated to a single letter (W=warning, C=critical etc.).
-.IP "\-\-linebreak=\fI\s-1STRING\s0\fR" 4
-.IX Item "--linebreak=STRING"
-check_linux_bonding will sometimes report more than one line, e.g. if
-there are several alerts. If the script has a \s-1TTY\s0, it will use regular
-linebreaks. If not (which is the case with \s-1NRPE\s0) it will use \s-1HTML\s0
-linebreaks. Sometimes it can be useful to control what the plugin uses
-as a line separator, and this option provides that control.
-.Sp
-The argument is the exact string to be used as the line
-separator. There are two exceptions, i.e. two keywords that translates
-to the following:
-.RS 4
-.IP "\fB\s-1REG\s0\fR" 4
-.IX Item "REG"
-Regular linebreaks, i.e. \*(L"\en\*(R".
-.IP "\fB\s-1HTML\s0\fR" 4
-.IX Item "HTML"
-\&\s-1HTML\s0 linebreaks, i.e. \*(L"<br/>\*(R".
-.RE
-.RS 4
-.Sp
-This is a rather special option that is normally not needed. The
-default behaviour should be sufficient for most users.
-.RE
-.IP "\-\-disable\-sysfs" 4
-.IX Item "--disable-sysfs"
-Sometimes the information in /sys is partly absent or deficient, and
-the plugin is unable to detect this discrepancy and reports
-errors. This usually happens with old Linux kernels and Xen domain\-0
-systems. This option exists as a workaround. If specified, this option
-will make the plugin ignore the /sys filesystem alltogether and use
-the /proc filesystem instead.
-.IP "\-v, \-\-verbose" 4
-.IX Item "-v, --verbose"
-Verbose output. Will report status on all bonding interfaces,
-regardless of their alert state.
-.IP "\-h, \-\-help" 4
-.IX Item "-h, --help"
-Display help text.
-.IP "\-V, \-\-version" 4
-.IX Item "-V, --version"
-Display version info.
-.SH "DIAGNOSTICS"
-.IX Header "DIAGNOSTICS"
-The option \f(CW\*(C`\-\-verbose\*(C'\fR (or \f(CW\*(C`\-v\*(C'\fR) can be specified to display all
-bonding interfaces.
-.SH "DEPENDENCIES"
-.IX Header "DEPENDENCIES"
-This plugin depends on sysfs and fallbacks to procfs. Without these
-filesystems the plugin will not find any bonding interfaces.
-.SH "EXIT STATUS"
-.IX Header "EXIT STATUS"
-If no errors are discovered, a value of 0 (\s-1OK\s0) is returned. An exit
-value of 1 (\s-1WARNING\s0) signifies one or more non-critical errors, while
-2 (\s-1CRITICAL\s0) signifies one or more critical errors.
-.Sp
-The exit value 3 (\s-1UNKNOWN\s0) is reserved for errors within the script,
-or errors getting values sysfs or procfs.
-.SH "AUTHOR"
-.IX Header "AUTHOR"
-Written by Trond H. Amundsen <t.h.amundsen@usit.uio.no>
-.SH "BUGS AND LIMITATIONS"
-.IX Header "BUGS AND LIMITATIONS"
-None known at present.
-.SH "INCOMPATIBILITIES"
-.IX Header "INCOMPATIBILITIES"
-The plugin is only compatible with the Linux operating system.
-.SH "REPORTING BUGS"
-.IX Header "REPORTING BUGS"
-Report bugs to <t.h.amundsen@usit.uio.no>
-.SH "LICENSE AND COPYRIGHT"
-.IX Header "LICENSE AND COPYRIGHT"
-This program is free software: you can redistribute it and/or modify
-it under the terms of the \s-1GNU\s0 General Public License as published by
-the Free Software Foundation, either version 3 of the License, or (at
-your option) any later version.
-.Sp
-This program is distributed in the hope that it will be useful, but
-\&\s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of
-\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the \s-1GNU\s0
-General Public License for more details.
-.Sp
-You should have received a copy of the \s-1GNU\s0 General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-<http://folk.uio.no/trondham/software/check_linux_bonding.html>
|
[-]
[+]
|
Deleted |
check_linux_bonding-1.3.1.tar.bz2/check_linux_bonding.pod
^
|
@@ -1,194 +0,0 @@
-# Man page created with:
-#
-# pod2man -s 8 -r "`./check_linux_bonding -V | head -n 1`" -c 'Nagios plugin' check_linux_bonding.pod check_linux_bonding.8
-#
-
-=head1 NAME
-
-check_linux_bonding - Nagios plugin for checking the status of bonded
-network interfaces (masters and slaves) on Linux servers.
-
-=head1 SYNOPSIS
-
-check_linux_bonding [I<OPTION>]...
-
-=head1 DESCRIPTION
-
-check_linux_bonding is a plugin for the Nagios monitoring software
-that checks bonding interfaces on Linux. The plugin is fairly simple
-and will report any interfaces that are down (both masters and
-slaves). It will also alert you of bonding interfaces with only one
-slave, since that usually points to a misconfiguration. If no bonding
-interfaces are detected, the plugin will exit with an OK value
-(modifiable with the C<--no-bonding> option). It is therefore safe to
-run this plugin on all your Linux machines:
-
- $ ./check_linux_bonding
- OK: No bonding interfaces found
-
-The plugin will first try to use the sysfs (/sys) filesystem to detect
-bonding interfaces. If that does not work, i.e. the kernel or bonding
-module is too old for the necessary files to exist, the plugin will
-use procfs (/proc) as a fallback. The plugin supports an unlimited
-number of bonding interfaces.
-
-In the OK output, the plugin will indicate which of the slaves is
-active with an exclamation mark C<!>, if applicable. If one of the
-slaves is configured as primary, this is indicated with an asterisk
-C<*>:
-
- $ ./check_linux_bonding
- Interface bond0 is UP: mode=1 (active-backup), 2 slaves: eth0*, eth1!
-
-=head1 OPTIONS
-
-=over 4
-
-=item -b, --blacklist I<STRING> or I<FILE>
-
-Blacklist one or more interfaces. The option can be specified multiple
-times. If the argument is a file, the file is expected to contain a
-single line with the same syntax, i.e.:
-
- interface1,interface2,...
-
-Examples:
-
- check_linux_bonding -b bond1 -b eth1
- check_linux_bonding -b bond1,eth1
- check_linux_bonding -b /etc/check_linux_bonding.black
-
-=item -n, --no-bonding I<STRING>
-
-This option lets you specify the return value of the plugin if no
-bonding interfaces are found. The option expects C<ok>, C<warning>,
-C<critical> or C<unknown> as the argument. Default is C<ok> if the
-option is not present.
-
-=item --slave-down I<STRING>
-
-This option lets you specify the return value of the plugin if a slave
-interface is down. The option expects C<ok>, C<warning>, C<critical>
-or C<unknown> as the argument. Default is C<warning> if the option is
-not present.
-
-=item -t, --timeout I<SECONDS>
-
-The number of seconds after which the plugin will abort. Default
-timeout is 5 seconds if the option is not present.
-
-=item -s, --state
-
-Prefix each alert with its corresponding service state (i.e. warning,
-critical etc.). This is useful in case of several alerts from the same
-monitored system.
-
-=item -S, --short-state
-
-Same as the B<--state> option above, except that the state is
-abbreviated to a single letter (W=warning, C=critical etc.).
-
-=item --linebreak=I<STRING>
-
-check_linux_bonding will sometimes report more than one line, e.g. if
-there are several alerts. If the script has a TTY, it will use regular
-linebreaks. If not (which is the case with NRPE) it will use HTML
-linebreaks. Sometimes it can be useful to control what the plugin uses
-as a line separator, and this option provides that control.
-
-The argument is the exact string to be used as the line
-separator. There are two exceptions, i.e. two keywords that translates
-to the following:
-
-=over 4
-
-=item B<REG>
-
-Regular linebreaks, i.e. "\n".
-
-=item B<HTML>
-
-HTML linebreaks, i.e. "<br/>".
-
-=back
-
-This is a rather special option that is normally not needed. The
-default behaviour should be sufficient for most users.
-
-=item --disable-sysfs
-
-Sometimes the information in /sys is partly absent or deficient, and
-the plugin is unable to detect this discrepancy and reports
-errors. This usually happens with old Linux kernels and Xen domain-0
-systems. This option exists as a workaround. If specified, this option
-will make the plugin ignore the /sys filesystem alltogether and use
-the /proc filesystem instead.
-
-=item -v, --verbose
-
-Verbose output. Will report status on all bonding interfaces,
-regardless of their alert state.
-
-=item -h, --help
-
-Display help text.
-
-=item -V, --version
-
-Display version info.
-
-=head1 DIAGNOSTICS
-
-The option C<--verbose> (or C<-v>) can be specified to display all
-bonding interfaces.
-
-=head1 DEPENDENCIES
-
-This plugin depends on sysfs and fallbacks to procfs. Without these
-filesystems the plugin will not find any bonding interfaces.
-
-=head1 EXIT STATUS
-
-If no errors are discovered, a value of 0 (OK) is returned. An exit
-value of 1 (WARNING) signifies one or more non-critical errors, while
-2 (CRITICAL) signifies one or more critical errors.
-
-The exit value 3 (UNKNOWN) is reserved for errors within the script,
-or errors getting values sysfs or procfs.
-
-=head1 AUTHOR
-
-Written by Trond H. Amundsen <t.h.amundsen@usit.uio.no>
-
-=head1 BUGS AND LIMITATIONS
-
-None known at present.
-
-=head1 INCOMPATIBILITIES
-
-The plugin is only compatible with the Linux operating system.
-
-=head1 REPORTING BUGS
-
-Report bugs to <t.h.amundsen@usit.uio.no>
-
-=head1 LICENSE AND COPYRIGHT
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or (at
-your option) any later version.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see L<http://www.gnu.org/licenses/>.
-
-=head1 SEE ALSO
-
-L<http://folk.uio.no/trondham/software/check_linux_bonding.html>
-
-=cut
|
[-]
[+]
|
Deleted |
check_linux_bonding-1.3.1.tar.bz2/check_linux_bonding.spec
^
|
@@ -1,66 +0,0 @@
-Summary: A Nagios plugin to check Linux bonding interfaces
-Name: check_linux_bonding
-Version: 1.3.1
-Release: 1%{?dist}
-License: GPL
-Packager: Trond Hasle Amundsen <t.h.amundsen@usit.uio.no>
-Group: Applications/System
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-URL: http://folk.uio.no/trondham/software/%{name}.html
-Source0: http://folk.uio.no/trondham/software/%{name}-%{version}.tar.gz
-BuildRequires: perl gzip
-
-Requires: perl >= 5.6.0
-Requires: perl(POSIX)
-Requires: perl(Getopt::Long)
-
-%description
-check_linux_bonding is a plugin for the Nagios monitoring software
-that checks bonding interfaces on Linux. The plugin is fairly simple
-and will report any interfaces that are down (both masters and
-slaves). It will also alert you of bonding interfaces with only one
-slave, since that usually points to a misconfiguration.
-
-%prep
-%setup -q
-
-%build
-pod2man -s 8 -r "%{name} %{version}" -c "Nagios plugin" %{name}.pod %{name}.8
-gzip %{name}.8
-
-%install
-install -D -m 0755 %{name} %{buildroot}%{_libdir}/nagios/plugins/%{name}
-install -D -m 0644 %{name}.8.gz %{buildroot}%{_mandir}/man8/%{name}.8.gz
-
-%clean
-rm -rf %{buildroot}
-
-%files
-%defattr(-, root, root, -)
-%doc README COPYING CHANGES
-%{_libdir}/nagios/plugins/%{name}
-%attr(0755, root, root) %{_mandir}/man8/%{name}.8.gz
-
-
-%changelog
-* Tue Oct 26 2010 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 1.3.1-1
-- Version 1.3.1
-
-* Thu Aug 26 2010 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 1.3.0-1
-- Version 1.3.0
-
-* Wed Feb 17 2010 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 1.2.1-1
-- Version 1.2.1
-
-* Tue Feb 16 2010 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 1.2.0-1
-- Version 1.2.0
-
-* Thu Oct 9 2009 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 1.1.0-1
-- Version 1.1.0
-- Locations for plugin and man page changed
-
-* Thu Jul 23 2009 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 1.0.1-1
-- Version 1.0.1
-
-* Wed Jun 10 2009 Trond H. Amundsen <t.h.amundsen@usit.uio.no> - 1.0.0-1
-- Initial release 1.0.0
|
[-]
[+]
|
Deleted |
check_linux_bonding-1.3.1.tar.bz2/install.sh
^
|
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-# Find correct lib dir
-if [ "`uname -m`" = "x86_64" ]; then
- libdir=/usr/lib64
-else
- libdir=/usr/lib
-fi
-
-# Default install locations
-def_plugindir=${libdir}/nagios/plugins
-def_mandir=/usr/share/man/man8
-
-# Find install locations
-if [ "$1" = "-q" ]; then
- plugindir=$def_plugindir
- mandir=$def_mandir
-else
- echo -n "Plugin dir [$def_plugindir]: "
- read plugindir
- if [ "$plugindir" = "" ]; then
- plugindir=$def_plugindir
- fi
- echo -n "Man page dir [$def_mandir]: "
- read mandir
- if [ "$mandir" = "" ]; then
- mandir=$def_mandir
- fi
-fi
-
-# Error if plugin dir doesn't exist
-if [ -d $plugindir ]; then
- :
-else
- echo "ERROR: Plugin directory $plugindir doesn't exist,"
- echo "ERROR: or is not a directory"
- exit 1
-fi
-
-# Error if man dir doesn't exist
-if [ -d $mandir ]; then
- :
-else
- echo "ERROR: Man page directory $mandir doesn't exist,"
- echo "ERROR: or is not a directory"
- exit 1
-fi
-
-# Install
-install -p -m 0755 check_linux_bonding $plugindir
-install -m 0644 check_linux_bonding.8 $mandir
-
-# Done
-echo "done."
-exit 0
|
[-]
[+]
|
Changed |
check_linux_bonding-1.4.tar.bz2/CHANGES
^
|
@@ -1,3 +1,20 @@
+1.4 2014-05-13
+------------------
+
+* Fix for Linux kernel versions >= 3.13
+
+
+1.3.2 2012-12-14
+------------------
+
+* Added an option "--ignore-num-ad" which allows the user to specify
+ that the plugin shouldn't warn if the number of AD ports are not
+ equal to the number of slaves. E.g. if the IEEE 802.3ad bonding
+ device spans multiple switches.
+* Manual pages are now written in Docbook XML
+* Bugfix for primary slave when using procfs
+
+
1.3.1 2010-10-26
------------------
|
[-]
[+]
|
Changed |
check_linux_bonding-1.4.tar.bz2/check_linux_bonding
^
|
@@ -5,9 +5,7 @@
#
# AUTHOR: Trond H. Amundsen <t.h.amundsen@usit.uio.no>
#
-# $Id: check_linux_bonding 18527 2010-10-26 13:26:18Z trondham $
-#
-# Copyright (C) 2010 Trond H. Amundsen
+# Copyright (C) 2009-2014 Trond H. Amundsen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -43,7 +41,7 @@
# Version and similar info
$NAME = 'check_linux_bonding';
-$VERSION = '1.3.1';
+$VERSION = '1.4';
$AUTHOR = 'Trond H. Amundsen';
$CONTACT = 't.h.amundsen@usit.uio.no';
@@ -78,8 +76,9 @@
-n, --no-bonding Alert level if no bonding interfaces found [ok]
--slave-down Alert level if a slave is down [warning]
--disable-sysfs Don't use sysfs (default), use procfs
+ --ignore-num-ad (IEEE 802.3ad) Don't warn if num_ad_ports != num_slaves
-b, --blacklist Blacklist failed interfaces
- -d, --debug Debug output, reports everything
+ -v, --verbose Debug/Verbose output, reports everything
-h, --help Display this help text
-V, --version Display version info
@@ -90,7 +89,7 @@
# Version and license text
$LICENSE = <<"END_LICENSE";
$NAME $VERSION
-Copyright (C) 2010 $AUTHOR
+Copyright (C) 2009-2014 $AUTHOR
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
@@ -111,6 +110,7 @@
'verbose' => 0,
'disable_sysfs' => 0,
'slave_down' => 'warning',
+ 'ignore_num_ad' => 0,
);
# Get options
@@ -125,6 +125,7 @@
'v|verbose' => \$opt{verbose},
'disable-sysfs' => \$opt{disable_sysfs},
'slave-down=s' => \$opt{slave_down},
+ 'ignore-num-ad' => \$opt{ignore_num_ad},
) or do { print $USAGE; exit $E_UNKNOWN };
# If user requested help
@@ -310,8 +311,11 @@
# get slave status
foreach my $slave (@slaves) {
- open my $STATE, '<', "$sysdir/$bond/slave_$slave/operstate"
- or unknown_error("Couldn't open $sysdir/$bond/slave_$slave/operstate: $!");
+ my $statefile = -e "$sysdir/$bond/slave_$slave/operstate"
+ ? "$sysdir/$bond/slave_$slave/operstate"
+ : "$sysdir/$bond/lower_$slave/operstate";
+ open my $STATE, '<', "$statefile"
+ or unknown_error("Couldn't open $statefile: $!");
chop($bonding{$bond}{slave}{$slave} = <$STATE>);
close $STATE;
}
@@ -371,8 +375,8 @@
}
}
# get primary slave
- elsif (m{\A Primary \s Slave: \s (.+) \z}xms) {
- chop($bonding{$b}{primary} = $1);
+ elsif (m{\A Primary \s Slave: \s (\S+) .* \z}xms) {
+ chomp($bonding{$b}{primary} = $1);
}
# get active slave
elsif (m{\A Currently \s Active \s Slave: \s (.+) \z}xms) {
@@ -490,7 +494,8 @@
$b, $bonding{$b}{mode};
report($msg, $E_CRITICAL);
}
- elsif (defined $bonding{$b}{ad_num} and $bonding{$b}{ad_num} != scalar keys %slave) {
+ elsif (defined $bonding{$b}{ad_num} and $bonding{$b}{ad_num} != scalar keys %slave
+ and $opt{ignore_num_ad} == 0) {
my $msg = sprintf 'Bonding interface %s [%s]: Number of AD ports (%d) does not equal the number of slaves (%d)',
$b, $bonding{$b}{mode}, $bonding{$b}{ad_num}, scalar keys %slave;
report($msg, $E_WARNING);
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/debian
^
|
+(directory)
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/debian/changelog
^
|
@@ -0,0 +1,23 @@
+check-linux-bonding (1.4-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> Tue, 13 May 2014 16:00:00 +0200
+
+check-linux-bonding (1.3.2-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> Fri, 14 Dec 2012 12:00:00 +0100
+
+check-linux-bonding (1.3.1-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> Thu, 26 Oct 2010 15:39:33 +0200
+
+check-linux-bonding (1.3.0-1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> Thu, 26 Aug 2010 10:57:46 +0200
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/debian/compat
^
|
@@ -0,0 +1 @@
+7
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/debian/control
^
|
@@ -0,0 +1,17 @@
+Source: check-linux-bonding
+Section: admin
+Priority: extra
+Maintainer: Trond Hasle Amundsen <t.h.amundsen@usit.uio.no>
+Build-Depends: debhelper (>= 7), perl
+Standards-Version: 3.8.3
+Homepage: http://folk.uio.no/trondham/software/check_linux_bonding.html
+
+Package: check-linux-bonding
+Architecture: all
+Depends: ${perl:Depends}, ${misc:Depends}
+Suggests: nagios-nrpe-plugin
+Description: check_linux_bonding is a plugin for the Nagios monitoring
+ software that checks bonding interfaces on Linux. The plugin is
+ fairly simple and will report any interfaces that are down (both
+ masters and slaves). It will also alert you of bonding interfaces
+ with only one slave, since that usually points to a misconfiguration.
\ No newline at end of file
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/debian/copyright
^
|
@@ -0,0 +1,17 @@
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Name: check_linux_bonding
+Maintainer: Trond Hasle Amundsen <t.h.amundsen@usit.uio.no>
+Source: http://folk.uio.no/trondham/software/check_linux_bonding.html
+
+Copyright: 2010, Trond Hasle Amundsen <t.h.amundsen@usit.uio.no>
+Licence: GPL-3+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+ .
+ On Debian systems, the complete text of the latest version of the GNU
+ General Public License can be found in `/usr/share/common-licenses/GPL'.
+ .
+ The complete text of version 3 of the GNU General Public License can
+ be found in `/usr/share/common-licenses/GPL-3'.
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/debian/dirs
^
|
@@ -0,0 +1 @@
+usr/lib/nagios/plugins
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/debian/docs
^
|
@@ -0,0 +1 @@
+README
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/debian/rules
^
|
@@ -0,0 +1,59 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+DESTDIR=debian/check-linux-bonding
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ install -p -m 0755 check_linux_bonding $(DESTDIR)/usr/lib/nagios/plugins
+
+binary-indep: build install
+
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs CHANGES
+ dh_installdocs
+ dh_installman check_linux_bonding.8
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_perl
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/man
^
|
+(directory)
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/man/Makefile
^
|
@@ -0,0 +1,23 @@
+# Special variables
+DOCBOOK_XSLT = http://docbook.sourceforge.net/release/xsl/current/manpages/profile-docbook.xsl
+XSLTPROC = /usr/bin/xsltproc
+XSLTPROC_FLAGS = --catalogs --xinclude --nonet --stringparam profile.condition "with_false"
+XMLLINT = /usr/bin/xmllint
+XMLLINT_FLAGS = --catalogs --postvalid --nonet --xinclude --noout
+SGML_CATALOG_FILES = /etc/xml/catalog
+
+export SGML_CATALOG_FILES
+
+MANS = check_linux_bonding.8
+
+default: man
+
+man: $(MANS)
+
+clean:
+ rm $(MANS)
+
+check_linux_bonding.8: check_linux_bonding.8.xml
+ $(XMLLINT) $(XMLLINT_FLAGS) $<
+ $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCBOOK_XSLT) $<
+
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/man/check_linux_bonding.8
^
|
@@ -0,0 +1,223 @@
+'\" t
+.\" Title: check_linux_bonding
+.\" Author: Trond Hasle Amundsen <t.h.amundsen@usit.uio.no>
+.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
+.\" Date: 05/13/2014
+.\" Manual: Nagios plugin
+.\" Source: check_linux_bonding
+.\" Language: English
+.\"
+.TH "CHECK_LINUX_BONDING" "8" "05/13/2014" "check_linux_bonding" "Nagios plugin"
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+check_linux_bonding \- Nagios plugin for checking the status of bonded network interfaces (masters and slaves) on Linux servers\&.
+.SH "SYNOPSIS"
+.HP \w'\fBcheck_linux_bonding\fR\ 'u
+\fBcheck_linux_bonding\fR [\fIoption\fR\&.\&.\&.]
+.SH "DESCRIPTION"
+.PP
+
+\fBcheck_linux_bonding\fR
+is a plugin for the Nagios monitoring software that checks bonding interfaces on Linux\&. The plugin is fairly simple and will report any interfaces that are down (both masters and slaves)\&. It will also alert you of bonding interfaces with only one slave, since that usually points to a misconfiguration\&. If no bonding interfaces are detected, the plugin will exit with an OK value (modifiable with the
+\fB\-\-no\-bonding\fR
+option)\&. It is therefore safe to run this plugin on all your Linux machines:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ \&./check_linux_bonding
+OK: No bonding interfaces found
+
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+The plugin will first try to use the sysfs (/sys) filesystem to detect bonding interfaces\&. If that does not work, i\&.e\&. the kernel or bonding module is too old for the necessary files to exist, the plugin will use procfs (/proc) as a fallback\&. The plugin supports an unlimited number of bonding interfaces\&.
+.PP
+In the OK output, the plugin will indicate which of the slaves is active with an exclamation mark
+\(lq!\(rq, if applicable\&. If one of the slaves is configured as primary, this is indicated with an asterisk
+\(lq*\(rq:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ \&./check_linux_bonding
+Interface bond0 is UP: mode=1 (active\-backup), 2 slaves: eth0*, eth1!
+
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.SH "OPTIONS"
+.PP
+\fB\-b\fR, \fB\-\-blacklist \fR\fB\fIstring\fR\fR\fB | \fR\fB\fIfile\fR\fR
+.RS 4
+Blacklist one or more interfaces\&. The option can be specified multiple times\&. If the argument is a file, the file is expected to contain a single line with the same syntax, i\&.e\&.:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fIinterface1\fR,\fIinterface2\fR,\&.\&.\&.
+
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Examples:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+check_linux_bonding \-b bond1 \-b eth1
+check_linux_bonding \-b bond1,eth1
+check_linux_bonding \-b /etc/check_linux_bonding\&.black
+
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.RE
+.PP
+\fB\-n\fR, \fB\-\-no\-bonding \fR\fB\fIstring\fR\fR
+.RS 4
+This option lets you specify the return value of the plugin if no bonding interfaces are found\&. The option expects
+\(lqok\(rq,
+\(lqwarning\(rq,
+\(lqcritical\(rq
+or
+\(lqunknown\(rq
+as the argument\&. Default is
+\(lqok\(rq
+if the option is not present\&.
+.RE
+.PP
+\fB\-\-slave\-down\fR \fIstring\fR
+.RS 4
+This option lets you specify the return value of the plugin if a slave interface is down\&. The option expects
+\(lqok\(rq,
+\(lqwarning\(rq,
+\(lqcritical\(rq
+or
+\(lqunknown\(rq
+as the argument\&. Default is
+\(lqwarning\(rq
+if the option is not present\&.
+.RE
+.PP
+\fB\-t\fR, \fB\-\-timeout \fR\fB\fIseconds\fR\fR
+.RS 4
+The number of seconds after which the plugin will abort\&. Default timeout is 5 seconds if the option is not present\&.
+.RE
+.PP
+\fB\-s\fR, \fB\-\-state\fR
+.RS 4
+Prefix each alert with its corresponding service state (i\&.e\&. warning, critical etc\&.)\&. This is useful in case of several alerts from the same monitored system\&.
+.RE
+.PP
+\fB\-S\fR, \fB\-\-short\-state\fR
+.RS 4
+Same as the
+\fB\-\-state\fR
+option above, except that the state is abbreviated to a single letter (\fIW\fR=warning,
+\fIC\fR=critical etc\&.)\&.
+.RE
+.PP
+\fB\-\-ignore\-num\-ad\fR
+.RS 4
+Only relevant for IEEE 802\&.3ad type bonding\&. Turning on this option instructs the plugin to not issue a warning if the number of AD ports are not equal to the number of slaves\&. Usually you\'ll want the default behaviour, but if your 802\&.3ad bonding device is bound on more than one switch, you\'ll want to use this option to avoid false positives\&.
+.RE
+.PP
+\fB\-\-linebreak\fR \fIstring\fR
+.RS 4
+check_linux_bonding will sometimes report more than one line, e\&.g\&. if there are several alerts\&. If the script has a TTY, it will use regular linebreaks\&. If not (which is the case with NRPE) it will use HTML linebreaks\&. Sometimes it can be useful to control what the plugin uses as a line separator, and this option provides that control\&.
+.sp
+The argument is the exact string to be used as the line separator\&. There are two exceptions, i\&.e\&. two keywords that translates to the following:
+.sp
+
+\fIREG\fR: Regular linebreaks, i\&.e\&.
+\(lq\en\(rq\&.
+.sp
+
+\fIHTML\fR: HTML linebreaks, i\&.e\&.
+\(lq<br/>\(rq\&.
+.sp
+This is a rather special option that is normally not needed\&. The default behaviour should be sufficient for most users\&.
+.RE
+.PP
+\fB\-\-disable\-sysfs\fR
+.RS 4
+Sometimes the information in
+/sys
+is partly absent or deficient, and the plugin is unable to detect this discrepancy and reports errors\&. This usually happens with old Linux kernels and Xen domain\-0 systems\&. This option exists as a workaround\&. If specified, this option will make the plugin ignore the
+/sys
+filesystem alltogether and use the
+/proc
+filesystem instead\&.
+.RE
+.PP
+\fB\-v\fR, \fB\-\-verbose\fR
+.RS 4
+Verbose output\&. Will report status on all bonding interfaces, regardless of their alert state\&.
+.RE
+.PP
+\fB\-h\fR, \fB\-\-help\fR
+.RS 4
+Display help message and exit\&.
+.RE
+.PP
+\fB\-V\fR, \fB\-\-version\fR
+.RS 4
+Print version info and exit\&.
+.RE
+.SH "DIAGNOSTICS"
+.PP
+The option
+\fB\-v\fR
+or
+\fB\-\-verbose\fR
+can be specified to display all bonding interfaces\&.
+.SH "DEPENDENCIES"
+.PP
+This plugin depends on sysfs and fallbacks to procfs\&. Without these filesystems the plugin will not find any bonding interfaces\&.
+.SH "EXIT STATUS"
+.PP
+If no errors are discovered, a value of 0 (OK) is returned\&. An exit value of 1 (WARNING) signifies one or more non\-critical errors, while 2 (CRITICAL) signifies one or more critical errors\&.
+.PP
+The exit value 3 (UNKNOWN) is reserved for errors within the script, or errors getting values sysfs or procfs\&.
+.SH "BUGS AND LIMITATIONS"
+.PP
+None known at present\&.
+.SH "INCOMPATIBILITIES"
+.PP
+The plugin is only compatible with the Linux operating system\&.
+.SH "LICENSE AND COPYRIGHT"
+.PP
+This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version\&.
+.PP
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&.
+.PP
+You should have received a copy of the GNU General Public License along with this program\&. If not, see http://www\&.gnu\&.org/licenses/\&.
+.SH "SEE ALSO"
+.PP
+
+http://folk\&.uio\&.no/trondham/software/check_linux_bonding\&.html
+.SH "AUTHORS"
+.PP
+\fBTrond Hasle Amundsen <t\&.h\&.amundsen@usit\&.uio\&.no>\fR
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/man/check_linux_bonding.8.xml
^
|
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+<reference>
+<title>Nagios plugin</title>
+<refentry>
+
+ <refentryinfo>
+ <productname>check_linux_bonding</productname>
+ <orgname>Trond Hasle Amundsen <t.h.amundsen@usit.uio.no></orgname>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>check_linux_bonding</refentrytitle>
+ <manvolnum>8</manvolnum>
+ </refmeta>
+
+ <refnamediv id='name'>
+ <refname>check_linux_bonding</refname>
+ <refpurpose>
+ Nagios plugin for checking the status of bonded network
+ interfaces (masters and slaves) on Linux servers.
+ </refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv id='synopsis'>
+ <cmdsynopsis>
+ <command>check_linux_bonding</command>
+ <arg choice='opt'>
+ <replaceable>option</replaceable>...
+ </arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id='description'>
+ <title>DESCRIPTION</title>
+ <para>
+ <command>check_linux_bonding</command> is a plugin for the
+ Nagios monitoring software that checks bonding interfaces on
+ Linux. The plugin is fairly simple and will report any
+ interfaces that are down (both masters and slaves). It will also
+ alert you of bonding interfaces with only one slave, since that
+ usually points to a misconfiguration. If no bonding interfaces
+ are detected, the plugin will exit with an OK value (modifiable
+ with the <option>--no-bonding</option> option). It is therefore
+ safe to run this plugin on all your Linux machines:
+ <programlisting>
+$ ./check_linux_bonding
+OK: No bonding interfaces found
+ </programlisting>
+ The plugin will first try to use the sysfs
+ (<filename>/sys</filename>) filesystem to detect bonding
+ interfaces. If that does not work, i.e. the kernel or bonding
+ module is too old for the necessary files to exist, the plugin
+ will use procfs (<filename>/proc</filename>) as a fallback. The
+ plugin supports an unlimited number of bonding interfaces.
+ </para>
+ <para>
+ In the OK output, the plugin will indicate which of the slaves
+ is active with an exclamation mark <quote>!</quote>, if
+ applicable. If one of the slaves is configured as primary, this
+ is indicated with an asterisk <quote>*</quote>:
+ <programlisting>
+$ ./check_linux_bonding
+Interface bond0 is UP: mode=1 (active-backup), 2 slaves: eth0*, eth1!
+ </programlisting>
+ </para>
+ </refsect1>
+
+ <refsect1 id='options'>
+ <title>OPTIONS</title>
+ <variablelist remap='IP'>
+ <varlistentry>
+ <term>
+ <option>-b</option>, <option>--blacklist
+ <replaceable>string</replaceable> |
+ <replaceable>file</replaceable></option>
+ </term>
+ <listitem>
+ <para>
+ Blacklist one or more interfaces. The option can be specified multiple
+ times. If the argument is a file, the file is expected to contain a
+ single line with the same syntax, i.e.:
+ <programlisting>
+<replaceable>interface1</replaceable>,<replaceable>interface2</replaceable>,...
+ </programlisting>
+ Examples:
+ <programlisting>
+check_linux_bonding -b bond1 -b eth1
+check_linux_bonding -b bond1,eth1
+check_linux_bonding -b /etc/check_linux_bonding.black
+ </programlisting>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>-n</option>, <option>--no-bonding <replaceable>string</replaceable></option>
+ </term>
+ <listitem>
+ <para>
+ This option lets you specify the return value of the
+ plugin if no bonding interfaces are found. The option
+ expects <quote>ok</quote>, <quote>warning</quote>,
+ <quote>critical</quote> or <quote>unknown</quote> as the
+ argument. Default is <quote>ok</quote> if the option is
+ not present.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>--slave-down</option> <replaceable>string</replaceable>
+ </term>
+ <listitem>
+ <para>
+ This option lets you specify the return value of the
+ plugin if a slave interface is down. The option expects
+ <quote>ok</quote>, <quote>warning</quote>,
+ <quote>critical</quote> or <quote>unknown</quote> as the
+ argument. Default is <quote>warning</quote> if the option
+ is not present.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>-t</option>, <option>--timeout <replaceable>seconds</replaceable></option>
+ </term>
+ <listitem>
+ <para>
+ The number of seconds after which the plugin will
+ abort. Default timeout is 5 seconds if the option is not
+ present.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>-s</option>, <option>--state</option>
+ </term>
+ <listitem>
+ <para>
+ Prefix each alert with its corresponding service state
+ (i.e. warning, critical etc.). This is useful in case of
+ several alerts from the same monitored system.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>-S</option>, <option>--short-state</option>
+ </term>
+ <listitem>
+ <para>
+ Same as the <option>--state</option> option above, except
+ that the state is abbreviated to a single letter
+ (<emphasis>W</emphasis>=warning,
+ <emphasis>C</emphasis>=critical etc.).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>--ignore-num-ad</option>
+ </term>
+ <listitem>
+ <para>
+ Only relevant for IEEE 802.3ad type bonding. Turning on
+ this option instructs the plugin to not issue a warning if
+ the number of AD ports are not equal to the number of
+ slaves. Usually you'll want the default behaviour, but if
+ your 802.3ad bonding device is bound on more than one
+ switch, you'll want to use this option to avoid false
+ positives.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>--linebreak</option> <replaceable>string</replaceable>
+ </term>
+ <listitem>
+ <para>
+ check_linux_bonding will sometimes report more than one line, e.g. if
+ there are several alerts. If the script has a TTY, it will use regular
+ linebreaks. If not (which is the case with NRPE) it will use HTML
+ linebreaks. Sometimes it can be useful to control what the plugin uses
+ as a line separator, and this option provides that control.
+ </para>
+ <para>
+ The argument is the exact string to be used as the line
+ separator. There are two exceptions, i.e. two keywords
+ that translates to the following:
+ </para>
+ <para>
+ <emphasis>REG</emphasis>: Regular linebreaks,
+ i.e. <quote>\n</quote>.
+ </para>
+ <para>
+ <emphasis>HTML</emphasis>: HTML linebreaks,
+ i.e. <quote><br/></quote>.
+ </para>
+ <para>
+ This is a rather special option that is normally not
+ needed. The default behaviour should be sufficient for
+ most users.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>--disable-sysfs</option>
+ </term>
+ <listitem>
+ <para>
+ Sometimes the information in <filename>/sys</filename> is
+ partly absent or deficient, and the plugin is unable to
+ detect this discrepancy and reports errors. This usually
+ happens with old Linux kernels and Xen domain-0
+ systems. This option exists as a workaround. If specified,
+ this option will make the plugin ignore the
+ <filename>/sys</filename> filesystem alltogether and use
+ the <filename>/proc</filename> filesystem instead.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>-v</option>, <option>--verbose</option>
+ </term>
+ <listitem>
+ <para>
+ Verbose output. Will report status on all bonding
+ interfaces, regardless of their alert state.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>-h</option>, <option>--help</option>
+ </term>
+ <listitem>
+ <para>
+ Display help message and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>-V</option>, <option>--version</option>
+ </term>
+ <listitem>
+ <para>
+ Print version info and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1 id='diagnostics'>
+ <title>DIAGNOSTICS</title>
+ <para>
+ The option <option>-v</option> or <option>--verbose</option> can
+ be specified to display all bonding interfaces.
+ </para>
+ </refsect1>
+
+ <refsect1 id='dependencies'>
+ <title>DEPENDENCIES</title>
+ <para>
+ This plugin depends on sysfs and fallbacks to procfs. Without
+ these filesystems the plugin will not find any bonding
+ interfaces.
+ </para>
+ </refsect1>
+
+ <refsect1 id='exit_status'>
+ <title>EXIT STATUS</title>
+ <para>
+ If no errors are discovered, a value of 0 (OK) is returned. An
+ exit value of 1 (WARNING) signifies one or more non-critical
+ errors, while 2 (CRITICAL) signifies one or more critical
+ errors.
+ </para>
+ <para>
+ The exit value 3 (UNKNOWN) is reserved for errors within the
+ script, or errors getting values sysfs or procfs.
+ </para>
+ </refsect1>
+
+ <refsect1 id='bugs_and_limitations'>
+ <title>BUGS AND LIMITATIONS</title>
+ <para>
+ None known at present.
+ </para>
+ </refsect1>
+
+ <refsect1 id='incompatibilities'>
+ <title>INCOMPATIBILITIES</title>
+ <para>
+ The plugin is only compatible with the Linux operating system.
+ </para>
+ </refsect1>
+
+ <refsect1 id='license_and_copyright'>
+ <title>LICENSE AND COPYRIGHT</title>
+ <para>
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or (at
+ your option) any later version.
+ </para>
+ <para>
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+ </para>
+ <para>
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+ </para>
+ </refsect1>
+
+ <refsect1 id='see_also'>
+ <title>SEE ALSO</title>
+ <para>
+ <uri>
+ http://folk.uio.no/trondham/software/check_linux_bonding.html
+ </uri>
+ </para>
+ </refsect1>
+
+</refentry>
+</reference>
+
|
[-]
[+]
|
Added |
check_linux_bonding-1.4.tar.bz2/nagios-plugins-bonding.spec
^
|
@@ -0,0 +1,105 @@
+# Name of the plugin
+%global plugin check_linux_bonding
+
+# No binaries here, do not build a debuginfo package
+%global debug_package %{nil}
+
+# SUSE installs Nagios plugins under /usr/lib, even on 64-bit
+# It also uses noarch for non-binary Nagios plugins and has different
+# package names for docbook.
+%if %{defined suse_version}
+%global nagiospluginsdir /usr/lib/nagios/plugins
+%global docbookpkg docbook-xsl-stylesheets
+BuildArch: noarch
+%else
+%global nagiospluginsdir %{_libdir}/nagios/plugins
+%global docbookpkg docbook-style-xsl
+%endif
+
+Name: nagios-plugins-bonding
+Version: 1.4
+Release: 1%{?dist}
+Summary: Nagios plugin to check Linux bonding interfaces
+
+Group: Applications/System
+License: GPLv3+
+URL: http://folk.uio.no/trondham/software/%{plugin}.html
+Source0: http://folk.uio.no/trondham/software/files/%{plugin}-%{version}.tar.gz
+
+# Since we're also building for RHEL5
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+# Building requires Docbook XML
+BuildRequires: libxslt
+BuildRequires: libxml2
+BuildRequires: %{docbookpkg}
+
+# Owns the nagios plugins directory
+Requires: nagios-plugins
+
+# Makes the transition to new package name easier for existing
+# users of RPM packages
+Provides: check_linux_bonding = %{version}-%{release}
+Obsoletes: check_linux_bonding < 1.3.2
+
+%description
+check_linux_bonding is a plugin for Nagios that checks bonding
+interfaces on Linux. The plugin is fairly simple and will report any
+interfaces that are down (both masters and slaves). It will also alert
+you of bonding interfaces with only one slave, since that usually
+points to a misconfiguration.
+
+%prep
+%setup -q -n %{plugin}-%{version}
+
+%build
+pushd man
+make clean && make
+popd
+
+%install
+rm -rf %{buildroot}
+install -Dp -m 0755 %{plugin} %{buildroot}%{nagiospluginsdir}/%{plugin}
+install -Dp -m 0644 man/%{plugin}.8 %{buildroot}%{_mandir}/man8/%{plugin}.8
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-, root, root, -)
+%doc COPYING CHANGES
+%{nagiospluginsdir}/%{plugin}
+%{_mandir}/man8/%{plugin}.8*
+
+
+%changelog
+* Tue May 13 2014 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 1.4-1
+- Release 1.4
+
+* Fri Dec 14 2012 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 1.3.2-1
+- Version 1.3.2
+- New man page format
+- New package name
+- Fixed buildrequires and requires
+
+* Tue Oct 26 2010 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 1.3.1-1
+- Version 1.3.1
+
+* Thu Aug 26 2010 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 1.3.0-1
+- Version 1.3.0
+
+* Wed Feb 17 2010 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 1.2.1-1
+- Version 1.2.1
+
+* Tue Feb 16 2010 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 1.2.0-1
+- Version 1.2.0
+
+* Thu Oct 9 2009 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 1.1.0-1
+- Version 1.1.0
+- Locations for plugin and man page changed
+
+* Thu Jul 23 2009 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 1.0.1-1
+- Version 1.0.1
+
+* Wed Jun 10 2009 Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> - 1.0.0-1
+- Initial release 1.0.0
|