Answer the question
In order to leave comments, you need to log in
How can I implement device monitoring by ping?
It is necessary to implement monitoring of the status of devices by ping, there is no SNMP and there is no possibility to raise it. Linux OS, preferably a free solution. I looked towards Nagios, but I would like a simpler system.
Answer the question
In order to leave comments, you need to log in
Может так:
#!/bin/bash
#Тут целевой айпи
IP='192.168.0.15'
#утилитка fping
fping -c1 -t300 $IP 2>/dev/null 1>/dev/null
if [ "$?" = 0 ]
then
exit
else
#Отправляем письмо с помощью msmtp на админа
echo "Узел 192.168.0.15 не доступен" | msmtp -d [email protected]
fi
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question