Ad Widget

Collapse

Change agent name during autoregistration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stanislav
    Junior Member
    • Jan 2020
    • 3

    #1

    Change agent name during autoregistration

    Hello,

    Can anyone please assist with the following?
    I would like to add a string to a hostname parameter in config file, during the Agent installation process.

    For example if a server name is SBS2011 - the agent will pull the NetBios name as SBS2001 and will pass it to the Zabbix Server.
    I need to find a way to add a string to the hostname before it is passed to Zabbix Server - for example CustomerName-SBS2011.

    Is it possible? If so then how should I do it?

    Thanks in advance.
  • 1berto
    Senior Member
    • Sep 2018
    • 182

    #2
    You can set the hostname with 'any' string you want.
    The best way to do it depends on how do you install the agent.
    In my case i have 10.000+ hosts, so i create a postint script that changes the needed parameters.
    Those are Unix hosts, so i basically used sed.

    Comment

    • Stanislav
      Junior Member
      • Jan 2020
      • 3

      #3
      Originally posted by 1berto
      You can set the hostname with 'any' string you want.
      The best way to do it depends on how do you install the agent.
      In my case i have 10.000+ hosts, so i create a postint script that changes the needed parameters.
      Those are Unix hosts, so i basically used sed.
      Thank you for your answer! This is what i came to after trying various things to no avail. The question is however how do I make the change to HostName parameter in config file BEFORE it registers itself in zabbix server?

      Comment

      Working...