Installing Docker image on Asustor NAS

Hi all,
New to Grafana but I’m trying to get the following set up.
IotaWatt Power Monitor - Set Up and Working
InfluxDB to store data from the IotaWatt - Set Up in a Docker Container on my Asustor AS6404T, Working and taking data from the IotaWatt.
Grafana - trying to install it in a Docker Container on the same NAS but not getting anywhere.
I have tried several methods following various threads/videos online using docker run and docker-compose to get both Influxdb and Grafana installed. I did get it working at one point using the following docker-compose file:

docker run -d
–name influxdb-grafana-docker
-p 3003:3003
-p 3004:8083
-p 8086:8086
-p 22022:22
-v /volume1/Docker/influxdb:/var/lib/influxdb
-v /volume1/Docker/grafana:/var/lib/grafana
–restart=always
philhawthorne/docker-influxdb-grafana:latest

This istalled old versions of InfluxDB and Grafana so I decided to try and get the latest versions running.

So, having tried a few compose file versions anf failing I decided to try and get one running at a time.
As detaile above I have InfluxDB 2.4.0 up, running and taking data from my power monitor.
I am having trouble getting Grafana up and running on it’s own.
I have been trying various docker run command lines. Some wouldn’t let the container run. Most would run the container OK but when I try to open the web UI at <NAS_IP>:3000 it times out every time.
the thrust of what I am try is as follows:

docker run -d -p 3000:3000 -v /volume1/Docker/grafana:/var/lib/grafana --name grafana grafana/grafana-enterprise

But I have got the point where I just run the “try it out” line from the docker page

docker run -d --name=grafana -p 3000:3000 grafana/grafana-enterprise

I still can’t get to the Web UI using this.

I attach the Log file produced when I ran the last basic install.

If anyone can help me get it running it would be great.
Or should I go back to the philhawthorne version above and stick with an older version?

Any help appreciated.

Can’t upload .txt file so here is the log file…

logger=migrator t=2022-09-24T10:37:17.862532257Z level=info msg=“Executing migration” id=“add column errors_last_1_days to dashboard_usage_sums”
logger=migrator t=2022-09-24T10:37:17.940303348Z level=info msg=“Executing migration” id=“add column errors_last_7_days to dashboard_usage_sums”
logger=migrator t=2022-09-24T10:37:18.040697907Z level=info msg=“Executing migration” id=“add column errors_last_30_days to dashboard_usage_sums”
logger=migrator t=2022-09-24T10:37:18.138074659Z level=info msg=“Executing migration” id=“add column errors_total to dashboard_usage_sums”
logger=migrator t=2022-09-24T10:37:18.222879695Z level=info msg=“Executing migration” id=“create user_dashboard_views table”
logger=migrator t=2022-09-24T10:37:18.332267511Z level=info msg=“Executing migration” id=“add index user_dashboard_views.user_id”
logger=migrator t=2022-09-24T10:37:18.419340317Z level=info msg=“Executing migration” id=“add index user_dashboard_views.dashboard_id”
logger=migrator t=2022-09-24T10:37:18.501289981Z level=info msg=“Executing migration” id=“add unique index user_dashboard_views_user_id_dashboard_id”
logger=migrator t=2022-09-24T10:37:18.579693016Z level=info msg=“Executing migration” id=“create user_stats table”
logger=migrator t=2022-09-24T10:37:18.651199682Z level=info msg=“Executing migration” id=“add unique index user_stats(user_id)”
logger=migrator t=2022-09-24T10:37:18.73570798Z level=info msg=“Executing migration” id=“create data_source_cache table”
logger=migrator t=2022-09-24T10:37:18.842150289Z level=info msg=“Executing migration” id=“add index data_source_cache.data_source_id”
logger=migrator t=2022-09-24T10:37:18.909370698Z level=info msg=“Executing migration” id=“add use_default_ttl column”
logger=migrator t=2022-09-24T10:37:18.987908519Z level=info msg=“Executing migration” id=“add data_source_cache.data_source_uid column”
logger=migrator t=2022-09-24T10:37:19.199401584Z level=info msg=“Executing migration” id=“remove abandoned data_source_cache records”
logger=migrator t=2022-09-24T10:37:19.288487797Z level=info msg=“Executing migration” id=“update data_source_cache.data_source_uid value”
logger=migrator t=2022-09-24T10:37:19.374710268Z level=info msg=“Executing migration” id=“add index data_source_cache.data_source_uid”
logger=migrator t=2022-09-24T10:37:19.45652633Z level=info msg=“Executing migration” id=“add data_source_cache.ttl_resources_ms column”
logger=migrator t=2022-09-24T10:37:19.553745216Z level=info msg=“Executing migration” id=“update data_source_cache.ttl_resources_ms to have the same value as ttl_ms”
logger=migrator t=2022-09-24T10:37:19.639136302Z level=info msg=“Executing migration” id=“create data_source_acl table”
logger=migrator t=2022-09-24T10:37:19.738619452Z level=info msg=“Executing migration” id=“add index data_source_acl.data_source_id”
logger=migrator t=2022-09-24T10:37:19.849667284Z level=info msg=“Executing migration” id=“add unique index datasource_acl.unique”
logger=migrator t=2022-09-24T10:37:19.942805907Z level=info msg=“Executing migration” id=“create license_token table”
logger=migrator t=2022-09-24T10:37:20.017695522Z level=info msg=“Executing migration” id=“drop recorded_queries table v14”
logger=migrator t=2022-09-24T10:37:20.112282939Z level=info msg=“Executing migration” id=“drop recording_rules table v14”
logger=migrator t=2022-09-24T10:37:20.212765839Z level=info msg=“Executing migration” id=“create recording_rules table v14”
logger=migrator t=2022-09-24T10:37:20.294645067Z level=info msg=“Executing migration” id=“create remote_write_targets table v1”
logger=migrator t=2022-09-24T10:37:20.369155812Z level=info msg=“Executing migration” id=“Add prom_name to recording_rules table”
logger=migrator t=2022-09-24T10:37:20.4583409Z level=info msg=“Executing migration” id=“ensure remote_write_targets table”
logger=migrator t=2022-09-24T10:37:20.544160052Z level=info msg=“Executing migration” id=“create report config table v1”
logger=migrator t=2022-09-24T10:37:20.628348764Z level=info msg=“Executing migration” id=“Add index report.user_id”
logger=migrator t=2022-09-24T10:37:20.717927588Z level=info msg=“Executing migration” id=“add index to dashboard_id”
logger=migrator t=2022-09-24T10:37:20.829266307Z level=info msg=“Executing migration” id=“add index to org_id”
logger=migrator t=2022-09-24T10:37:20.92003251Z level=info msg=“Executing migration” id=“Add timezone to the report”
logger=migrator t=2022-09-24T10:37:21.018923857Z level=info msg=“Executing migration” id=“Add time_from to the report”
logger=migrator t=2022-09-24T10:37:21.108132863Z level=info msg=“Executing migration” id=“Add time_to to the report”
logger=migrator t=2022-09-24T10:37:21.190570501Z level=info msg=“Executing migration” id=“Add PDF landscape option to the report”
logger=migrator t=2022-09-24T10:37:21.270449907Z level=info msg=“Executing migration” id=“Add monthly day scheduling option to the report”
logger=migrator t=2022-09-24T10:37:21.370692993Z level=info msg=“Executing migration” id=“Add PDF layout option to the report”
logger=migrator t=2022-09-24T10:37:21.44877649Z level=info msg=“Executing migration” id=“Add PDF orientation option to the report”
logger=migrator t=2022-09-24T10:37:21.541736216Z level=info msg=“Executing migration” id=“Update report pdf_orientation from pdf_landscape”
logger=migrator t=2022-09-24T10:37:21.617037286Z level=info msg=“Executing migration” id=“create report settings table”
logger=migrator t=2022-09-24T10:37:21.728687158Z level=info msg=“Executing migration” id=“Add dashboard_uid field to the report”
logger=migrator t=2022-09-24T10:37:21.81547578Z level=info msg=“Executing migration” id=“Add template_vars field to the report”
logger=migrator t=2022-09-24T10:37:21.894028686Z level=info msg=“Executing migration” id=“Add option to include dashboard url in the report”
logger=migrator t=2022-09-24T10:37:21.986610873Z level=info msg=“Executing migration” id=“Add state field to the report”
logger=migrator t=2022-09-24T10:37:22.087344719Z level=info msg=“Executing migration” id=“Add option to add CSV files to the report”
logger=migrator t=2022-09-24T10:37:22.165753356Z level=info msg=“Executing migration” id=“Add scheduling start date”
logger=migrator t=2022-09-24T10:37:22.246072848Z level=info msg=“Executing migration” id=“Add missing schedule_start date for old reports”
logger=migrator t=2022-09-24T10:37:22.313156474Z level=info msg=“Executing migration” id=“Add scheduling end date”
logger=migrator t=2022-09-24T10:37:22.402261841Z level=info msg=“Executing migration” id=“Add schedulinng custom interval frequency”
logger=migrator t=2022-09-24T10:37:22.494947139Z level=info msg=“Executing migration” id=“Add scheduling custom interval amount”
logger=migrator t=2022-09-24T10:37:22.585238843Z level=info msg=“Executing migration” id=“Add workdays only flag to report”
logger=migrator t=2022-09-24T10:37:22.66348343Z level=info msg=“Executing migration” id=“create report dashboards table”
logger=migrator t=2022-09-24T10:37:22.76396537Z level=info msg=“Executing migration” id=“Add index report_dashboards.report_id”
logger=migrator t=2022-09-24T10:37:22.853352218Z level=info msg=“Executing migration” id=“Migrate report fields into report_dashboards”
logger=migrator t=2022-09-24T10:37:22.942195969Z level=info msg=“Executing migration” id=“Add formats option to the report”
logger=migrator t=2022-09-24T10:37:23.042852913Z level=info msg=“Executing migration” id=“Migrate reports with csv enabled”
logger=migrator t=2022-09-24T10:37:23.129706457Z level=info msg=“Executing migration” id=“Migrate ancient reports”
logger=migrator t=2022-09-24T10:37:23.207957377Z level=info msg=“Executing migration” id=“Add created column in report_dashboards”
logger=migrator t=2022-09-24T10:37:23.297110201Z level=info msg=“Executing migration” id=“create team group table”
logger=migrator t=2022-09-24T10:37:23.397479265Z level=info msg=“Executing migration” id=“add index team_group.org_id”
logger=migrator t=2022-09-24T10:37:23.488124931Z level=info msg=“Executing migration” id=“add unique index team_group.org_id_team_id_group_id”
logger=migrator t=2022-09-24T10:37:23.560682477Z level=info msg=“Executing migration” id=“add index team_group.group_id”
logger=migrator t=2022-09-24T10:37:23.649922765Z level=info msg=“Executing migration” id=“create settings table”
logger=migrator t=2022-09-24T10:37:23.750898314Z level=info msg=“Executing migration” id=“add unique index settings.section_key”
logger=migrator t=2022-09-24T10:37:23.850838283Z level=info msg=“Executing migration” id=“migrate role names”
logger=migrator t=2022-09-24T10:37:23.945215182Z level=info msg=“Executing migration” id=“rename orgs roles”
logger=migrator t=2022-09-24T10:37:24.026933059Z level=info msg=“Executing migration” id=“remove duplicated org role”
logger=migrator t=2022-09-24T10:37:24.10458835Z level=info msg=“Executing migration” id=“migrate alerting role names”
logger=migrator t=2022-09-24T10:37:24.179096712Z level=info msg=“Executing migration” id=“data source permissions”
logger=migrator t=2022-09-24T10:37:24.268790087Z level=info msg=“Executing migration” id=“data source uid permissions”
logger=migrator t=2022-09-24T10:37:24.377885344Z level=info msg=“Executing migration” id=“rename permissions:delegate scope”
logger=migrator t=2022-09-24T10:37:24.460728896Z level=info msg=“Executing migration” id=“builtin role migration”
logger=“builtin-role migrator” t=2022-09-24T10:37:24.462212793Z level=info msg=“no permission to create”
logger=migrator t=2022-09-24T10:37:24.538789836Z level=info msg=“Executing migration” id=“add action column to seed_assignment”
logger=migrator t=2022-09-24T10:37:24.628008672Z level=info msg=“Executing migration” id=“add scope column to seed_assignment”
logger=migrator t=2022-09-24T10:37:24.70624992Z level=info msg=“Executing migration” id=“remove unique index builtin_role_role_name before nullable update”
logger=migrator t=2022-09-24T10:37:24.786182794Z level=info msg=“Executing migration” id=“update seed_assignment role_name column to nullable”
logger=migrator t=2022-09-24T10:37:24.897155359Z level=info msg=“Executing migration” id=“add unique index builtin_role_name back”
logger=migrator t=2022-09-24T10:37:24.986860645Z level=info msg=“Executing migration” id=“add unique index builtin_role_action_scope”
logger=migrator t=2022-09-24T10:37:25.080218259Z level=info msg=“Executing migration” id=“seed permissions migration”
logger=migrator t=2022-09-24T10:37:25.158587258Z level=info msg=“Executing migration” id=“managed permissions migration enterprise”
logger=migrator t=2022-09-24T10:37:25.247705404Z level=info msg=“migrations completed” performed=540 skipped=0 duration=47.615990468s
logger=sqlstore t=2022-09-24T10:37:25.284394546Z level=info msg=“Created default admin” user=admin
logger=sqlstore t=2022-09-24T10:37:25.284758173Z level=info msg=“Created default organization”
logger=licensing t=2022-09-24T10:37:25.738040725Z level=info msg=“Validated license token” appURL=http://localhost:3000/ source=disk status=NotFound
logger=plugin.manager t=2022-09-24T10:37:25.816533375Z level=info msg=“Plugin registered” pluginId=input
logger=secrets t=2022-09-24T10:37:25.818228713Z level=info msg=“Envelope encryption state” enabled=true currentprovider=secretKey.v1
logger=query_data t=2022-09-24T10:37:25.823606368Z level=info msg=“Query Service initialization”
logger=live.push_http t=2022-09-24T10:37:25.831760538Z level=info msg=“Live Push Gateway initialization”
logger=ticker t=2022-09-24T10:37:25.950215138Z level=info msg=starting first_tick=2022-09-24T10:37:30Z
logger=infra.usagestats.collector t=2022-09-24T10:37:26.097994952Z level=info msg=“registering usage stat providers” usageStatsProvidersLen=2
logger=provisioning.alerting t=2022-09-24T10:37:26.615666415Z level=info msg=“starting to provision alerting”
logger=provisioning.alerting t=2022-09-24T10:37:26.615722593Z level=info msg=“finished to provision alerting”
logger=grafanaStorageLogger t=2022-09-24T10:37:26.616044397Z level=info msg=“storage starting”
logger=ngalert t=2022-09-24T10:37:26.616137659Z level=info msg=“warming cache for startup”
logger=ngalert.multiorg.alertmanager t=2022-09-24T10:37:26.616959922Z level=info msg=“starting MultiOrg Alertmanager”
logger=report t=2022-09-24T10:37:26.617620969Z level=warn msg=“Scheduling and sending of reports disabled, SMTP is not configured and enabled. Configure SMTP to enable.”
logger=http.server t=2022-09-24T10:37:26.621980074Z level=info msg=“HTTP Server Listen” address=[::]:3000 protocol=http subUrl= socket=

Still struggling with this. The only clue I have so far is that the docker logs for grafana are an hour behind eberything else (see log below of latest install attempt).
Would that stop me browsing the web GUI?
How do I set the time in a container?

logger=settings t=2022-09-26T14:31:30.365228158Z level=info msg=“Starting Grafana” version=9.1.6 commit=92461d8d1e branch=HEAD compiled=2022-09-20T10:06:14Z
logger=settings t=2022-09-26T14:31:30.365634682Z level=info msg=“Config loaded from” file=/usr/share/grafana/conf/defaults.ini
logger=settings t=2022-09-26T14:31:30.365683483Z level=info msg=“Config loaded from” file=/etc/grafana/grafana.ini
logger=settings t=2022-09-26T14:31:30.365696928Z level=info msg=“Config overridden from command line” arg=“default.paths.data=/var/lib/grafana”
logger=settings t=2022-09-26T14:31:30.365708449Z level=info msg=“Config overridden from command line” arg=“default.paths.logs=/var/log/grafana”
logger=settings t=2022-09-26T14:31:30.365719136Z level=info msg=“Config overridden from command line” arg=“default.paths.plugins=/var/lib/grafana/plugins”
logger=settings t=2022-09-26T14:31:30.365730133Z level=info msg=“Config overridden from command line” arg=“default.paths.provisioning=/etc/grafana/provisioning”
logger=settings t=2022-09-26T14:31:30.365741866Z level=info msg=“Config overridden from command line” arg=“default.log.mode=console”
logger=settings t=2022-09-26T14:31:30.365756708Z level=info msg=“Config overridden from Environment variable” var=“GF_PATHS_DATA=/var/lib/grafana”
logger=settings t=2022-09-26T14:31:30.365773721Z level=info msg=“Config overridden from Environment variable” var=“GF_PATHS_LOGS=/var/log/grafana”
logger=settings t=2022-09-26T14:31:30.365790698Z level=info msg=“Config overridden from Environment variable” var=“GF_PATHS_PLUGINS=/var/lib/grafana/plugins”
logger=settings t=2022-09-26T14:31:30.365802716Z level=info msg=“Config overridden from Environment variable” var=“GF_PATHS_PROVISIONING=/etc/grafana/provisioning”
logger=settings t=2022-09-26T14:31:30.365813861Z level=info msg=“Path Home” path=/usr/share/grafana
logger=settings t=2022-09-26T14:31:30.36582555Z level=info msg=“Path Data” path=/var/lib/grafana
logger=settings t=2022-09-26T14:31:30.365836564Z level=info msg=“Path Logs” path=/var/log/grafana
logger=settings t=2022-09-26T14:31:30.365849054Z level=info msg=“Path Plugins” path=/var/lib/grafana/plugins
logger=settings t=2022-09-26T14:31:30.365860502Z level=info msg=“Path Provisioning” path=/etc/grafana/provisioning
logger=settings t=2022-09-26T14:31:30.365876197Z level=info msg=“App mode production”
logger=sqlstore t=2022-09-26T14:31:30.366138532Z level=info msg=“Connecting to DB” dbtype=sqlite3
logger=sqlstore t=2022-09-26T14:31:30.36619193Z level=warn msg=“SQLite database file has broader permissions than it should” path=/var/lib/grafana/grafana.db mode=-rwxrwxrwx expected=-rw-r-----
logger=migrator t=2022-09-26T14:31:30.564760564Z level=info msg=“Starting DB migrations”
logger=migrator t=2022-09-26T14:31:30.584624247Z level=info msg=“migrations completed” performed=0 skipped=536 duration=1.32624ms
logger=licensing t=2022-09-26T14:31:30.586198276Z level=info msg=“Validated license token” appURL=http://localhost:3000/ source=disk status=NotFound
logger=plugin.manager t=2022-09-26T14:31:30.663775668Z level=info msg=“Plugin registered” pluginId=input
logger=secrets t=2022-09-26T14:31:30.665363625Z level=info msg=“Envelope encryption state” enabled=true currentprovider=secretKey.v1
logger=query_data t=2022-09-26T14:31:30.670679073Z level=info msg=“Query Service initialization”
logger=live.push_http t=2022-09-26T14:31:30.67907254Z level=info msg=“Live Push Gateway initialization”
logger=ticker t=2022-09-26T14:31:30.692719569Z level=info msg=starting first_tick=2022-09-26T14:31:40Z
logger=infra.usagestats.collector t=2022-09-26T14:31:30.848361408Z level=info msg=“registering usage stat providers” usageStatsProvidersLen=2
logger=provisioning.alerting t=2022-09-26T14:31:31.008486905Z level=info msg=“starting to provision alerting”
logger=provisioning.alerting t=2022-09-26T14:31:31.008543081Z level=info msg=“finished to provision alerting”
logger=ngalert t=2022-09-26T14:31:31.009084275Z level=info msg=“warming cache for startup”
logger=report t=2022-09-26T14:31:31.011135371Z level=warn msg=“Scheduling and sending of reports disabled, SMTP is not configured and enabled. Configure SMTP to enable.”
logger=grafanaStorageLogger t=2022-09-26T14:31:31.013999259Z level=info msg=“storage starting”
logger=ngalert.multiorg.alertmanager t=2022-09-26T14:31:31.016655294Z level=info msg=“starting MultiOrg Alertmanager”
logger=http.server t=2022-09-26T14:31:31.017922145Z level=info msg=“HTTP Server Listen” address=[::]:3000 protocol=http subUrl= socket=

Forget that: The time on both influxdb and grafana are set to UTC so that isn’t my problem.
Back to head scratching.

Going to be hard to help you with that dump of huge log file, can you point us to an error in that log?

Also you are trying to install enterprise?

As for the other docker image it is not the official image so I would ask owner of that image to sort out your issues

The only clue I have that has appeared in the log is this

logger=licensing.renewal t=2022-09-26T15:31:31.167294158Z level=warn msg=“failed to load or validate token” err=“license token file not found: /var/lib/grafana/license.jwt”

But the Auth JWT settings are:

[auth.jwt]
enabled = false
enable_login_token = false
header_name =
email_claim =
username_claim =
jwk_set_url =
jwk_set_file =
cache_ttl = 60m
expected_claims = {}
key_file =
auto_sign_up = false

So, why is it reporting that?
I assume it is irrelevant to my problem? Or am I missing something?

Hi @cliver,

Welcome to the :grafana: community support forums !!

Not sure, if you have already found a solution as of now.

In case not, then I will like to help you and also identify as why the docker image for Grafana is not installing on your NAS.

To start from scratch. Please run the following commands on your NAS server where the docker service is up and running (paste the output of these 2 commands):

docker -v

and then

docker-compose -v

After that, let’s try with the v.basic docker-compose.yml file for the Grafana image:

version: "3"
services:
  grafana:
    image: grafana/grafana:latest
    container_name: grafana
    user: "0"
    # 0 is here because running directly as root user else find your userid by id cmd
    volumes:
    - /opt/docker_volumes/grafana:/var/lib/grafana
    ports:
      - "3000:3000"
    restart: unless-stopped

Do a docker-compose up -d and see if the grafana is up and running in the browser on port 3000

Hi @usmanahmad ,
Many thanks for coming back on this. I must apologise for not updating this thread. I have resolved my problem and got it and influxdb running on my nas.
It seems my nas doesn’t like docker compose.
In the end I installed influxdb and grafana separately using a docker run command and it’s working.
Not certain why docker compose doesn’t work but I have had the issue on several containers I have tried to set up.
Again, thanks for the help. All I have to do now is learn the intricacies of both flux and grafana :smile:

1 Like