Skip to content

Grafana is empty if not using TelsaMate grafana image #4590

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

Closed
1 task done
Slyke opened this issue Mar 15, 2025 · 3 comments
Closed
1 task done

Grafana is empty if not using TelsaMate grafana image #4590

Slyke opened this issue Mar 15, 2025 · 3 comments
Labels
closed:invalid This doesn't seem right Stale

Comments

@Slyke
Copy link

Slyke commented Mar 15, 2025

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Got a very strange issue.

I can login to Grafana with admin:admin, but it's completely empty. No dashboards or anything like that. The weird thing is that Grafana seems to have everything in there when I'm checking manually in BASH, but nothing loads up on the webpage. If I manually create a datasource or graph on the webpage, I do not see it in the datasources.yml file, I only see the Teslamate file there, however even when I restart Grafana, the datasource I created is still showing up on the webpage, so it must be saved somewhere.

It's almost like it's not using the directory I specified and so not picking up any of the Teslamate stuff, but the log file is saying it is using the correct directory.

I'm using the latest version of Grafana: grafana/grafana:11.5.2

Here's me checking inside the container to ensure files exist:

grafana-teslamate-68f94c794b-745d5:/usr/share/grafana$ ls -ahl /var/lib/grafana/
total 1M
drwxrwx---    1 grafana  472          264 Mar 15 17:17 .
drwxr-xr-x    1 root     root        4.0K Feb 18 21:45 ..
drwxrwx---    1 grafana  472          362 Mar 15 16:47 @eaDir
-rwxrwx---    1 grafana  472         1.3K Mar 15 08:06 Dockerfile
-rwxrwx---    1 grafana  472          679 Mar 15 08:06 apple-touch-icon.png
drwxrwx---    1 grafana  472            0 Mar 15 17:00 csv
drwxrwx---    1 grafana  472          594 Mar 15 16:47 dashboards
-rwxrwx---    1 grafana  472         2.6K Mar 15 08:06 dashboards.sh
-rwxrwx---    1 grafana  472          714 Mar 15 08:06 dashboards.yml
-rwxrwx---    1 grafana  472          407 Mar 15 08:06 datasource.yml
-rwxrwx---    1 grafana  472          473 Mar 15 08:06 favicon.png
-rwxrwx---    1 grafana  472         1.1M Mar 15 17:17 grafana.db
-rwxrwx---    1 grafana  472          524 Mar 15 08:06 logo.svg
drwxrwx---    1 grafana  472            0 Mar 15 17:00 pdf
drwxrwx---    1 grafana  472            0 Mar 15 17:00 plugins
drwxrwx---    1 grafana  472            0 Mar 15 17:00 png
grafana-teslamate-68f94c794b-745d5:/usr/share/grafana$ cat /var/lib/grafana/datasource.yml
apiVersion: 1

datasources:
  - name: TeslaMate
    type: postgres
    url: $DATABASE_HOST:$DATABASE_PORT
    user: $DATABASE_USER
    database: $DATABASE_NAME
    access: proxy
    basicAuth: false
    withCredentials: false
    isDefault: true
    secureJsonData:
      password: $DATABASE_PASS
    jsonData:
      postgresVersion: 1500
      sslmode: $DATABASE_SSL_MODE
    version: 1
    editable: true

Expected Behavior

No response

Steps To Reproduce

No response

Relevant log output

GF_PATHS_DATA='/var/lib/grafana' is not writable.
You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
logger=settings t=2025-03-15T17:16:48.207176264Z level=info msg="Starting Grafana" version=11.5.2 commit=598e0338d5374d6bc404b02a58094132c5eeceb8 branch=HEAD compiled=2025-03-15T17:16:48Z
logger=settings t=2025-03-15T17:16:48.207553266Z level=info msg="Config loaded from" file=/usr/share/grafana/conf/defaults.ini
logger=settings t=2025-03-15T17:16:48.207562497Z level=info msg="Config loaded from" file=/etc/grafana/grafana.ini
logger=settings t=2025-03-15T17:16:48.207566816Z level=info msg="Config overridden from command line" arg="default.paths.data=/var/lib/grafana"
logger=settings t=2025-03-15T17:16:48.207570692Z level=info msg="Config overridden from command line" arg="default.paths.logs=/var/log/grafana"
logger=settings t=2025-03-15T17:16:48.207575007Z level=info msg="Config overridden from command line" arg="default.paths.plugins=/var/lib/grafana/plugins"
logger=settings t=2025-03-15T17:16:48.207578798Z level=info msg="Config overridden from command line" arg="default.paths.provisioning=/etc/grafana/provisioning"
logger=settings t=2025-03-15T17:16:48.207582442Z level=info msg="Config overridden from command line" arg="default.log.mode=console"
logger=settings t=2025-03-15T17:16:48.207586218Z level=info msg="Config overridden from Environment variable" var="GF_PATHS_DATA=/var/lib/grafana"
logger=settings t=2025-03-15T17:16:48.207589761Z level=info msg="Config overridden from Environment variable" var="GF_PATHS_LOGS=/var/log/grafana"
logger=settings t=2025-03-15T17:16:48.207593196Z level=info msg="Config overridden from Environment variable" var="GF_PATHS_PLUGINS=/var/lib/grafana/plugins"
logger=settings t=2025-03-15T17:16:48.207596596Z level=info msg="Config overridden from Environment variable" var="GF_PATHS_PROVISIONING=/etc/grafana/provisioning"
logger=settings t=2025-03-15T17:16:48.207608206Z level=info msg="Config overridden from Environment variable" var="GF_SERVER_ROOT_URL=/"
logger=settings t=2025-03-15T17:16:48.207615043Z level=info msg="Config overridden from Environment variable" var="GF_SECURITY_ALLOW_EMBEDDING=true"
logger=settings t=2025-03-15T17:16:48.20762277Z level=info msg="Config overridden from Environment variable" var="GF_AUTH_ANONYMOUS_ENABLED=true"
logger=settings t=2025-03-15T17:16:48.207642995Z level=info msg="Config overridden from Environment variable" var="GF_AUTH_PROXY_ENABLED=true"
logger=settings t=2025-03-15T17:16:48.207652533Z level=info msg="Config overridden from Environment variable" var="GF_AUTH_PROXY_HEADER_NAME=Remote-User"
logger=settings t=2025-03-15T17:16:48.207662476Z level=info msg="Config overridden from Environment variable" var="GF_AUTH_PROXY_WHITELIST=10.7.50.0/24,10.7.60.0/24,10.244.0.0/16"
logger=settings t=2025-03-15T17:16:48.207673477Z level=info msg=Target target=[all]
logger=settings t=2025-03-15T17:16:48.207691839Z level=info msg="Path Home" path=/usr/share/grafana
logger=settings t=2025-03-15T17:16:48.207701359Z level=info msg="Path Data" path=/var/lib/grafana
logger=settings t=2025-03-15T17:16:48.207710617Z level=info msg="Path Logs" path=/var/log/grafana
logger=settings t=2025-03-15T17:16:48.207719141Z level=info msg="Path Plugins" path=/var/lib/grafana/plugins
logger=settings t=2025-03-15T17:16:48.207738073Z level=info msg="Path Provisioning" path=/etc/grafana/provisioning
logger=settings t=2025-03-15T17:16:48.207750216Z level=info msg="App mode production"
logger=featuremgmt t=2025-03-15T17:16:48.208188642Z level=info msg=FeatureToggles openSearchBackendFlowEnabled=true influxdbBackendMigration=true recoveryThreshold=true lokiQueryHints=true formatString=true cloudWatchCrossAccountQuerying=true accessActionSets=true panelMonitoring=true cloudWatchRoundUpEndTime=true nestedFolders=true tlsMemcached=true recordedQueriesMulti=true dataplaneFrontendFallback=true azureMonitorEnableUserAuth=true newPDFRendering=true transformationsRedesign=true alertingInsights=true logsInfiniteScrolling=true promQLScope=true alertingSimplifiedRouting=true onPremToCloudMigrations=true annotationPermissionUpdate=true groupToNestedTableTransformation=true transformationsVariableSupport=true ssoSettingsApi=true alertingUIOptimizeReducer=true dashgpt=true dashboardSceneForViewers=true reportingUseRawTimeRange=true logsContextDatasourceUi=true lokiQuerySplitting=true awsAsyncQueryCaching=true angularDeprecationUI=true zipkinBackendMigration=true userStorageAPI=true newDashboardSharingComponent=true publicDashboardsScene=true alertingApiServer=true useSessionStorageForRedirection=true managedPluginsInstall=true lokiStructuredMetadata=true pinNavItems=true correlations=true exploreMetrics=true lokiLabelNamesQueryApi=true dashboardSceneSolo=true logsExploreTableVisualisation=true dashboardScene=true cloudWatchNewLabelParsing=true logRowsPopoverMenu=true kubernetesPlaylists=true preinstallAutoUpdate=true newFiltersUI=true alertingNoDataErrorExecution=true accessControlOnCall=true addFieldFromCalculationStatFunctions=true unifiedRequestLog=true prometheusAzureOverrideAudience=true
logger=sqlstore t=2025-03-15T17:16:48.208248376Z level=info msg="Connecting to DB" dbtype=sqlite3
logger=sqlstore t=2025-03-15T17:16:48.208272806Z level=warn msg="SQLite database file has broader permissions than it should" path=/var/lib/grafana/grafana.db mode=-rwxrwx--- expected=-rw-r-----
logger=migrator t=2025-03-15T17:16:48.235070239Z level=info msg="Locking database"
logger=migrator t=2025-03-15T17:16:48.235094671Z level=info msg="Starting DB migrations"
logger=migrator t=2025-03-15T17:16:48.301312483Z level=info msg="migrations completed" performed=0 skipped=629 duration=1.126469ms
logger=migrator t=2025-03-15T17:16:48.306450279Z level=info msg="Unlocking database"
logger=secrets t=2025-03-15T17:16:48.311370573Z level=info msg="Envelope encryption state" enabled=true currentprovider=secretKey.v1
logger=plugin.angulardetectorsprovider.dynamic t=2025-03-15T17:16:48.426429322Z level=info msg="Restored cache from database" duration=5.410963ms
logger=plugin.store t=2025-03-15T17:16:48.454669413Z level=info msg="Loading plugins..."
logger=local.finder t=2025-03-15T17:16:48.52318377Z level=warn msg="Skipping finding plugins as directory does not exist" path=/usr/share/grafana/plugins-bundled
logger=plugin.store t=2025-03-15T17:16:48.5232078Z level=info msg="Plugins loaded" count=54 duration=68.541392ms
logger=resource-migrator t=2025-03-15T17:16:48.530738981Z level=info msg="Locking database"
logger=resource-migrator t=2025-03-15T17:16:48.530755423Z level=info msg="Starting DB migrations"
logger=resource-migrator t=2025-03-15T17:16:48.54055182Z level=info msg="migrations completed" performed=0 skipped=22 duration=38.905µs
logger=resource-migrator t=2025-03-15T17:16:48.544933086Z level=info msg="Unlocking database"
logger=query_data t=2025-03-15T17:16:48.560471785Z level=info msg="Query Service initialization"
logger=live.push_http t=2025-03-15T17:16:48.56527616Z level=info msg="Live Push Gateway initialization"
logger=ngalert.notifier.alertmanager org=1 t=2025-03-15T17:16:48.595197954Z level=info msg="Applying new configuration to Alertmanager" configHash=d2c56faca6af2a5772ff4253222f7386
logger=ngalert.state.manager t=2025-03-15T17:16:48.625150264Z level=info msg="Running in alternative execution of Error/NoData mode"
logger=cloudmigration.service t=2025-03-15T17:16:48.633674882Z level=info msg="using gcom client for auth"
logger=infra.usagestats.collector t=2025-03-15T17:16:48.63388114Z level=info msg="registering usage stat providers" usageStatsProvidersLen=2
logger=provisioning.alerting t=2025-03-15T17:16:48.639497344Z level=info msg="starting to provision alerting"
logger=provisioning.alerting t=2025-03-15T17:16:48.639521341Z level=info msg="finished to provision alerting"
logger=grafanaStorageLogger t=2025-03-15T17:16:48.639830089Z level=info msg="Storage starting"
logger=plugin.backgroundinstaller t=2025-03-15T17:16:48.641096979Z level=info msg="Installing plugin" pluginId=grafana-lokiexplore-app version=
logger=ngalert.state.manager t=2025-03-15T17:16:48.641289238Z level=info msg="Warming state cache for startup"
logger=http.server t=2025-03-15T17:16:48.642295962Z level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl= socket=
logger=ngalert.multiorg.alertmanager t=2025-03-15T17:16:48.643006303Z level=info msg="Starting MultiOrg Alertmanager"
logger=ngalert.state.manager t=2025-03-15T17:16:48.749919798Z level=info msg="State cache has been initialized" states=0 duration=108.628418ms
logger=ngalert.scheduler t=2025-03-15T17:16:48.749966Z level=info msg="Starting scheduler" tickInterval=10s maxAttempts=3
logger=ticker t=2025-03-15T17:16:48.750040543Z level=info msg=starting first_tick=2025-03-15T17:16:50Z
logger=provisioning.dashboard t=2025-03-15T17:16:48.750310879Z level=info msg="starting to provision dashboards"
logger=provisioning.dashboard t=2025-03-15T17:16:48.750324797Z level=info msg="finished to provision dashboards"
logger=grafana-apiserver t=2025-03-15T17:16:48.957058011Z level=info msg="Adding GroupVersion iam.grafana.app v0alpha1 to ResourceManager"
logger=grafana-apiserver t=2025-03-15T17:16:48.958803906Z level=info msg="Adding GroupVersion notifications.alerting.grafana.app v0alpha1 to ResourceManager"
logger=grafana-apiserver t=2025-03-15T17:16:48.95944103Z level=info msg="Adding GroupVersion userstorage.grafana.app v0alpha1 to ResourceManager"
logger=grafana-apiserver t=2025-03-15T17:16:48.960040751Z level=info msg="Adding GroupVersion playlist.grafana.app v0alpha1 to ResourceManager"
logger=resource-server t=2025-03-15T17:16:48.96015434Z level=warn msg="failed to register storage metrics" error="duplicate metrics collector registration attempted"
logger=resource-server t=2025-03-15T17:16:48.960286459Z level=warn msg="failed to register storage metrics" error="duplicate metrics collector registration attempted"
logger=resource-server t=2025-03-15T17:16:48.960384383Z level=warn msg="failed to register storage metrics" error="duplicate metrics collector registration attempted"
logger=grafana-apiserver t=2025-03-15T17:16:48.962096887Z level=info msg="Adding GroupVersion dashboard.grafana.app v0alpha1 to ResourceManager"
logger=grafana-apiserver t=2025-03-15T17:16:48.962887241Z level=info msg="Adding GroupVersion dashboard.grafana.app v1alpha1 to ResourceManager"
logger=grafana-apiserver t=2025-03-15T17:16:48.963662554Z level=info msg="Adding GroupVersion dashboard.grafana.app v2alpha1 to ResourceManager"
logger=grafana-apiserver t=2025-03-15T17:16:48.964317375Z level=info msg="Adding GroupVersion featuretoggle.grafana.app v0alpha1 to ResourceManager"
logger=app-registry t=2025-03-15T17:16:49.022217342Z level=info msg="app registry initialized"

Screenshots

Image

Additional data

No response

Type of installation

Docker

Version

teslamate:1.32

@JakobLichterfeld JakobLichterfeld changed the title Grafana is empty Grafana is empty if not using TelsaMate grafana image Mar 24, 2025
@JakobLichterfeld
Copy link
Member

JakobLichterfeld commented Mar 24, 2025

Thanks for reporting.

Can you please share your docker-compose.yml without your secrets? Only https://docs.teslamate.org/docs/installation/docker/ is supported. If you are not using the provided Grafana image, the dashboards would not show up. You can try to do a backup and delete the grafana volume.

teslamate:1.32

This version does not exist :-)

@JakobLichterfeld JakobLichterfeld added the closed:invalid This doesn't seem right label Mar 24, 2025
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Apr 24, 2025
@swiffer
Copy link
Collaborator

swiffer commented Apr 25, 2025

provisioning files need to be placed in the respective folders - see

COPY datasource.yml /etc/grafana/provisioning/datasources/

https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources

alternatively just use our grafana image - it's bundling everything that is needed and ensures provisioned dashboards are tested for the grafana version used.

@swiffer swiffer closed this as completed Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:invalid This doesn't seem right Stale
Projects
None yet
Development

No branches or pull requests

3 participants