0

I have lots of nagios services with forward slash in their names. When I try to acknowledge the service through thruk api, it returns error like below.

request: http://<thruk_url>/r/v1/services/test-host/check_disk_%2Fvar/cmd/acknowledge_svc_problem
response: /r/v1/services/test-host/check_disk_/var/cmd/acknowledge_svc_problem was not found on this server.

The service name is check_disk_/var. I have lots of services like these, thus renaming all of them is not an easy solution.

1 Answer 1

0

There is a generic command endpoint as described here: https://thruk.org/documentation/rest_commands.html#_generic-command-endpoint

    %> curl -H "X-Thruk-Auth-Key: ****" \
            -d "cmd=acknowledge_svc_problem" \
            -d "host=hostname" \
            -d "service=servicedescription" \
            -d "comment_data=test" \
          'http://localhost/thruk/r/cmd'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.