Ad Widget

Collapse

Monitor date wise log using regular expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • innovator
    Junior Member
    • Dec 2014
    • 4

    #1

    Monitor date wise log using regular expression

    I want to monitor below log file in zabbix

    /var/log/syslog-ng/local/2017-07-24/localhost/ALL

    In syslog-ng log files will create in every day with date wise folder like below path.

    /var/log/syslog-ng/local/2017-07-24/localhost/

    I need to know how to specify date wise folder path in zabbix key.
  • andris
    Zabbix developer
    • Feb 2012
    • 228

    #2
    While Zabbix logrt[] item can handle log rotation between file names matching a regexp in a folder, it requires exact path (folder) name.

    One workaround - how about creating a symbolic link with a fixed name (for using in log[] or logrt[] item) to the actual folder with today's log files ? And recreating the link at midnight with cron script ?

    Best regards
    Andris

    Comment

    Working...