grafana-checkmk-datasource
grafana-checkmk-datasource copied to clipboard
Grafana cannot detect hosts from Checkmk
I have installed grafana v9.3.2 and checkmk raw edition but according to attach pic grafana cannot detect any host or service from checkmk . What is the issue ? How can solve it ?
Also I have added checkmk with grafana user not cmkadmin
We will need more context here:
- what checkmk version do you use?
- are there suspicious entries in
var/log/apache/access_log
of your site? - are there suspicious entries in the grafana log?
- are there any errors in the development console of your browser?
for debugging purpose it would also be a good idea to use the automation user, so we can rule out any permission problems, as this user has admin permissions.
@babsdn Having the same issue.
- checkmk raw version 2.1.0p15
- the
access_log
looks good for me."POST /site/check_mk/ajax_vs_autocomplete.py?_secret=*&_username=grafana&output_format=json HTTP/1.1" 200 970 "-" "Grafana/9.3.2"
- using the automation user fixes the problem. Maybe there are some permission issues?
It indeed seems to be a permission issue, giving my grafana user administrator rights solved the problem for me, so the use of the automation user isn't necesssary.
My solution was to clone the user role to create a seperate grafana role and give that role the See all host and services
permission.
After assigning that role to the grafana user everything worked fine for me, so far.
That might be the preferable solution for anyone who doesn't want to grant full admin rights to the grafana user.
Had same issue and did the same thing. Thank you.
Hello and thank you very much. This is not an issue but a permission problem. The built-in role "user" does not have the permission "See all host and services". This can be validated here: Setup > Users > Roles & permissions > Permission matrix
Solution:
- Navigate to: Setup > Users > Roles & permissions
- It is not possible to create a new role (from scratch). You have to clone an existing role (user).
- Afterward you can rename the cloned role e.g. to grafana
- Edit role grafana, search for "See all host and services" and change the value from "default (no)" to "yes".
- Navigate to "Setup > Users" and assign this role to the Grafana-Automation-user
- Do not forget to commit changes in Check MK
Suggestion: Add the notes into README.md and close the issue.