Ad Widget

Collapse

How to disable Global Macro expansion in Email? Alexei any suggestions?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • registration_is_lame
    Senior Member
    • Nov 2007
    • 148

    #1

    How to disable Global Macro expansion in Email? Alexei any suggestions?

    There has to be a work around to disable Global Macro expansion in Zabbix email alerts. I'd prefer Zabbix just send the global macro name as a string in emails rather than exposing the value.

    Code:
    Item values:
    
    1. Mysql Ping Status on WebServer1 (WebServer1:mysql.ping[user1,P@ssw0rd,/tmp/mysql.sock]): 1 Success.
    It we could somehow disable global macro expansion, then the output can be something like this:

    Code:
    Item values:
    
    1. Mysql Ping Status on WebServer1 (WebServer1:mysql.ping[{$ZABBIX_USER},{$ZABBIX_PWD},/tmp/mysql.sock]): 1 Success.

    The value's are not expanded when creating items though.

    Server: 3.2.0
    Agent: 3.2.0
    DB: MySql 5.5


    In the Manual examples, they do say we can pass credentials but it is exposed in emails.

    This is a example:

    UserParameter.conf file:

    Code:
    UserParameter=mysql.ping[*],mysqladmin -u $1 -p $2 -S $3 ping | grep -c alive
    LLD item prototype:

    Code:
    mysql.ping[{$ZABBIX_USER},{$ZABBIX_PWD},{#SOCKET}]
    And Zabbix Item key is:

    Code:
    mysql.ping[{$ZABBIX_USER},{$ZABBIX_PWD},/tmp/mysql.sock]
    Email content when we receive alert looks like:

    Code:
    Item values:
    
    1. Mysql Ping Status on WebServer1 (WebServer1:mysql.ping[user1,P@ssw0rd,/tmp/mysql.sock]): 1 Success.

Working...