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:
Other screenshot details:
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