Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add status reporting #401

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[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
# Report via statsd

[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
Loading