Ad Widget

Collapse

Pass environment to script in alerter.c

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • limo
    Senior Member
    • Dec 2004
    • 192

    #1

    Pass environment to script in alerter.c

    Hi all,

    here is small patch which add environment to external scripts for alerter. I use it for better macro evaluation in external alerter. It will set this environment variables:

    ZABBIX_ALERTID
    ZABBIX_ACTIONID
    ZABBIX_ALERTCLOCK
    ZABBIX_MEDIATYPEID
    ZABBIX_ALERTSTATUS
    ZABBIX_ALERTRETRIES
    ZABBIX_ALERTDELAY

    Now I can take actionid in user script and find triggerid, hosts used in trigger and items used in trigger to evaluate some macros. I will do some example script later.

    Feel free to use!
    Lukas
    Attached Files
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Committed to ZABBIX sources with slightly different naming.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • limo
      Senior Member
      • Dec 2004
      • 192

      #3
      Thanx a lot !

      Btw, I have asked in another thread, if zabbix will support alert limits. It is important for me to know if I should make limits in external software or you are planing it?

      There are some false alarms or too many alarms generated and I want to limit eg. maximum number of sms sent per hour. If there is more alerts, limiter should send only one message that there are other alerts waiting.

      Thanx again !

      Comment

      Working...