Ad Widget

Collapse

vfs.file.contents tail mode?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eger
    Member
    • Nov 2006
    • 95

    #1

    vfs.file.contents tail mode?

    I noticed there is a new item coming called vfs.file.contents[]. I was just needing this the other day! I have a trigger for when a log file size increases and I wanted to have a simple way to include the last couple lines (or just the last line) of the file in the action message.

    It would be neat if vfs.file.contents[] had some arguments for mode and lines. For example, default could be vfs.file.contents[<file>,<encoding>,<mode>,<lines>] where mode is 'all' by default. Mode could also be something like 'head' or 'tail' and then <lines> could specify the number of lines to gather.

    This would be useful when triggering on a size increase of a file to include the last line of the file in the action message using item vfs.file.contents[/var/log/my_log_file,utf8,tail,1] to get the last line of the file triggering. Hope someone else may have interest in this also
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    not sure about specific parameters, but you could add this as a new feature request (ZBXNEXT) in the zabbix issue tracker
    Zabbix 3.0 Network Monitoring book

    Comment

    Working...