Ad Widget

Collapse

Expand macroses in {TRIGGER.EXPRESSION}

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • viktorkho
    Member
    • Jul 2013
    • 90

    #1

    Expand macroses in {TRIGGER.EXPRESSION}

    Is there any way to expand all macros in {TRIGGER.EXPRESSION} to send to external script?

    For example, I have a trigger for item which key is external-script:
    host.foo.local:my_ext_script[{HOST.IP},param1,param2].last()}#{$MY_USER_MACRO}

    It would be perfect to send only {TRIGGER.EXPRESSION} to repair-script to let it know WHAT and WHERE was broken and CORRECT value to be set..

    PS:
    I cannot find neither related documentation, nor feature-requests for similar, but {TRIGGER.NAME} and {TRIGGER.NAME.ORIG}, {ITEM.KEY.ORIG<1-9>} and {ITEM.KEY.ORIG<1-9>} and other are makes me feel uncertainty..
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2


    {$MACRO} is not supported in Notifications and commands.
    But you can send {EVENT.ID} to your script and then use Zabbix API to get all required details in your script.
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    Working...