Ad Widget

Collapse

Zabbix 3.4 Send Event Alert to File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • al.thahirie
    Junior Member
    • Sep 2017
    • 1

    #1

    Zabbix 3.4 Send Event Alert to File

    Hi all,

    I want to try sending event alert to a file, in which the file will be logrotated daily.

    I have tried creating a simple script to output to file, and use Media and Action to make Zabbix write to the file but it seems unsuccessful. there's nothing in zabbix_server.log to point what went wrong however.

    The script:
    Code:
    #!/usr/bin/bash
    
    #datetime=$(/usr/bin/date '+%d/%m/%Y %H:%M:%S');
    
    To=[$1] Trigger=[$2] Message=[$3] >> /opt/zabbix/alert/alert.log
    Other screenshot details:





Working...