dinger1986 / TRMM-Grafana

Grafana Dashboards setup and preconfigured to work with Tactical RMM
30 stars 17 forks source link

Dashboard not loading data. #38

Closed TheTechnologyStudio closed 1 year ago

TheTechnologyStudio commented 1 year ago

I installed the dashboard and the data source connections and configured the dashboard according to the instructions. I have also tested and made sure the postgresql datasource can connect to the database and it can.

My dashboards are still not loading any data. Screenshot_25 Screenshot_26 Screenshot_27 Screenshot_28

dinger1986 commented 1 year ago

Is the url right?

dinger1986 commented 1 year ago

What do the errors show?

TheTechnologyStudio commented 1 year ago

Oh permissions error, Status: 500. Message: db query error: pq: permission denied for table agents_agent

dinger1986 commented 1 year ago

So db user doesn't have permissions. Check the troubleshooting steps

TheTechnologyStudio commented 1 year ago

it is working now. Thank you!

dinger1986 commented 1 year ago

Just needed to reset the dbreader password?

TheTechnologyStudio commented 1 year ago

Just needed to reset the dbreader password?

No i ran these commands:

GRANT CONNECT ON DATABASE tacticalrmm TO dbreader; GRANT USAGE ON SCHEMA public to dbreader; GRANT SELECT ON ALL TABLES IN SCHEMA public TO dbreader; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO dbreader; quit

but instead of dbreader i changed it to the user i already had, Grafana.

TheTechnologyStudio commented 1 year ago

im used to mariadb not postgres . this is my first time with postgres

dinger1986 commented 1 year ago

Your using mariadb with tactical?

TheTechnologyStudio commented 1 year ago

No, but i've never interacted with postgres prior to this

dinger1986 commented 1 year ago

Ah lol. Cool. Please close this if you are all done. I'd imagine dbreader is created as well so maybe want to delete that user so you don't have users who aren't being used

TheTechnologyStudio commented 1 year ago

btw, importing agentdash-v2.json throws this error: Import failed JSON -> JS Serialization failed: Bad escaped character in JSON at position 54622

and client dash: Import failed JSON -> JS Serialization failed: Bad escaped character in JSON at position 41444

TheTechnologyStudio commented 1 year ago

the rest seems to work fine.

dinger1986 commented 1 year ago

You can copy and paste the json directly if that works

TheTechnologyStudio commented 1 year ago

will try that.

TheTechnologyStudio commented 1 year ago

json validator threw this error:

Error: Parse error on line 1310: ...true, "rawSql": "SELECT \n count( ----------------------^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'

dinger1986 commented 1 year ago

The dashboards have been provided by others sorry don't know what's wrong with it

TheTechnologyStudio commented 1 year ago

Okay, Thank you for trying at least. I will play around with it. and il let u know if i fix it.

dinger1986 commented 1 year ago

Ok no problems

TheTechnologyStudio commented 1 year ago

Hey Dinger, Can you update both agentdash-v2 with https://pastebin.com/F53ZHZEs and clientdash with https://pastebin.com/fv8W94hv

These are working copies of both scripts.

dinger1986 commented 1 year ago

Please PR the changes

TheTechnologyStudio commented 1 year ago

All i did was pull old versions of the scripts. The one before the latest commit. You are the one listed as creating the scripts I listed above before the one person overwrote that script with some changes.

dinger1986 commented 1 year ago

lol sorry, I didnt check them, Ill revert them then, thanks!

dinger1986 commented 1 year ago

I have added as v3 and v1 so leaving the ones working as I think they fix something else that didnt work.

Thanks for your help!