[ZBXNEXT-3369] vfs.file.exists[file,<mode>] Created: 2016 Aug 08  Updated: 2016 Aug 16  Resolved: 2016 Aug 16

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G)
Affects Version/s: None
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: Alexandre Fournier Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: agent, items, trivial
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux


Issue Links:
Duplicate
duplicates ZBXNEXT-2921 Extend vfs.file.exists capabilities t... Closed
duplicates ZBXNEXT-1867 Support more file types by vfs.file.e... Closed
duplicates ZBXNEXT-3223 Extend vfs.file.exists Closed

 Description   

Right now, it's not possible to detect the presence of a device (or anything different than a regular file in POSIX terms). There is the typical item vfs.file.exists[file] but it discards many common file modes. At the moment the return value depends on what S_ISREG POSIX macro returns.

So it's not possible to check the presence of those types:

  • S_ISDIR If the mode is from a directory.
  • S_ISCHR If the mode is from a character special device file.
  • S_ISBLK If the mode is from a block special device file.
  • S_ISFIFO If the mode is from a FIFO (named pipe).
  • S_ISLNK If the mode is from a symbolic link.
  • S_ISSOCK If the mode is from a socket.

This proposal adds an optional parameter mode to the item vfs.file.exists in order to check for the presence of directories, devices, unix sockets, etc.

mode - POSIX mode (default is regular)

mode - possible values:
regular (default), directory, chardev, blockdev, fifo, symlink, socket



 Comments   
Comment by Marc [ 2016 Aug 09 ]

Sounds similar to ZBXNEXT-2921.

Comment by Alexandre Fournier [ 2016 Aug 09 ]

Also ZBXNEXT-3223, Sorry I did not look carefully...

Comment by Alexander Vladishev [ 2016 Aug 16 ]

Closed as duplicate of ZBXNEXT-3223 and ZBXNEXT-1867

Generated at Sat Apr 20 15:39:33 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.