ZABBIX (zabbix_agentd.conf)

ZABBIX - Monitoramento de performance de disco no Linux e MySQL

Categoria: Networking

Software: ZABBIX

[ Hits: 9.113 ]

Por: Alex Silva


Monitora a performance de disco e MySQL no Linux, medindo o IO de disco, latência, taxa de gravação, queries do MySQL, uptime, select, insert etc.



PidFile=/var/log/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=20
DebugLevel=3
EnableRemoteCommands=1
LogRemoteCommands=1
Server=IP
ListenPort=10050
StartAgents=15
Hostname=nome do host
RefreshActiveChecks=120
BufferSend=10
BufferSize=200
MaxLinesPerSecond=200
Timeout=15

#Performance de disco sda2 LVM
UserParameter=lvm.read.ops,cat /proc/diskstats | grep -a "sda2" | awk '{print $4}'
UserParameter=lvm.read.ms,cat /proc/diskstats | grep -a "sda2" | awk '{print $7}'
UserParameter=lvm.write.ops,cat /proc/diskstats | grep -a "sda2" | awk '{print $8}'
UserParameter=lvm.write.ms,cat /proc/diskstats | grep -a "sda2" | awk '{print $11}'
UserParameter=lvm.io.active,cat /proc/diskstats | grep -a "sda2" |awk '{print $12}'
UserParameter=lvm.io.ms,cat /proc/diskstats | grep -a "sda2" | awk '{print $13}'
UserParameter=lvm.read.sectors,cat /proc/diskstats | grep -a "sda2" | awk '{print $6}'
UserParameter=lvm.write.sectors,cat /proc/diskstats | grep -a "sda2" | awk '{print $10}'

#Tamanho dos logs em /var
UserParameter=size.total.log,du -ac /var/log/  | grep -n ^ | awk  '{print $1}' | grep ^42 | sort -h | cut -d: -f 2
UserParameter=size.zproxy.log,du -ac /var/log/zabbix/zabbix_proxy.log  | grep -n ^ | awk  '{print $1}' | grep ^2 |  sort -h | cut -d: -f 2

#Mysql Monitoring
UserParameter=mysql.version,/usr/bin/mysqladmin version -u root --password=senha | grep -n ^ | grep ^8 | awk '{print $3}'
UserParameter=mysql.Uptime,/usr/bin/mysqladmin status -u root --password=senha | awk '{print $2}'
UserParameter=mysql.ping,/usr/bin/mysqladmin ping  -u root --password=senha | grep alive | wc -l
UserParameter=mysql.Questions,/usr/bin/mysqladmin status  -u root --password=senha| awk '{print $6}'
UserParameter=mysql.Slow_queries,/usr/bin/mysqladmin status  -u root --password=senha | awk '{print $9}'
UserParameter=mysql.Flush_tables,/usr/bin/mysqladmin status  -u root --password=senha | awk '{print $14}'
UserParameter=mysql.Open_tables,/usr/bin/mysqladmin status  -u root --password=senha | awk '{print $17}'
UserParameter=mysql.Threads,/usr/bin/mysqladmin status  -u root --password=senha | awk '{print $4}'
UserParameter=mysql.Queries_per_second,/usr/bin/mysqladmin status  -u root --password=senha | cut -f9 -d ":" | tr -d " . "
  


Comentários

Nenhum comentário foi encontrado.


Contribuir com comentário

  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts