Ad Widget

Collapse

Using ${ENV} variables in zabbix config

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RobC
    Junior Member
    • Jun 2012
    • 7

    #1

    Using ${ENV} variables in zabbix config

    Hi,

    I'm in the process of rolling out some systemd containers under linux each with a zabbix instance running inside them.
    The containers are build using a squashfs file with some bind-mounted overlays to make parts of the "filesystem" read/write (like where zabbix writes logs, etc).

    My problem is that the hostname variable i the config needs to be unique.
    Is there a way I can set the hostname to something like :

    hostname=${container_name} and have zabbix parse this correctly on startup?

    At the moment, having tried that I'm getting this in the error logs :

    Nov 27 08:37:59 build-27-server zabbix_agentd[22275]: zabbix_agentd [22275]: ERROR: invalid "Hostname" configuration parameter: '${CONT_NAME}': name contains invalid character '$'

    Any thoughts would be appreciated

    Cheers,
    RobC
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    the hostname parameter defaults to "hostname" as returned by the OS.

    Comment

    Working...