-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Discovery got same problem with body variable #51
Comments
Hi @elwood218, I fixed the discovery module in the devel branch. The error message still looks a bit ugly, but at least it's no longer an "Exception", and it contains the actual error message from the API. Best regards |
@lgetwan This is the output now.
|
Hi @elwood218, I definitely didn't expect a "-1". :-o Best regards |
Hi, if that
|
Hi, |
Hi, now it looks like that:
Btw. before when I was getting a 500 from the API sometimes a link to a crashreport was directly shown.. but it seems that this is not working anymore. Just wanted to mention it - don't know if it is related. |
Hi,
How long does this call take approximately? |
Hi, I don't think that this is the problem.
The problem only occurs after the first 2 or 3 hosts and only when called like I already described in #33. But you can close the this issue if you want because it was more or less only about the body variable. At least we got now a "better" error message. Thank you for your help. |
I just recognized that the curl was missing a "follow" so I put https manually. Now this is the output:
|
It must look like that I guess:
|
But service discovery could take longer.. and like I said it is working when I "loop" over it in Ansible but when I run it for each inventory host (which could be parallel) then it fails. |
I have just tested it on shell.
But if I do that and run all those 4 scripts in parallel:
Then these are the times of each host:
|
If I understand this right, we are chasing another issue here, so @elwood218 would you be so kind to close this issue and move your research about the timing issue into a new issue? There we can then research, whether it is a collection issue or an API issue. Thanks! |
@robin-tribe29 It is an issue of the API because I have tested it on shell. So I write you an email at feedback if you can't put a ticket yourself. This ticket can be closed. |
@elwood218 Alright, then please send an email, so all relevant information is in there. Thanks! |
But maybe the module could use bulk discovery but I don't know how to solve that in Ansible.. (and the discovery and "accepting" is not working anyway - already opened a FEED for that) |
Fix Exception handling for #51
Describe the bug
There are 2 errors but one is related to the module and the other is imho a problem of the API.
The error with the module is again that "body" is used but not defined. (If I put that in a loop over "play_hosts" then it works)
The general problem is that first hosts get "service discovered" and then there is a 500 error or so..
Component Name
discovery
Ansible Version
Checkmk Version
2.1.0 (CEE)
Collection Version
Environment
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Actual behavior
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: