From d111e2831d87898010e89cf901d4d125fb49deff Mon Sep 17 00:00:00 2001 From: Aida - Stefania Manole Date: Wed, 1 Dec 2021 13:37:18 +0100 Subject: [PATCH 1/2] fixed VictoriaMetrics download link for the newest version --- defaults/main.yml | 7 ++++--- tasks/install_vmutils.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index daee311..bf2fe11 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,9 +1,10 @@ --- # defaults file for VictoriaMetrics victoriametrics_repo_url: "https://github.com/VictoriaMetrics/VictoriaMetrics" -victoriametrics_download_url: "{{ victoriametrics_repo_url }}/releases/download/{{ victoriametrics_version }}/victoria-metrics-{{ victoriametrics_version }}.tar.gz" -victoriametrics_vmutils_download_url: "{{ victoriametrics_repo_url }}/releases/download/{{ victoriametrics_version }}/vmutils-{{ victoriametrics_version }}.tar.gz" -victoriametrics_version: "v1.28.0" +victoriametrics_cpu_architecture: "amd64" +victoriametrics_download_url: "{{ victoriametrics_repo_url }}/releases/download/{{ victoriametrics_version }}/victoria-metrics-{{ victoriametrics_cpu_architecture }}-{{ victoriametrics_version }}.tar.gz" +victoriametrics_vmutils_download_url: "{{ victoriametrics_repo_url }}/releases/download/{{ victoriametrics_version }}/vmutils-{{ victoriametrics_cpu_architecture }}-{{ victoriametrics_version }}.tar.gz" +victoriametrics_version: "v1.69.0" victoriametrics_system_user: "victoriametrics" victoriametrics_system_group: "{{ victoriametrics_system_user }}" victoriametrics_data_dir: "/var/lib/victoria-metrics/" diff --git a/tasks/install_vmutils.yml b/tasks/install_vmutils.yml index 63664f8..52cb4de 100644 --- a/tasks/install_vmutils.yml +++ b/tasks/install_vmutils.yml @@ -7,7 +7,7 @@ victoriametrics_version not in victoriametrics_current_version.stderr and victoriametrics_install_vmutil == True -- name: Download and unarchive VictoriaMetrics release binary +- name: Download and unarchive VictoriaMetrics vmutils release binary unarchive: src: "{{ victoriametrics_vmutils_download_url }}" dest: /usr/local/bin From de8a941e45af495d50a3eb3830c37e04f143bbf6 Mon Sep 17 00:00:00 2001 From: Aida - Stefania Manole Date: Sat, 5 Feb 2022 17:21:59 +0100 Subject: [PATCH 2/2] disable query cache when backfilling data --- defaults/main.yml | 4 +++- tasks/configure.yml | 2 +- templates/victoriametrics.service.j2 | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index bf2fe11..83537c7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,6 +9,8 @@ victoriametrics_system_user: "victoriametrics" victoriametrics_system_group: "{{ victoriametrics_system_user }}" victoriametrics_data_dir: "/var/lib/victoria-metrics/" victoriametrics_service_args: - storageDataPath: "{{ victoriametrics_data_dir }}" + storageDataPath: "{{ victoriametrics_data_dir }}" # default retentionPeriod is 1 months +victoriametrics_service_flags: + disable_cache: "search.disableCache" # useful during data backfilling victoriametrics_max_open_files: 2097152 victoriametrics_install_vmutil: false diff --git a/tasks/configure.yml b/tasks/configure.yml index f240d9e..33dbd78 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -7,4 +7,4 @@ group: root mode: 0644 notify: Restart VictoriaMetrics service - no_log: True + no_log: False diff --git a/templates/victoriametrics.service.j2 b/templates/victoriametrics.service.j2 index de1ddd7..c2033ea 100644 --- a/templates/victoriametrics.service.j2 +++ b/templates/victoriametrics.service.j2 @@ -10,7 +10,8 @@ LimitNOFILE={{ victoriametrics_max_open_files }} User={{ victoriametrics_system_user }} Group={{ victoriametrics_system_group }} ExecStart=/usr/local/bin/victoria-metrics-prod \ - {% for flag, flag_value in victoriametrics_service_args.items() %}--{{ flag }}={{ flag_value }} {% endfor %} + {% for flag, flag_value in victoriametrics_service_args.items() %}--{{ flag }}={{ flag_value }} {% endfor %} \ + {% for flag, flag_value in victoriametrics_service_flags.items() %}-{{ flag_value }} {% endfor %} SyslogIdentifier=victoriametrics Restart=always