enable notifications for your specific log message
Tailing the log files from your specified log file and send slack notifications using filtered log messages regex.
- Tailing the log files
- Adjust tailing log files according to the log rotation
- Indexing the log files and identified current state in the log file
- Filtering the error logs
- push notifications to the Slack channel
- Make support for other notification platforms like PagerDuty, Discord.
- improve logs filtering functionality using more custom regex filter functions.
- Testing more for the race conditions.
- develop an agent to gather metrics as a background task with low usage.
- develop dashboard to visualize the metrics and logs issues.
- First you need to make a executable file using go build command.
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o logzy .
-
Then you need to configure this executable file run as system demon.
-
After setup you need to copy all the configuration files that included in
ops
directory. -
Make sure to create a log file named as
logzy.log
as mentioned log configuration file paths in ops config log file.
- We have provided a Dockerfile and you can customize that as you need
docker build -t logzy && docker run -d logzy
-
First you need to change the Slack incoming webhook URL property named as
slack-uri
insideops/app/config-{ENV}.yaml
file. -
Then you need to mention the log file name you need to tail inside the
ops/app/config-{ENV}.yaml
file property named aslog-file-name
. -
There is two log locations you need to add the setup file. first one is
log-location
property. This is the log file location you need to tail. -
Second one is
logger-file-location
. This is the log file location related to your application logs. If there is no log file location mentioned in theoutputPaths
property inops/log/config-{ENV}.yaml
then you need to add a location with file name likelogs/logzy.log
and check if there is a file in your mentioned place. -
for locally run the project you can run
ENV=local go run main.go
command. Install go setup before run the command.