Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-9609

Add support for sorting vfs.dir.get results

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Unresolved
    • Icon: High High
    • None
    • None
    • Agent (G)
    • None

      Sometimes it's necessary to monitor the oldest or newest or biggest o smallest files in a given directory that has many (1000++) files.

      Currently, vfs.dir.get return unsorted results, and it's necessary to sort them using javascript preprocessing in order to get the oldest or the newest file(s), for example.

      That can be very onerous, depending on the number of files. One can be tempted to use OS commands through system.run[] instead.

      It would be very useful if vfs.dir.get: had some 'sorting parameters'. That would resemble the 'ls' command functionality (ls -lt, ls -ltr, ls -lS, ls -lSr), for example.

      Something like:

      vfs.dir.get[dir,<regex incl>,<regex excl>,<types incl>,<types excl>,<max depth>,<min size>,<max size>,<min age>,<max age>,<regex excl dir>,<sort field>,<sort order>]
      , where:

      sort field: name (default), date, size
      sort order: asc (default), desc

            vso Vladislavs Sokurenko
            galoxucro Galo Xucro
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: