29 lines
1.2 KiB
Bash
Executable File
29 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# check_multiple_host_addresses - first attempt to implement a host check for
|
|
# multi-homed/dual-stack servers
|
|
#
|
|
# Version 1.0, latest version, documentation and bugtracker available at:
|
|
# https://gitlab.lindenaar.net/scripts/nagios-plugins
|
|
#
|
|
# Copyright (c) 2015 Frederik Lindenaar
|
|
#
|
|
# This script is free software: you can redistribute and/or modify it under the
|
|
# terms of version 3 of the GNU General Public License as published by the Free
|
|
# Software Foundation, or (at your option) any later version of the license.
|
|
#
|
|
# This script 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, visit <http://www.gnu.org/licenses/> to download it.
|
|
|
|
# Usage: check_host_addresses addr1 addr2 addr3
|
|
|
|
(for addr in $*
|
|
do
|
|
echo command[$addr]=/usr/lib/nagios/plugins/check_ping -H $addr -w 5000,100% -c 5000,100% -p 1
|
|
done ) | /usr/lib/nagios/plugins/check_multi -f - -n check_ping
|
|
|