[ZBX-3797] FreeBSD disk statistics Created: 2011 May 11  Updated: 2017 May 30  Resolved: 2011 Jun 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 1.8.5
Fix Version/s: 1.8.6

Type: Incident report Priority: Trivial
Reporter: Pavel Timofeev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

FreeBSD



 Description   

Zabbix agent doesn't show right disk stats like vfs.dev.read and vfs.dev.write under FreeBSD.
It may takes device name like pass or ada (vfs.dev.read[ada]) while FreeBSD uses pass0 or pass1, ada0 or ada1 and this is different devices!
vfs.dev.read[ada] works, but vfs.dev.read[ada0] doesn't work. While vfs.dev.read[ada0] will be right!



 Comments   
Comment by Oleksii Zagorskyi [ 2011 May 24 ]

Just for case - from man of smartctl:
FREEBSD: Use the forms "/dev/ad[0-9]" for IDE/ATA devices and "/dev/da[0-9]" or "/dev/pass[0-9]" for SCSI devices. For SATA devices on AHCI bus use "/dev/ada[0-9]" format.

Note: according to documentation FreeBSD support only "ops" and "bps" as type for the key "vfs.dev.read[]"
So, for testing (to be 100% sure) need to specify type.

My testing is unsuccessful (sata HDD).
zabbix_get -s x.x.x.x -k "vfs.dev.read[ad0,bps]"
ZBX_NOTSUPPORTED

edits:
But this works:
zabbix_get -s x.x.x.x -k "vfs.dev.read[ad,bps]"
0.000000
zabbix_get -s x.x.x.x -k "vfs.dev.read[ad]"
0.000000

FreeBSD 8.1

Comment by Pavel Timofeev [ 2011 May 24 ]

You're right, Oleksiy.
Linux uses letters (for example, sd[a-z]) for disks and numbers (sda[0-9]) for partitions.
FreeBSD uses numbers for disks (ada[0-9]) and s[1-4] with letters (ada0s1a, ada0s1d, ada0s2a, etc.) for slices and partitions.

Comment by Pavel Timofeev [ 2011 May 24 ]

the problem was spotted back in 2010
http://www.zabbix.com/forum/showthread.php?t=16971

Comment by Oleksii Zagorskyi [ 2011 May 24 ]

User zerg from the mentioned forum thread said that "operations" is supported for FreeBSD too.

I checked and really it's truth, and even more:
#zabbix_get -s x.x.x.x -k "vfs.dev.write[ad,operations]"
8234060

  1. zabbix_get -s x.x.x.x -k "vfs.dev.write[ad,bytes]"
    141045127168

<operations> and <bytes> should be documented as supported.

Comment by Alexander Vladishev [ 2011 Jun 02 ]

Confirmed in the last 1.8 branch, r20000.

Comment by Alexander Vladishev [ 2011 Jun 02 ]

Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-3797

Comment by Alexander Vladishev [ 2011 Jun 02 ]

Fixed in version pre1.8.6, r20008

Comment by Pavel Timofeev [ 2011 Jun 03 ]

> Fixed in version pre1.8.6, r20008
Thanks! How can I test it?

And what about 1.9 branch?

Comment by richlv [ 2011 Jun 03 ]

to test you can either get nightly build or grab source from svn : http://www.zabbix.com/wiki/contrib/getting_source

this was also merged to trunk (1.9) in revision 20009

Comment by Pavel Timofeev [ 2011 Jun 03 ]

Big thanks)

Comment by Oleksii Zagorskyi [ 2011 Jun 03 ]

additionally tested. it works.
changes added to 2.0 documentation too, do not forget to do this

Generated at Thu Apr 25 18:01:17 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.