feat(worktime): publish RDP activity to Grafana
This commit is contained in:
@@ -313,6 +313,13 @@
|
||||
AW_SERVER_URL=http://127.0.0.1:5600
|
||||
XDG_DATA_HOME={{ aw_server_data_dir }}/.local/share
|
||||
XDG_CONFIG_HOME={{ aw_server_data_dir }}/.config
|
||||
AW_WORKTIME_INFLUX_ENABLED={{ 'true' if (aw_worktime_influx_enabled | default(false) | bool) else 'false' }}
|
||||
AW_WORKTIME_INFLUX_URL={{ aw_worktime_influx_url | default('') }}
|
||||
AW_WORKTIME_INFLUX_ORG={{ aw_worktime_influx_org | default('proxmox') }}
|
||||
AW_WORKTIME_INFLUX_BUCKET={{ aw_worktime_influx_bucket | default('aw_metrics') }}
|
||||
AW_WORKTIME_INFLUX_HOSTS={{ aw_worktime_influx_hosts | default('SHARKON2025') }}
|
||||
AW_WORKTIME_INFLUX_DAYS={{ aw_worktime_influx_days | default('today,yesterday') }}
|
||||
AW_WORKTIME_INFLUX_TOKEN={{ aw_worktime_influx_token | default('') }}
|
||||
|
||||
- name: Создать каталог DLP policy engine
|
||||
ansible.builtin.file:
|
||||
@@ -652,6 +659,15 @@
|
||||
group: root
|
||||
mode: "0755"
|
||||
|
||||
- name: Установить скрипт AW worktime Influx exporter
|
||||
ansible.builtin.copy:
|
||||
src: "{{ aw_repo_root }}/aw-server/aw-worktime-influx-exporter.py"
|
||||
dest: /usr/local/bin/aw-worktime-influx-exporter.py
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
when: aw_worktime_influx_enabled | default(false) | bool
|
||||
|
||||
- name: Установить скрипт aw-health-check
|
||||
ansible.builtin.copy:
|
||||
src: "{{ aw_repo_root }}/aw-server/health-check.sh"
|
||||
@@ -700,6 +716,24 @@
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
||||
- name: Установить systemd unit AW worktime Influx exporter
|
||||
ansible.builtin.copy:
|
||||
src: "{{ aw_repo_root }}/aw-server/aw-worktime-influx-exporter.service"
|
||||
dest: /etc/systemd/system/aw-worktime-influx-exporter.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: aw_worktime_influx_enabled | default(false) | bool
|
||||
|
||||
- name: Установить systemd timer AW worktime Influx exporter
|
||||
ansible.builtin.copy:
|
||||
src: "{{ aw_repo_root }}/aw-server/aw-worktime-influx-exporter.timer"
|
||||
dest: /etc/systemd/system/aw-worktime-influx-exporter.timer
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: aw_worktime_influx_enabled | default(false) | bool
|
||||
|
||||
- name: Перезагрузить systemd после установки AW worktime API
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: true
|
||||
@@ -790,6 +824,20 @@
|
||||
state: started
|
||||
failed_when: false
|
||||
|
||||
- name: Включить и перезапустить AW worktime Influx exporter timer
|
||||
ansible.builtin.systemd:
|
||||
name: aw-worktime-influx-exporter.timer
|
||||
enabled: true
|
||||
state: restarted
|
||||
when: aw_worktime_influx_enabled | default(false) | bool
|
||||
|
||||
- name: Выполнить разовый прогон AW worktime Influx exporter
|
||||
ansible.builtin.systemd:
|
||||
name: aw-worktime-influx-exporter.service
|
||||
state: started
|
||||
failed_when: false
|
||||
when: aw_worktime_influx_enabled | default(false) | bool
|
||||
|
||||
- name: Применить хотфиксы compiled JS чанков (Trends, Timespiral, Category helper)
|
||||
ansible.builtin.command:
|
||||
cmd: "/opt/activitywatch/aw-server/apply_webui_ru_patch.sh"
|
||||
|
||||
@@ -10,6 +10,13 @@ aw_server_user: "activitywatch"
|
||||
aw_server_group: "activitywatch"
|
||||
aw_worktime_report_base: "http://10.10.10.13:5610"
|
||||
aw_worktime_timezone: "Europe/Moscow"
|
||||
aw_worktime_influx_enabled: false
|
||||
aw_worktime_influx_url: "http://10.10.10.10:8086"
|
||||
aw_worktime_influx_org: "proxmox"
|
||||
aw_worktime_influx_bucket: "aw_metrics"
|
||||
aw_worktime_influx_hosts: "SHARKON2025"
|
||||
aw_worktime_influx_days: "today,yesterday"
|
||||
aw_worktime_influx_token: ""
|
||||
|
||||
aw_repo_root: "{{ playbook_dir | dirname }}"
|
||||
|
||||
|
||||
@@ -10,6 +10,12 @@ aw_server_user: "activitywatch"
|
||||
aw_server_group: "activitywatch"
|
||||
aw_worktime_report_base: "http://10.10.10.13:5610"
|
||||
aw_worktime_timezone: "Europe/Moscow"
|
||||
aw_worktime_influx_enabled: false
|
||||
aw_worktime_influx_url: "http://10.10.10.10:8086"
|
||||
aw_worktime_influx_org: "proxmox"
|
||||
aw_worktime_influx_bucket: "aw_metrics"
|
||||
aw_worktime_influx_hosts: "SHARKON2025"
|
||||
aw_worktime_influx_days: "today,yesterday"
|
||||
|
||||
aw_repo_root: "/mnt/usb_hdd2/Projects/ActivityWatch-Russian"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user