Skip to content

Commit

Permalink
Add status reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
peel committed Feb 12, 2024
1 parent f185168 commit ce4afa2
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Runs Snowplow Report service sending mini status metrics
Wants=snowplow-report.timer

[Service]
Type=oneshot
ExecStart=/usr/bin/docker compose -f /home/ubuntu/snowplow/docker-compose.yml ps
# FIXME
# Inspect docker compose for services
# Report restarts
# Report errors
# Check OpenSearch for number of events both good and bad
# Check whether collector is accessible

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Starts Snowplow Report timer sending mini status metrics
Requires=snowlow-report.service

[Timer]
Unit=snowlow-report.service
OnCalendar=*:0/01:00

[Install]
WantedBy=timers.target
21 changes: 21 additions & 0 deletions provisioning/roles/sp_mini_7_setup_init/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
---
- include_vars: ../../common_vars.yml


- name: Create Snowplow Report service
copy:
src: ../files/snowplow-report.service
dest: /etc/systemd/system/snowplow-report.service
become: yes

- name: Create Report Snowplow timer
copy:
src: ../files/snowplow-report.timer
dest: /etc/systemd/system/snowplow-report.timer
become: yes

- name: Start Snowplow Report timer service
systemd:
name: snowplow-report.timer
state: started
enabled: yes
daemon_reload: yes
become: yes

- name: Copy SysVinit scripts to /etc/init.d
become: yes
copy:
Expand Down

0 comments on commit ce4afa2

Please sign in to comment.