Juniper/open-nti

Influx db to persist / hold state?

bodleytunes opened this issue · 9 comments

What is the correct way to run the containers so that influx stores the data after restarting the containers?

I tried make persistent and then make start and it's not holding data after a restart of all the containers.

Do you have to modify any of the files to point to an external volume?

Also when I run make start persistent, only a few of the containers start up (ie not as many as running make start), is that expected?

Regards,

Jon.

Hi Jon

when you start openNTI in persistence mode , i.e , make start-persistent, a new directory called db is created

root@ubuntu:~/open-nti# tree db/influxdb/
db/influxdb/
|-- meta
| -- meta.db -- wal
|-- docker_internal
| -- autogen | -- 3
| -- _00001.wal |-- _internal | -- monitor
| -- 2 | -- _00001.wal
|-- juniper
| -- four_weeks | -- 1
| -- _00003.wal -- snmp
-- autogen -- 4
`-- _00001.wal

All data is stored there, so if you want to stop the containers and hold all the data, you will have to start again in persistency mode (i.e make start-persistent )

You are right, in persistency mode kapacitor/chronograf and snmp was missing

I've committed that to fix it:
b7de0df

Regards

Ok thanks I'll try that again

Cheers!

Jon.

OK Works a treat now!

One last quick question, it doesn't seem to remember my dashboards in Grafana.

I added the json export files to the ./dashboards folder

image

But it doesn't seem to have them in the list after a stop/start-persistent?

Is there something else that needs to be done to make them persist?

Cheers,
Jon.

Hi Jon,

I've committed that:

5ae6650

With this commit all dashboards under ./dashboards folder should be present (bear in mind that dashboards provisioning automatically cannot be directly edited).

Read

Making changes to a provisioned dashboard section from:

http://docs.grafana.org/administration/provisioning/

Pull latest version and then execute make build-main + make start

Regards.

ok a ton of new dashboards have a appeared but its not showing mine in the list? :(

I have to manually import it and paste in the json again. stop then make-persistent, and nothing just the big list.

image

Is there something wrong with the way I'm exporting the panel which is stopping it from being imported.?

That's what I've done and it works fine:

  1. add json files inside dashboards directory

root@ubuntu:~/open-nti/dashboards# vi test.json

"Copy&Paste"

  1. Stop containers
    root@ubuntu:~/open-nti# make stop

  2. Start containers

root@ubuntu:~/open-nti# make start-persistent

and the new one is there

screen shot 2018-08-08 at 15 30 46

Regards

BTW, you can remove from dashboard directory all that you don't need :)