Create a Host for a especific Zone/Endpoint with Iicinga API

This forum was archived to /woltlab and is now in read-only mode.
  • hello everybody, I'm new here,


    i'm in actually using a distributed schema with 3 zones ["master", "zone1","zone2" ], and in each zone have hust one server/endpoint

    i'm trying to create a Host with the icinga2 api that runs in zone1, my test-request its like this


    Code
    1. curl -k -s -u root:PASSWORD -H 'Accept: application/json' -X PUT 'https://192.168.16.12:5665/v1/objects/hosts/devsv3' -d '{ "templates": [ "generic-host" ], "attrs": { "address": "192.168.202.15", "check_command": "hostalive", "vars.os" : "Linux","zone" : "zone2" } }'


    but in the log output create the hosts :


    If someone has had the same problem or somebody can tell what's wrong, thanks a lot

  • HI, i'm running 2.6 in each Node,

    Code
    1. icinga2 - The Icinga 2 network monitoring daemon (version: r2.6.0-1)

    temporaly the issue was solved restarting each node, but in theory the Master Node have to update and restart the slaves automagically.

  • I checked the api call you provided using v2.6.0-1 and can not reproduce the problem.

    At my machine the new host object is found at the satellite and is checked fine.

    After deleting it at the master via the api, it disappears at the satellite as well.