[kolla-ansible]change prometheus data volume path
Folks,
I have deployed prometheus with koll-ansible and now I want to change the path of prometheus volume to store matrices on bigger partitions. How do I change the volume path of prometheus to store matrix data on separate filesystem?
This is what I did in globals.yml but it doesn't work. Is the following variable correct?
prometheus_server_default_volumes: "/mnt/prometheus"
Hello Satish,
The prometheus_server_default_volumes variable is defined as:
prometheus_server_default_volumes: - "{{ node_config_directory }}/prometheus-server/:{{ container_config_directory }}/:ro" - "/etc/localtime:/etc/localtime:ro" - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}" - "prometheus_v2:/var/lib/prometheus" - "kolla_logs:/var/log/kolla/"
As you can see, it configures a lot more than just how Prometheus data is stored. By default it uses the prometheus_v2 Docker volume. If you want to store your data in /mnt/prometheus, you can use:
prometheus_server_default_volumes: - "{{ node_config_directory }}/prometheus-server/:{{ container_config_directory }}/:ro" - "/etc/localtime:/etc/localtime:ro" - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}" - "/mnt/prometheus:/var/lib/prometheus" - "kolla_logs:/var/log/kolla/"
Note that it won't move the data for you. If you want to keep existing data, stop prometheus_server containers and copy the data from /var/lib/docker/volumes/prometheus_v2/_data into /mnt/prometheus before applying this configuration.
Best regards, Pierre Riteau (priteau)
On Fri, 15 Sept 2023 at 04:29, Satish Patel satish.txt@gmail.com wrote:
Folks,
I have deployed prometheus with koll-ansible and now I want to change the path of prometheus volume to store matrices on bigger partitions. How do I change the volume path of prometheus to store matrix data on separate filesystem?
This is what I did in globals.yml but it doesn't work. Is the following variable correct?
prometheus_server_default_volumes: "/mnt/prometheus"
https://github.com/openstack/kolla-ansible/blob/428acfe97fdfbc89fd4dea577160...
You'd have to completely redefine the default volumes list. The other option is to do your mount into the /var/lib/docker/volumes/prometheus_v2/data directory ________________________________ From: Satish Patel satish.txt@gmail.com Sent: 15 September 2023 03:25 To: OpenStack Discuss openstack-discuss@lists.openstack.org Subject: [kolla-ansible]change prometheus data volume path
CAUTION: This email originates from outside THG
________________________________ Folks,
I have deployed prometheus with koll-ansible and now I want to change the path of prometheus volume to store matrices on bigger partitions. How do I change the volume path of prometheus to store matrix data on separate filesystem?
This is what I did in globals.yml but it doesn't work. Is the following variable correct?
prometheus_server_default_volumes: "/mnt/prometheus"
participants (3)
-
Danny Webb
-
Pierre Riteau
-
Satish Patel