Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
eth-log-alerting
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
eth-log-alerting
Commits
88689bf7
Commit
88689bf7
authored
6 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Basic, working role
parent
ec9954b9
No related branches found
No related tags found
1 merge request
!1
Initial release
Pipeline
#193
passed with stage
Stage:
in 3 minutes and 32 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
defaults/main.yml
+15
-1
15 additions, 1 deletion
defaults/main.yml
tasks/main.yml
+31
-1
31 additions, 1 deletion
tasks/main.yml
templates/config.j2
+18
-0
18 additions, 0 deletions
templates/config.j2
templates/logrotate.j2
+7
-0
7 additions, 0 deletions
templates/logrotate.j2
with
71 additions
and
2 deletions
defaults/main.yml
+
15
−
1
View file @
88689bf7
---
# defaults file for eth-log-alerting
\ No newline at end of file
eth_log_alerting_binary_url
:
"
https://git.ethitter.com/debian/eth-log-alerting/uploads/73fb61dcec9e953d24f1180d03959e4c/eth-log-alerting_linux_amd64"
eth_log_alerting_binary_dest
:
/usr/local/bin/eth-log-alerting
eth_log_alerting_config_dest
:
/etc/eth-log-alerting.json
eth_log_alerting_debug_dest
:
"
os.Stdout"
eth_log_alerting_debug
:
false
eth_log_alerting_logs
:
-
log_path
:
"
"
webhook_url
:
"
"
username
:
"
"
channel
:
"
"
color
:
"
"
icon_url
:
"
"
search
:
"
"
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
31
−
1
View file @
88689bf7
---
# tasks file for eth-log-alerting
\ No newline at end of file
-
name
:
Download and install binary
get_url
:
url
:
"
{{
eth_log_alerting_binary_url
}}"
dest
:
"
{{
eth_log_alerting_binary_dest
}}"
mode
:
0755
force
:
yes
-
name
:
Set configuration
template
:
src
:
templates/config.j2
dest
:
"
{{
eth_log_alerting_config_dest
}}"
force
:
yes
owner
:
root
group
:
root
mode
:
0400
-
name
:
Configure logrotate
template
:
src
:
templates/logrotate.j2
dest
:
/etc/logrotate.d/eth-log-alerting
force
:
yes
owner
:
root
group
:
root
mode
:
0644
when
:
eth_log_alerting_debug_dest != "os.Stdout"
-
name
:
Remove logrotate configuration
file
:
dest
:
/etc/logrotate.d/eth-log-alerting
state
:
absent
when
:
eth_log_alerting_debug_dest == "os.Stdout"
This diff is collapsed.
Click to expand it.
templates/config.j2
+
18
−
0
View file @
88689bf7
{
"debug-dest": "{{ eth_log_alerting_debug_dest }}",
"debug": {{ eth_log_alerting_debug|lower }},
"logs": [
{% for item in eth_log_alerting_logs %}{% if 0 != loop.index0 %},{% endif %}
{
"log_path": "{{ item.log_path }}",
"webhook_url": "{{ item.webhook_url }}",
"username": "{{ item.username }}",
"channel": "{{ item.channel }}",
"color": "{{ item.color }}",
"icon_url": "{{ item.icon_url }}",
"search": "{{ item.search }}"
}
{% endfor %}
]
}
This diff is collapsed.
Click to expand it.
templates/logrotate.j2
0 → 100644
+
7
−
0
View file @
88689bf7
{{ eth_log_alerting_debug_dest }} {
daily
rotate 14
notifempty
missingok
compress
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment