dusharu / ZBX_Disk_Stat

Send statistic from /proc/diskstats to Zabbix
GNU General Public License v3.0
7 stars 5 forks source link

question about statistics #3

Closed emper0r closed 4 years ago

emper0r commented 4 years ago

Hi again.. just to be clear.... if I got this block disk

[root@vmtest1 ~]# lsblk
NAME              MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
fd0                 2:0    1    4K  0 disk
sda                 8:0    0   50G  0 disk
├─sda1              8:1    0    1G  0 part /boot
└─sda2              8:2    0   49G  0 part
  ├─cl-root       253:0    0 45.1G  0 lvm  /
  └─cl-swap       253:1    0  3.9G  0 lvm  [SWAP]
sdb                 8:16   0  500G  0 disk
└─mysqlvg-mysqllv 253:2    0  500G  0 lvm  /mysql
sr0                11:0    1 1024M  0 rom

Why sdb and mysqlvg-mysqllv isn't equal graphic ??

it's possible LVM create this difference when get values from vgroup and statistic from phisical disk when are in the same disk ?

image

dusharu commented 4 years ago

Hi, It's very intersting question.

I think this is sheduler error.

I try to set DebugLevel=4 in /etc/zabbix/zabbix_agentd.conf and watch log

tail -f /var/log/zabbix/zabbix_agentd.log |grep -oe '.*EXECUTE_STR() .*DISK=.*; if '

#1 measure
5774:20200721:201309.434 EXECUTE_STR() command:'DISK="sdd"; if [[ ! -b "/dev/$DISK" ]]; then DISK="$(lsblk -l -o Name,KNAME | grep $DISK |awk '{print $2}')"; fi; if
5776:20200721:201349.868 EXECUTE_STR() command:'DISK="HOME_LVM-Cloud"; if [[ ! -b "/dev/$DISK" ]]; then DISK="$(lsblk -l -o Name,KNAME | grep $DISK |awk '{print $2}')"; fi; if

#2 measure
 5775:20200721:201409.087 EXECUTE_STR() command:'DISK="sdd"; if [[ ! -b "/dev/$DISK" ]]; then DISK="$(lsblk -l -o Name,KNAME | grep $DISK |awk '{print $2}')"; fi; if
 5774:20200721:201449.513 EXECUTE_STR() command:'DISK="HOME_LVM-Cloud"; if [[ ! -b "/dev/$DISK" ]]; then DISK="$(lsblk -l -o Name,KNAME | grep $DISK |awk '{print $2}')"; fi; if

Beetwen measure for 1 block device - 1 min, but beetwen measure sdd and HOME_LVM-Cloud - 40sec.

Template get correct data, but have some different result for different disk. It's not problem for monitoring in long time interval, but it's cause some questions in short time.

emper0r commented 4 years ago

Yeah.. you are right.. it's ok... I just need to choose wich watch..because between of them exist some seconds differents to change diskstats ... cool.. thanks for answer... 👍