Ad Widget

Collapse

zabbix_agentd.conf

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • christogouws
    Junior Member
    • Nov 2009
    • 20

    #1

    zabbix_agentd.conf

    Hi there,

    I have a config file that I want to copy accross to multiple servers.

    would it be possible to do this in the zabbix_agentd.conf file
    Hostname=`hostname`

    which runs the hostname command?
  • zabbix_zen
    Senior Member
    • Jul 2009
    • 426

    #2
    What about something like,


    HOST=`uname -n`
    ZBX_PATH=zabbix_cfg_files_path

    sed --in-place "s/Hostname=system.uname/Hostname=$HOST/g" $ZBX_PATH/zabbix_agentd.conf

    Comment

    • christogouws
      Junior Member
      • Nov 2009
      • 20

      #3
      Not exactly what I had in mind.

      I split all my UserParameters up into different files & want to deploy
      all the configs via SVN to a bunch of hosts.

      Comment

      • trikke
        Senior Member
        • Aug 2007
        • 140

        #4
        Hi,
        as far as i remember, commenting out the Hostname aka not defining it at all, forces the client to use `hostname`as name of the agent.


        Greets
        Patrick

        Comment

        • christogouws
          Junior Member
          • Nov 2009
          • 20

          #5
          Originally posted by trikke
          Hi,
          as far as i remember, commenting out the Hostname aka not defining it at all, forces the client to use `hostname`as name of the agent.


          Greets
          Patrick

          If that work's you are my hero.

          I'll give it a shot, thanx.

          Comment

          Working...