Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Em Português y En Español only
Search
Advanced Search
Forums
New Topics
Today's Posts
Home
Forum
Zabbix in Your Language
Em Português y En Español
If this is your first visit, be sure to check out the
FAQ
by clicking the link above. You may have to
REGISTER
before you can post. To start viewing messages, select the forum that you want to visit from the selection below.
Ad Widget
Collapse
Como monitorar link de internet?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
2
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
1
2
template
Next
bezarsnba
Member
Joined:
Aug 2013
Posts:
39
#16
15-08-2013, 20:33
Ahh
Show.
Beleza então, agora sim.
Beza
Comment
Post
Cancel
fpaternot
Member
Joined:
Feb 2013
Posts:
52
#17
15-08-2013, 21:21
O que acho que faz mais sentido é usar na trigger a função nodata(TEMPO).
Assim você pode determinar que se não receber dado nenhum em X tempo ele alarmará, ou se receber o valor de falha.
Comment
Post
Cancel
vininunes
Junior Member
Joined:
Jul 2013
Posts:
23
#18
15-08-2013, 22:02
Legal, criei então uma trigger da seguinte forma:
{server: ping.embratel.nodata(300)}&{server: ping.gvt.nodata(300)}
Valeu de novo
Comment
Post
Cancel
angelocavalcanti
Junior Member
Joined:
Jan 2019
Posts:
1
#19
02-01-2019, 20:03
Originally posted by
vininunes
Enfim consegui, vou postar aqui como eu fiz para se alguém tiver o mesmo problema futuramente poder utilizar.
Fiz a rota apontando 8.8.8.8 para um link de internet e 8.8.4.4 para outro link.
Criei um script que pinga os dois ips e escreve o resultado em um arquivo de texto:
#!/bin/bash
#
#----Embratel
IP1=8.8.8.8
ping='/bin/ping'
a=$($ping -c 1 -W 1 $IP1 | awk 'NR == 2 {print $7}' | cut -d = -f 2)
if [ -z $a ]
then
echo '0' >> /etc/zabbix/embratel.txt
else
echo $a >> /etc/zabbix/embratel.txt
fi
#-----------------------------------------------------------------------------------------------
#----GVT
IP2=8.8.4.4
ping='/bin/ping'
b=$($ping -c 1 -W 1 $IP2 | awk 'NR == 2 {print $7}' | cut -d = -f 2)
if [ -z $b ]
then
echo '0' >> /etc/zabbix/gvt.txt
else
echo $b >> /etc/zabbix/gvt.txt
fi
exit 1
Configurei o cron para rodar o script de 5 em 5 minutos, adicionando a linha: */5 * * * * root ./etc/zabbix/ping_internet.sh
no arquivo /etc/crontab
Adicionei as linhas com os parâmetros:
UserParameter=ping.embratel,tail -1 /etc/zabbix/embratel.txt | gawk "{print $1}"
UserParameter=ping.gvt,tail -1 /etc/zabbix/gvt.txt | gawk "{print $1}"
no zabbix_agentd.conf.
Criei o item no zabbix com as chaves ping.gvt e ping.embratel
Obrigado..
Comment
Post
Cancel
Previous
1
2
template
Next
Working...
Yes
No
OK
OK
Cancel
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕
Comment