You will need to use a docker volume to save the file across restarts. On 15 Jan 03:36, Peter Toft wrote: > Thanx Stuart > I use docker where I just now added - > '--persistence.file=/var/log/pushgateway.txt' > It does not seem to give persistence. > > version: '3.3' > services: > pushgateway: > container_name: pushgateway > image: prom/pushgateway > ports: > - 9091:9091 > volumes: > - ./pushgateway.txt:/var/log/pushgateway.txt > command: > - '--web.enable-admin-api' > - '--persistence.file=/var/log/pushgateway.txt' > prometheus: > container_name: prometheus > image: prom/prometheus > volumes: > - ./prometheus.yml:/etc/prometheus/prometheus.yml > ports: > - 9090:9090 > command: > - '--config.file=/etc/prometheus/prometheus.yml' > - '--web.enable-admin-api' > - '--storage.tsdb.retention.time=1y' > grafana: > container_name: grafana > image: grafana/grafana > volumes: > - ./config/grafana.ini:/etc/grafana/grafana.ini > ports: > - 3000:3000 > > > On Friday, January 15, 2021 at 11:02:59 AM UTC+1 Stuart Clark wrote: > > > The push gateway supports a persistence file via the --persistence.file > > parameter to allow cached metrics to survive restarts. > > > > On 15 January 2021 09:46:18 GMT, Peter Toft <[email protected]> wrote: > >> > >> Hi guys > >> > >> I use a pushgateway -> prometheus -> grafana system to display simulation > >> metrics, and when I reboot the server I loose all the metrics I have in > >> the > >> pushgateway. They appear when I have rerun my external test server pushing > >> metrics. > >> > >> If I know that there is a reboot of the pushgateway coming. Is there a > >> simple'ish way to save and after a reboot restore these metrics? > >> > >> Have a nice day > >> > >> /Peter > >> > >> > > -- > > Sent from my Android device with K-9 Mail. Please excuse my brevity. > > > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/821d1de4-c59d-4cd9-938a-8e23dab2b2cbn%40googlegroups.com.
-- Julien Pivotto @roidelapluie -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/20210115130035.GA439095%40oxygen.

