Resource.conf

  • Hi guys,


    I have a question concerning the usage of constants within the icinga2 director. I defined const MysqlPassword = "******" in my constants.conf and now I want to reference it when adding fields to my service. When I type MysqlPassword it treats this like a string, even if I type $MysqlPassword$. It creates something like this:


    Code
    1. template Service "Check MySQL" {
    2. check_command = "mysql"
    3. vars.mysql_password = "MysqlPassword"
    4. }


    , which is obviously wrong. Hope you can help me.


    Cheers,

    Sh4kE

  • Did you try without quotes ?

    like

    Code
    1. template Service "Check MySQL" {
    2. check_command = "mysql"
    3. vars.mysql_password = MysqlPassword
    4. }
  • I am not generating this piece of code. The director is, based on what I override the fields with. And he always does quotes around it.

    The post was edited 1 time, last by Sh4kE ().

  • What was the resolution to this? I am having this exact issue. Thanks.


    Regards,

    Jon Heese