diff --git a/defaults/main.yml b/defaults/main.yml index daee311..83537c7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,13 +1,16 @@ --- # 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/" 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/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 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