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

additional Grafana settings for dashboard widgets to work #515

Open
garryavx opened this issue Jan 11, 2022 · 1 comment
Open

additional Grafana settings for dashboard widgets to work #515

garryavx opened this issue Jan 11, 2022 · 1 comment
Labels

Comments

@garryavx
Copy link

I was following this:
https://github.com/sipcapture/homer/wiki/homer-seven-setup/#grafana
just the grafana section really to add on grafana to my Homer install.
I found that the following things were needed in addition to what's listed in the guide. note that not all of these may be strictly necessary, I would find something that looked like it needed to be filled out, try it and then try something else until it worked.

for starters. I had changed my grafana listen port to 3010 due to a conflict with the
HEPWSAddr = "0.0.0.0:3000"
in my /etc/heplify-server.toml file. this is probably due to the fact that I initially used the .sh auto installer provided here:
https://github.com/sipcapture/homer-installer#page_with_curl-bash-installer
and that doesn't do any grafana stuff. but thought it worth mentioning as it's where I started as my base install of homer.

next, after installing grafana I logged in and generated an API key for myself, and ended up sticking it...well everywhere I found a reference to grafana and the phrase "token" or "key".

now, to edit some configs with the grafana stuff
In the homer UI under settings > advanced > grafana, I changed the host to 127.0.0.1:3010 (from grafana:3000) and tossed my API token in the token field too.
in /usr/local/homer/etc/, hop into the swagger.json, find this section:
"GrafanaUrl": {
"type": "object",
"properties": {
"data": {
"type": "string",
"x-go-name": "Data",
"example": "localhost:3010"
}
},
in this excerpt I've already changed my port, but it was incorrect (3000) before.

then, in the same directory, the webapp_config.json file:
"grafana_config": {
"enable": true,
"help": "Settings for Grafana",
"host": "http://127.0.0.1:3010",
"path": "/grafana",
"token": "really long API token here"
},
fill in your api token and correct the port.

I think that's it for homer stuff. now to the /etc/grafana/grafana.ini
uncomment the root_url parameter and in my case I added "grafana" to the end of it. like so:
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana
last, set allow_embedding = true (dont forget to uncomment again!)

After that i restarted everything and was able to add widgets and have them load correctly.

@github-actions
Copy link

Please star this repository to motivate the developers and to get higher priority! ⭐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants