Skip to content
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

Grafana cannot detect hosts from Checkmk #100

Open
babsdn opened this issue Dec 22, 2022 · 7 comments
Open

Grafana cannot detect hosts from Checkmk #100

babsdn opened this issue Dec 22, 2022 · 7 comments

Comments

@babsdn
Copy link

babsdn commented Dec 22, 2022

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 ?

check11

@babsdn
Copy link
Author

babsdn commented Dec 22, 2022

Also I have added checkmk with grafana user not cmkadmin

@BenediktSeidl
Copy link
Contributor

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.

@Semetra22
Copy link

@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?

@clavis-420
Copy link

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.

@michael-r-elp
Copy link

michael-r-elp commented Jan 30, 2023

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.

@acopernic
Copy link

Had same issue and did the same thing. Thank you.

@filipnet
Copy link

filipnet commented Mar 4, 2023

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.

@BenediktSeidl BenediktSeidl changed the title Wht grafana cannot detect hosts from checkmk Grafana cannot detect hosts from Checkmk May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants