From 53cd90e91c7f016c31521cedd61db201bad5a5d1 Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 8 May 2024 19:24:53 +0300 Subject: [PATCH] update victoria metrics role and bump to v1.98.0 --- defaults/main.yaml | 10 +++++---- tasks/main.yaml | 22 +++++++++---------- .../victoriametrics/vmagent/prometheus.yml.j2 | 3 --- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/defaults/main.yaml b/defaults/main.yaml index 2dd90e9..bccf48b 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -1,5 +1,5 @@ -victoriametrics_corp_repo: "antonpatsev/VictoriaMetrics" -victoriametrics_version: "1.71.0" +victoriametrics_copr_repo: "antonpatsev/VictoriaMetrics" +victoriametrics_version: "1.98.0" victoriametrics_vmstorage_group: 'vmstorage' victoriametrics_vmstorage_version: "{{ victoriametrics_version }}" @@ -12,11 +12,13 @@ victoriametrics_vminsert_group: 'vminsert' victoriametrics_vminsert_version: "{{ victoriametrics_version }}" victoriametrics_vminsert_replication_factor: "2" - victoriametrics_vmauth_group: 'vmauth' victoriametrics_vmauth_version: "{{ victoriametrics_version }}" victoriametrics_vmauth_config_file: "/etc/victoriametrics/vmauth/config.yml" - +victoriametrics_vmauth_reloadAuthKey: reload-auth-key +victoriametrics_vmauth_flagsAuthKey: flags-auth-key +victoriametrics_vmauth_metricsAuthKey: metrics-auth-key +victoriametrics_vmauth_pprofAuthKey: pprof-auth-key victoriametrics_vmauth_users: [] # - id: "1" # username: "foobar" diff --git a/tasks/main.yaml b/tasks/main.yaml index 5502d1e..8506e2c 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -1,33 +1,33 @@ -- name: Install yum corp plugin +- name: Install dnf-plugins-core dnf: - name: yum-plugin-copr + name: dnf-plugins-core state: present -- name: Check corp repo antonpatsev/VictoriaMetrics is enabled +- name: Check copr repo antonpatsev/VictoriaMetrics is enabled shell: dnf -y copr list --enabled - register: corp_repo + register: copr_repo changed_when: false -- name: Enable corp repo antonpatsev/VictoriaMetrics +- name: Enable copr repo antonpatsev/VictoriaMetrics shell: dnf -y copr enable antonpatsev/VictoriaMetrics - when: '"antonpatsev/VictoriaMetrics" not in corp_repo.stdout' + when: '"antonpatsev/VictoriaMetrics" not in copr_repo.stdout' - name: Include vmstorage {{ victoriametrics_vmstorage_version }} deploy - include: vmstorage.yaml + import_tasks: vmstorage.yaml when: inventory_hostname in groups[victoriametrics_vmstorage_group] - name: Include vminsert {{ victoriametrics_vminsert_version }} deploy - include: vminsert.yaml + import_tasks: vminsert.yaml when: inventory_hostname in groups[victoriametrics_vminsert_group] - name: Include vmselect {{ victoriametrics_vmselect_version }} deploy - include: vmselect.yaml + import_tasks: vmselect.yaml when: inventory_hostname in groups[victoriametrics_vmselect_group] - name: Include vmauth {{ victoriametrics_vmauth_version }} deploy - include: vmauth.yaml + import_tasks: vmauth.yaml when: inventory_hostname in groups[victoriametrics_vmauth_group] - name: Include vmagent {{ victoriametrics_vmagent_version }} deploy - include: vmagent.yaml + import_tasks: vmagent.yaml when: inventory_hostname in groups[victoriametrics_vmagent_group] diff --git a/templates/etc/victoriametrics/vmagent/prometheus.yml.j2 b/templates/etc/victoriametrics/vmagent/prometheus.yml.j2 index 5897df7..e4071ba 100644 --- a/templates/etc/victoriametrics/vmagent/prometheus.yml.j2 +++ b/templates/etc/victoriametrics/vmagent/prometheus.yml.j2 @@ -27,9 +27,6 @@ # # Example to use vmagent with VictoriaMetrics Single {{ victoriametrics_vmagent_prometheus_config_combined }} -- job_name: 'vmagent' - static_configs: - - targets: ['127.0.0.1:8429'] - job_name: 'vminsert' static_configs: - targets: