Ad Widget

Collapse

updating/replacing hostmacro file for Linux with new value (e.g CPU from(80 -> 60)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dharam
    Junior Member
    • Oct 2024
    • 26

    #1

    updating/replacing hostmacro file for Linux with new value (e.g CPU from(80 -> 60)

    Hi Experts,

    Can anyone help me with below? We have hostmacro file on our Linux platform and now we have ask from our Linux team to update one of the parameter.(dont want to do it manually on each host as we have 100's of host)

    So consider we have CPU hostmacro is defined in hostmacro file and current value is 80. Now we want to change this to 60.

    Any pointer , one of the things suggested during discussion is we can create new item and use sed command yo update.

    Can anyone suggest?

  • GChmurka
    Junior Member
    • Jun 2024
    • 21

    #2
    • Log in to the Zabbix web interface.
    • Go to Configuration → Hosts. Filter the hosts you're interested in — by host group, template, tag, etc...
    • At the top-left of the host list table, check the box to select all hosts on the current page.
    • Once hosts are selected, click the Mass update button (it appears above the table).
    • Chose Macros at top
    From here, you should be able to handle it yourself.​
    Last edited by GChmurka; 01-05-2025, 22:48.

    Comment


    • dharam
      dharam commented
      Editing a comment
      Thanks for information and it helps (as i was not aware about this too) but here is my thought 1. There might be some host in same group where its modified to other value (by this approach that will also get modified)
      2. For future host which are getting added , it will have default threshold configured and we need to modify them again
  • dharam
    Junior Member
    • Oct 2024
    • 26

    #3
    I was able to create Item and trigger to retrive the existing host value and create problem record.
    Anyone know how I can run script (I have command ready) based on the output of this triggered and need to run on the host and not on appserver or proxy.

    Comment

    Working...