[ZBXNEXT-1302] Make vfs.dev.read/vfs.dev.write discoverable Created: 2012 Jul 04  Updated: 2019 Jun 06  Resolved: 2019 May 01

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G)
Affects Version/s: None
Fix Version/s: 4.4.0alpha1, 4.4 (plan)

Type: New Feature Request Priority: Major
Reporter: Simon Balz Assignee: Aleksejs Sestakovs
Resolution: Fixed Votes: 29
Labels: discovery, items, lld, patch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File dot.png     File vfs-dev.patch    
Issue Links:
Duplicate
is duplicated by ZBXNEXT-2093 add discovery item for disk devices Closed
is duplicated by ZBXNEXT-1706 vfs.fs.discovery should also return b... Closed
is duplicated by ZBXNEXT-3368 vfs.fs.discovery: Discover devices (n... Closed
Team: Team C
Sprint: Sprint 50 (Mar 2019), Sprint 51 (Apr 2019)
Story Points: 2

 Description   

Please add disk devices to the low-level discovery feature of Zabbix, in order to use item prototypes like vfs.dev.read[{#DEVNAME},operations].



 Comments   
Comment by richlv [ 2012 Jul 04 ]

note that userparameter_examples.conf file in the source distribution has examples for disk/partition discovery on linux and solaris

Comment by richlv [ 2012 Jul 04 ]

also, about which operating systems is this issue about ?

Comment by Alexey [ 2012 Aug 08 ]

My vote for this feature too.
I think it would be useful for any unix, but priority should be for mainstream of course (linux).

Comment by Nicola V [ 2012 Dec 07 ]

Hello, we have the very same need. Is the implementation of this feature planned?
Thanks

Comment by Thiago M Zerbinato [ 2013 Jan 10 ]

Same need here.. any news ?

Comment by Doubletwist [ 2013 Feb 13 ]

I'd love to see the same thing for Solaris.

Comment by Dominik Borkowski [ 2013 Jul 15 ]

It would be great to have such functionality integrated in the zabbix agent by default, especially since you already provide a great amount of data via vfs.dev.read/write. Something akin to 'vfs.dev.discovery'.

It would greatly simplify and clean up configurations, and allow for easier maintenance in the long run.

Thanks!

Comment by Joao Andre Simioni [ 2013 Dec 12 ]

Isn't a viable way here just to add the device on the low level discovery for mounted filesystems? (vfs.fs.discovery). The current implementation will only provide #FSTYPE and #FSNAME. It's quite easy for it to provide #FSDEV also.

I've made a small patch that implements that for Linux and Solaris, if you consider as a faster alternative.

https://www.dropbox.com/s/1n3igd0ym8d4gvp/src.patch

Comment by Volker Fröhlich [ 2014 Feb 27 ]

Attaching Joaos patch directly

Comment by Volker Fröhlich [ 2014 Nov 11 ]

For the sake of completeness: This ticket only asks for the discovery of mounted block devices. It does not consider block devices that lie underneath. It is related to ZBXNEXT-2093.

Comment by Sébastien Maccagnoni [ 2017 Apr 26 ]

Adding device to fs discovery (as suggested before) is not enough, because some devices are not related to mounted filesystems (for example, LVM physical volumes vs LVM logical volumes).
Moreover, in my opinion, vfs.dev and vfs.fs should remain separated. Having vfs.dev items depend on vfs.fs discovery is not logical.

I'm currently using the following userparameter on Ubuntu Linux :

UserParameter=vfs.dev.discovery,cd /sys/block; echo -n '{"data": ['; for i in *; do [ -n "$first"  ] && echo -n "," || first="done"; echo -n "\n  { \"{#DEVNAME}\": \"$i\"  }"; done; echo "\n]}"
Comment by Stepan Kokhanovskiy [ 2017 Jul 28 ]

I changed a bit the script by Sébastien Maccagnoni to add partitions to the output, because items vfs.dev.read and vfs.dev.write supports partitions too.

UserParameter=vfs.dev.discovery,echo -n '{"data":['; tail -n +3 /proc/partitions | awk '{print $4}' | while read -r i; do [ -n "$f" ] && echo -n ',' || f=1; echo -n "{\"{#DEVNAME}\":\"$i\"}"; done; echo ']}'
Comment by Aleksejs Sestakovs [ 2019 Apr 05 ]

Available in 4.4.0alpha1 (trunk) r92131

Comment by richlv [ 2019 May 02 ]

It was pointed out in IRC that there's no comment about documentation being updated here.

Comment by Vjaceslavs Bogdanovs [ 2019 May 03 ]

martins-v updated documentation:

Comment by Tomasz Kłoczko [ 2019 Jun 06 ]

IMO naming discovery item as vfs.dev.discovery is a bit misleading.

Block devices list has nothing to do with VFS layer.

 

Generated at Thu Mar 28 14:00:10 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.