Hello,
I assume it is not possible
but let me ask anyway.
I have template created by myself - working fine, does what expected. It monitores one log file (item) looking for several strings (so have several triggers). To have more log entries monitored, I have to create more triggers in template.
One sample triger is visible below:
-----
uuid: 61794942efb14cfca172f166f08ab2b7
expression: 'find(/DSKSYS linux custom events collector/logrt[/var/log/zabbix/events_zabbix.log,custom_alert,,,all],180,"like","HIGH custom_alert mariadb error")=1'
name: 'DSKSYS linux - MariaDB service down on host'
event_name: 'DSKSYS linux - MariaDB service down on host'
priority: HIGH
manual_close: 'YES'
-----
As shown, if string 'HIGH custom_alert mariadb error' would appear in monitored log file, error with sev 'HIGH' and provided description will be created - which is fine; I wonder however if there is existing / known option to use variables; I would love to set somehow string 'HIGH custom_alert mariadb error' as $var, and the use it in template, for example:
-----
uuid: 61794942efb14cfca172f166f08ab2b7
expression: 'find(/DSKSYS linux custom events collector/logrt[/var/log/zabbix/events_zabbix.log,custom_alert,,,all],180,"like","HIGH custom_alert mariadb error")=1'
set $var as 'string logrt is loking for' (here: 'HIGH custom_alert mariadb error')
name: 'DSKSYS linux - $var'
event_name: 'DSKSYS linux - $var'
priority: `$var | awk '{print($1)}`
manual_close: 'YES'
-----
If there would be such option, I could use one trigger to raise several types of alerts based on one combination: item+trigger. Is it / does it exists?
regards
Tomasz
I assume it is not possible
but let me ask anyway.I have template created by myself - working fine, does what expected. It monitores one log file (item) looking for several strings (so have several triggers). To have more log entries monitored, I have to create more triggers in template.
One sample triger is visible below:
-----
uuid: 61794942efb14cfca172f166f08ab2b7
expression: 'find(/DSKSYS linux custom events collector/logrt[/var/log/zabbix/events_zabbix.log,custom_alert,,,all],180,"like","HIGH custom_alert mariadb error")=1'
name: 'DSKSYS linux - MariaDB service down on host'
event_name: 'DSKSYS linux - MariaDB service down on host'
priority: HIGH
manual_close: 'YES'
-----
As shown, if string 'HIGH custom_alert mariadb error' would appear in monitored log file, error with sev 'HIGH' and provided description will be created - which is fine; I wonder however if there is existing / known option to use variables; I would love to set somehow string 'HIGH custom_alert mariadb error' as $var, and the use it in template, for example:
-----
uuid: 61794942efb14cfca172f166f08ab2b7
expression: 'find(/DSKSYS linux custom events collector/logrt[/var/log/zabbix/events_zabbix.log,custom_alert,,,all],180,"like","HIGH custom_alert mariadb error")=1'
set $var as 'string logrt is loking for' (here: 'HIGH custom_alert mariadb error')
name: 'DSKSYS linux - $var'
event_name: 'DSKSYS linux - $var'
priority: `$var | awk '{print($1)}`
manual_close: 'YES'
-----
If there would be such option, I could use one trigger to raise several types of alerts based on one combination: item+trigger. Is it / does it exists?

regards
Tomasz
Comment