Ad Widget

Collapse

Can Zabbix monitor the contents of a folder that has changed?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cesarsj
    Senior Member
    • Dec 2018
    • 154

    #1

    Can Zabbix monitor the contents of a folder that has changed?

    Can Zabbix monitor the contents of a folder that has changed?

    If so, could I capture as a registered value the specific file that was modified?

    For example, in /etc, rc.system (even if it is within a subdirectory, rc.d) has been changed. The trigger informs me that this file has been changed.

    Remembering that I do not want to specify the right file. I want Zabbix to let me know what it is.

    If this is not possible, can I at least see if the content has changed but without the specific file record? Just the alert that the content has changed?
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    Are the following:

    vfs.dir.size - directory size in bytes
    vfs.dir.count - number of files in directory (recursive)

    items suitable for your needs?

    https://www.zabbix.com/documentation...rted_item_keys

    Capturing what changed isn't possible out-of-the box. What you could do is create trapper item e. g. rc.system.changes of value type text and use inotify, e. g. inotifywait utility from inotify-tools package:
    Code:
    inotifywait --monitor --timefmt '%F %T' --format '[%T] [%w%f] %e' -r -e delete,create /etc
    and then send each entry using Zabbix sender to the server for that item. And then trigger an alert on receiving any value.
    Last edited by dimir; 02-10-2019, 16:38.

    Comment

    • cesarsj
      Senior Member
      • Dec 2018
      • 154

      #3
      I really liked to notify. I confess that you do not know this tool. I will make the suggestion to my boss. Thanks for the help!

      Comment

      Working...