From dd43bbcd463ac6b65d2ea3f300eb0a558c435f07 Mon Sep 17 00:00:00 2001 From: Hinrikus Wolf <hinrikus@fsmpi.rwth-aachen.de> Date: Mon, 5 Mar 2018 12:06:19 +0100 Subject: [PATCH] db: count db-rows regularily --- zabbix-server/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/zabbix-server/tasks/main.yml b/zabbix-server/tasks/main.yml index 5fe29f7..e3c5fb5 100644 --- a/zabbix-server/tasks/main.yml +++ b/zabbix-server/tasks/main.yml @@ -126,6 +126,18 @@ - database - zabbix +- name: ensure rows are counted regularily and saved in comment + cron: + name: "count rows" + special_time: monthly + job: psql zabbix -c "select * from zbx_update_partition_table_comments();" + state: present + user: postgres + delegate_to: "{{ zabbix_db_host }}" + tags: + - database + - zabbix + - name: upload the partition cleanup script copy: src: partition-cleanup.py -- GitLab