690 shaares
3 liens privés
3 liens privés
5 résultats
taggé
zabbix
Since 2.2
Under Zabbix->Administration->General. In the Dropdown choose "Other". There is a new option: "Refresh unsupported items (in sec)"
Mettre 1s le temps de régler le pb et ça roule
Récupérer une métrique depuis le host
sudo zabbix_get -s hostNameOrIP -k keyName
Top des process qui consomment du CPU pour zabbix
#!/bin/bash
#####################################################
# topcpu.sh
# returns names of most CPU time consuming processes
# as reported by 'top'
#####################################################
# 05-07-2010 by Jerry Lenk
# Use at your own risk!
#####################################################
# set limit to 1st argument, or 2% if not specified
lim=$1
test -z $lim && lim=2
# run 2 iterations of top in batch mode with 1 s delay
top -b -d1 -n2 |\
gawk --assign lim=$lim 'BEGIN { reply=""}
END { print reply, "." }
# if reply is empty, at least a period is returned
# in 2nd iteration, first 3 lines
# add columns 9 (%cpu) and 12 (process name)
# to reply string, if cpu at least lim%
itr == 2 && NR <= 3 && $9 >= lim { reply=reply; printf(" %s% ",$9); system("ps --no-headers -o args -p " $1) }
# count iterations by header lines beginning with "PID"
# reset linenumber
$1 == "PID" { NR=0 ; itr +=1 }
'
# Only 2nd iteration of top is of interest because
# load values are calculated since previous iteration
Tester une métrique de l'agent zabbix :
telnet host 10050
mysql.status[Com_begin]
Mieux :
zabbix_agentd -t mysql.status[Com_begin]
(via http://stackoverflow.com/questions/33329557/userparameters-and-zbx-notsupported)
Et aussi accessible de puis le "latest data" du serveur dans la partie détails avec le carré d'information
Configuring zabbix template and mysql access for monitoring mysql
mysql -uroot -p<mysql root password> -e"GRANT USAGE ON *.* TO 'zabbix'@'127.0.0.1' IDENTIFIED BY '123456'";
mysql -uroot -p<mysql root password> -e"GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY '123456'";
mysql -uroot -p<mysql root password> -e"flush privileges"
mysql -uzabbix -p123456 -e"status"