Another update ... still not working.
The Operations message:
SSL Certificate expires in {{HOST.HOST}:{ITEM.KEY}.last()} days !!
Issuer: {{HOST.HOST}:system.run[/usr/local/bin/checkissuer.sh {EVENT.NAME}.regsub("^.*- (.*?)(?: \()", "\1") 443].last()}
evaluated the message as:
SSL Certificate expires in 0 days !!
Issuer: {zabbix.mydomain.com:system.run[/usr/local/bin/checkissuer.sh SSL Certificate Expired! - mydomain.com.regsub("^.*- (.*?)(?: \()", "\1") 443].last()}
The expression "{{HOST.HOST}:{ITEM.KEY}.last()}" returned the appropriate value of "0".
The expression "{{HOST.HOST}" returned "zabbix.mydomain.com" appropriately enough.
And even the "{EVENT.NAME}" was expanded to "SSL Certificate Expired! - mydomain.com".
But, the rest of the expression was treated as literal text. The regsub() portion was not interpreted at all.
I have seen several other posts with similar issues, but no answers.
https://www.zabbix.com/forum/zabbix-...cro-event-name (Nov 2018)
https://www.zabbix.com/forum/zabbix-...-for-tag-value (Mar 2019)
https://www.zabbix.com/forum/zabbix-...sage-templates
https://www.zabbix.com/documentation...acro_functions
The last one says {ITEM.LASTVALUE} is supported.
I am beginning to believe that {EVENT.NAME}.regsub is NOT supported, and that there really is no way for me to achieve what I want to do.
Does anyone have any examples or other suggestions?
The Operations message:
SSL Certificate expires in {{HOST.HOST}:{ITEM.KEY}.last()} days !!
Issuer: {{HOST.HOST}:system.run[/usr/local/bin/checkissuer.sh {EVENT.NAME}.regsub("^.*- (.*?)(?: \()", "\1") 443].last()}
evaluated the message as:
SSL Certificate expires in 0 days !!
Issuer: {zabbix.mydomain.com:system.run[/usr/local/bin/checkissuer.sh SSL Certificate Expired! - mydomain.com.regsub("^.*- (.*?)(?: \()", "\1") 443].last()}
The expression "{{HOST.HOST}:{ITEM.KEY}.last()}" returned the appropriate value of "0".
The expression "{{HOST.HOST}" returned "zabbix.mydomain.com" appropriately enough.
And even the "{EVENT.NAME}" was expanded to "SSL Certificate Expired! - mydomain.com".
But, the rest of the expression was treated as literal text. The regsub() portion was not interpreted at all.
I have seen several other posts with similar issues, but no answers.
https://www.zabbix.com/forum/zabbix-...cro-event-name (Nov 2018)
https://www.zabbix.com/forum/zabbix-...-for-tag-value (Mar 2019)
https://www.zabbix.com/forum/zabbix-...sage-templates
https://www.zabbix.com/documentation...acro_functions
The last one says {ITEM.LASTVALUE} is supported.
I am beginning to believe that {EVENT.NAME}.regsub is NOT supported, and that there really is no way for me to achieve what I want to do.
Does anyone have any examples or other suggestions?
Comment