Closed fatchat closed 1 week ago
Grafana and prometheus are on the same machine.
Prometheus - is a open source monitoring toolkit that gathers data (metrics) from multiple sources. It is very good at handling time series data. For migrating prometheus to another machine follow these steps
Copy /etc/prometheus/prometheus.yml
and /etc/systemd/system/prometheus.service
from the old machine to the new
Copy the localdb (the timeseries db) at /var/lib/prometheus
from the old machine to the new. Use rsync
to sync the database directories so we copy incrementally and dont miss out on stats still being pushed while we test & do this. https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories
Start and enable the prometheus service to start on boot. If everything is in order , prometheuse server will be running on [localhost](http://localhost:9090)
Check if all the datasources/targets are active/up from prometheus dashboard. If not , make sure the right ports are expose & this new machine has access to it
Grafana - is the visualization and analytics platform that allows us to create dashboard of the metrics from prometheus & other sources. For migrating grafana to a new machine follow the steps
Copy the database from the old machine /var/lib/grafana/grafana.db
. we are using a sqlite3 db.
Verify the setup. Grafana runs on port 3000
does the prod machine push metrics to this new machine or will the new machine pull from prod
firewalls and dns also need to be updated (which i will do)
Prometheus pulls metrics from the targets (via http enddpoints). So the new machine will pull from prod.
Yes relevant firewalls/dns will need to be updated.
Install the postgres exporter
in the new machine
Node exporter version
Move Grafana to Danswer machine