Hi,
I'm in Zabbix 2.2.2 (just upgraded) and I would like to extract easily a report in CSV format including all alert for a host group with date/hour, host, message, severity
I tried to create a external script under configuration/actions/operations in order to generate a txt file with those information but it seems that required parameters cannot be passed to the script. Does someone knows how to do that ?
I also tried to create a special media associated to one user using parameters $1 $2 and $3 but those parameters doesn't include the required information (host, severity). It seems that the script is executed but parameters are still empty.
I also look if there is a way to directly export alert to a syslog server but it seems that this function isn't implemented in Zabbix.
Here is my actual script :
#!/bin/bash
to=$1
subject=$2
body=$3
echo "$to" "$subject" "$body" >>/var/log/zabbix/alert_zabbix.log
launch with /usr/lib/zabbix/alertscripts/alert.sh %1 %2 %3 in configuration/action/operations as a custom script on zabbix server
Thanks for your help.
I'm in Zabbix 2.2.2 (just upgraded) and I would like to extract easily a report in CSV format including all alert for a host group with date/hour, host, message, severity
I tried to create a external script under configuration/actions/operations in order to generate a txt file with those information but it seems that required parameters cannot be passed to the script. Does someone knows how to do that ?
I also tried to create a special media associated to one user using parameters $1 $2 and $3 but those parameters doesn't include the required information (host, severity). It seems that the script is executed but parameters are still empty.
I also look if there is a way to directly export alert to a syslog server but it seems that this function isn't implemented in Zabbix.
Here is my actual script :
#!/bin/bash
to=$1
subject=$2
body=$3
echo "$to" "$subject" "$body" >>/var/log/zabbix/alert_zabbix.log
launch with /usr/lib/zabbix/alertscripts/alert.sh %1 %2 %3 in configuration/action/operations as a custom script on zabbix server
Thanks for your help.

Comment