Closed dblviking closed 3 years ago
I confirmed that they work but they aren't part of the official docs. Hence I asked checkmk whether they can be considered stable. Let's see what they say.
In the meantime, is there a way to fetch all sites using your module? Cheers
Yes, you can use WebApi(...).make_request("get_all_sites")
It looks like it needs one more parameter:
File "/usr/local/lib/python3.6/site-packages/check_mk_web_api/__init__.py", line 164, in make_request
raise CheckMkWebApiException(result)
check_mk_web_api.exception.CheckMkWebApiException: Check_MK exception: This API call requires the parameter output_format=python
It looks like it needs one more parameter:
File "/usr/local/lib/python3.6/site-packages/check_mk_web_api/__init__.py", line 164, in make_request raise CheckMkWebApiException(result) check_mk_web_api.exception.CheckMkWebApiException: Check_MK exception: This API call requires the parameter output_format=python
Never mind! I didn't notice the parameters were in dict format. It's working :)
make_request("get_all_sites",query_params= { 'output_format': 'python'})
Correct, forgot to add the query_params
. So as you've guessed it's make_request('get_all_sites', query_params={'output_format': 'python'})
As per this https://checkmk.com/check_mk-werks.php?werk_id=6689
get_all_sites works via curl but I don't see that interface in your release
Thank you!