mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-22 02:13:44 +01:00
This commit is contained in:
parent
2c1ae33ee4
commit
69418e7d40
@ -20,9 +20,9 @@ for ip in $IPS; do
|
|||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
HOSTN=$ip
|
HOSTN=$ip
|
||||||
else
|
else
|
||||||
HOSTN=`echo $RES | head -n 1 | sed 's/.*name pointer //'`
|
HOSTN=`echo $RES | head -n 1 | sed 's/.*name pointer //' | sed 's/\.$//'`
|
||||||
fi
|
fi
|
||||||
echo $ip = $HOSTN
|
echo $ip = $HOSTN
|
||||||
addhost --host $HOSTN --ip $ip --group misc
|
addhost --host $HOSTN --ip $ip --group misc --templates autodiscover
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user