Checkmk / grafana-checkmk-datasource

CheckMK data source for Grafana

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to connect RAW instance

netzwerkgoettin opened this issue · comments

Hi,

today I checked out this plugin (e59e5b0). I integrated it into an existing Grafana (8.4.4) which is running as a Docker container.

I try to connect it to a Checkmk RAW test instance running also within Docker (Checkmk Raw Edition 2.1.0-2022.03.31) and this is what I get:

Checkmk exception: Currently not supported with this Checkmk Edition
Traceback (most recent call last): File "/omd/sites/cmk/lib/python3/cmk/gui/plugins/webapi/grafana.py",
line 118, in _get_combined_graph_identifications from cmk.gui.cee.plugins.metrics.graphs
import ( ModuleNotFoundError: No module named 'cmk.gui.cee' During handling of
the above exception, another exception occurred: Traceback (most recent call
last):
File "/omd/sites/cmk/lib/python3/cmk/gui/webapi.py", line 116, in page_api resp = _execute_action(api_call, request_object)
File "/omd/sites/cmk/lib/python3/cmk/gui/webapi.py", line 207, in _execute_action return _execute_action_no_lock(api_call, request_object)
File "/omd/sites/cmk/lib/python3/cmk/gui/webapi.py", line 221, in _execute_action_no_lock "result": api_call["handler"](request_object),
File "/omd/sites/cmk/lib/python3/cmk/gui/plugins/webapi/grafana.py", line 123, in _get_combined_graph_identifications raise
MKGeneralException(_("Currently not supported with this Checkmk Edition")) cmk.utils.exceptions.MKGeneralException:
Currently not supported with this Checkmk Edition

According to the docs: „Beginning with version 2.0.0, it is possible in all Checkmk editions to directly address Checkmk as a data source in Grafana“ which in my understanding includes RAW – at least it wouldn't make sense to offer a dropdown containing „RAW“ and „Enterprise“ when RAW won't work.

So please help me: what am I missing?

Regards,
Marianne

This looks like a bug: When using the "Save & test" button on the "Data Source" page, an enterprise endpoint is used to check if it's possible to fetch data from checkmk, even though "RAW Edition" is selected. I've create an internal ticket (CMK-10237) to track and fix this bug.
The good news: you can ignore this error message, the data source is working although the save test failed.

Hi,

thank you for your reply!
I can confirm it's possible to choose this data source in a panel, but I'm not able to work with it: while „Site“ let me choose between All sites and Local site cmk, „Hostname“ and „Service“ do not have (access to any) entries.

Perhaps useful for your debugging, too :)

Regards,
Marianne

Screenshot 2022-04-06 at 10 15 38

The "Save & test" error message on raw editions should now be fixed. If you want to test this yourself you will have to do a yarn install and yarn build. I also saw some drop down problems and created #56. I will come back to your drop down issue when i resolved #56.

We released version 2.0b3. Can you please try to reproduce your second issue with this release?
Please check if the user used for the grafana connection is able to see at least some hosts? (This should be the case for the automation user in a fresh installation)
Are there any errors in the browser console or grafana log?

I was having the exact same issue. This was fixed for me by updating from Grafana 8.2.3 to 9.0.4.