empty result when i modify service check over API

This forum was archived to /woltlab and is now in read-only mode.
  • Moin!


    I will modify an simple service check over the API:

    Code
    1. curl -k -uroot:icinga -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-HTTP-Method-Override: POST' https://172.17.0.2:5665/v1/objects/services --data '{"templates":["generic-service"], "attrs": { "check_interval": 60, "vars": { "http_url":"/acces
    2. s/login", "http_address":"10.41.80.63"}}, "filter":"service.name==\"new_http\""}'

    But my result are empty:

    Code
    1. {"results":[]}

    when i turned on the Debug Log, i see the connection and nothing else:


    I have this never seen before and i'm confused.


    Is my curl call wrong?

  • Your filter does not match, so it isn't an error. Sometimes this is required, i.e. when you check on runtime states for auto-scheduling a downtime. If the result is empty, no matches are totally fine.