Director: Functions/constants in custom data fields

You can only use constants from CheckCommand, by using a Icinga DSL function for an argument.

object CheckCommand "Test" {
    import "plugin-check-command"
    command = [ PluginDir + "/test" ]
    arguments += {
        "-p" = {{
            return MyCredentials.password
        }}
        "-u" = {{
            return MyCredentials.username
        }}
    }
}

Bildschirmfoto%20von%202018-05-29%2011-41-21

Original author: @mfrosch

1 Like