Skip to content

An Ansible role with a customisable syslog-ng impementation for streaming log files to Slack channels

License

Notifications You must be signed in to change notification settings

libre-ops/log-to-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Log-To-Slack Ansible role

This is an Ansible role for setting up live streaming of log files to a Slack channel using syslog-ng.

Required variables

# Slack API webhook
lts_slack_webhook: https://hooks.slack.com/services/XXXXXX/XXXXXXXX/XXXXXXXXXXXXXXXX

# Path to log file
lts_log_path: /var/log/some-log-file.log

Basic Customisations

# Default "author" field shown in Slack messages
lts_slack_author: log-to-slack

# String or regular expression to match against log lines.
# Only *matching* lines will be sent to Slack. Default matches anything.
# Example: "FATAL ERROR"
lts_syslogng_regex: .

Advanced Customisations

See variables and notes in /defaults/main and /templates.

Docs for syslog-ng: https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.26/administration-guide

Docs for Slack API: https://api.slack.com/messaging/webhooks

About

An Ansible role with a customisable syslog-ng impementation for streaming log files to Slack channels

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages