**CMK version:2.2.0p7
**OS version:Ubuntu Jammy
**Error message:302: FOUND
**Output of “cmk --debug -vvn hostname”:cmk: command not found
(If it is a problem with checks or plugins - it is not)
I’m trying to run some API integrations via ansible.
I’m able to create a profile, and could swear I had service discovery working before, but now, potentially after upgrading from 2.2.0p6 to 7 (could be a coincidence), I always get “Status code was 302 and not [200]: HTTP Error 302: FOUND”.
What is that actually supposed to mean?
If I invoke the same URL with the same parameters (as “swagger UI” provides) on curl from bash, I get… no output at all, don’t even know if it’s also getting error 302.
The thing is, while I can’t get exit code 200, I can get different errors:
uri:
url: http://127.0.0.1/sitename/check_mk/api/1.0/domain-types/service_discovery_run/actions/start/invoke
[...] // the rest of stuff is identical to what I use for host creation successfully
body:
host_name: "{{ somevariable }}"
mode: "refresh"
bull: "shit"
This does cause it to complain about the unexpected variable, and gives “400 bad request” because of “bull: unknown field”. So I don’t understand why it gets an error when the variables are correct.
Google results for error 302 says “the resource has been temporarily moved to a different location” - but this cannot be…? It’s exactly the same path as this thing suggests:
Edit: One observation: This only happens with mode refresh. Mode new which is supposed to run after refresh has result 200 and works.
