Ad Widget

Collapse

Unable to update host community from ZabbixAPI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RenatoDeivison
    Junior Member
    • Apr 2024
    • 1

    #1

    Unable to update host community from ZabbixAPI

    I´m trying to update the "community' of all the hosts I currently have.

    Code:
    for host in zapi.host.get():
      if "02 - " in host["host"]:
         zapi.host.update({
         "hostid": host["hostid"],
         "interfaces": [{
         "details": {
              "community": "test",
          }  
       }],
    })
    Is there anyway to update it from the API ?
Working...