Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TjerkNan committed Oct 14, 2024
1 parent 87f50a7 commit 253f85e
Show file tree
Hide file tree
Showing 9 changed files with 528 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build_venv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build python virtual env

on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4

- name: prep
run: sudo mkdir -p /usr/local/rdo-journalert/current/
- name: prep chown
run: sudo chown `id -u`:`id -g` /usr/local/rdo-journalert/current/

- name: copy project to run location.
run: cp -r ./requirements.txt /usr/local/rdo-journalert/current/

- name: Create env
run: python3 -m venv /usr/local/rdo-journalert/current/.venv

- name: pip3 install
run: cd /usr/local/rdo-journalert/current; source .venv/bin/activate; pip install -U pip; pip install -r requirements.txt

- name: Create archive
run: cd /usr/local/rdo-journalert/current/; tar -czf $GITHUB_WORKSPACE/rdo-journalert_venv_${{ env.RELEASE_VERSION }}.tar.gz .venv

- name: Upload venv tar
uses: actions/upload-artifact@v4
with:
name: rdo-journalert_venv_${{ env.RELEASE_VERSION }}
path: rdo-journalert_venv_${{ env.RELEASE_VERSION }}.tar.gz
24 changes: 24 additions & 0 deletions .github/workflows/create_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Create release package

on:
push:
tags:
- v*

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Create version.json
run: |
echo "{ \"version\": \"${{ env.RELEASE_VERSION }}\", \"git_ref\": \"$GITHUB_SHA\"}" > rdo-journalert/version.json
- name: Create tar
run: tar -czf rdo-journalert_${{ env.RELEASE_VERSION }}.tar.gz rdo-journalert
- name: Upload release tar
uses: actions/upload-artifact@v4
with:
name: rdo-journalert_${{ env.RELEASE_VERSION }}
path: rdo-journalert_${{ env.RELEASE_VERSION }}.tar.gz
19 changes: 19 additions & 0 deletions journalert/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
journal_remote_directory: /var/log/journal/remote
allow_list: allow_list.txt
allow_list_forced: allow_list_forced.txt
allow_list_human_readable: allow_list_human_readable.txt
keywords: ['error', 'fatal', 'critical', 'failure', 'traceback', 'failed']
learning_mode: True
fuzzy_threshold_percent: 85
fuzzy_threshold_percent_forced: 70
journal_window_seconds: 10
window_overlap_extra_seconds: 0.5
debug: False
debug_level: 0
cls: False
icinga_alert_file: /opt/journalert/icinga/icinga_alert.txt
output_log_file: /opt/journalert/logs/journalert_alert_log
output_log_file_learning_mode: /opt/journalert/logs/journalert_learning_mode
icinga_interval_seconds: 300
icinga_max_hosts: 10
log_size_max_bytes: 1024
Loading

0 comments on commit 253f85e

Please sign in to comment.