tail a text file and trigger an action if a new line occurs [wip]

Tailpipe

  1. Synopsis
  2. Config
  3. Help

Synopsis

Tail a file and trigger an action if a new line occurs. Currently only mailing the new line somewhere is supported. Work in progress, there may be more to come...

Config

Configuration file examples can be found in the conf folder.

This is how a mail config looks like:

file_to_watch = "/tmp/tailpipe_test.log"
regex_filter = "(?i)(error|fail|fatal)"
action = "mail"

[mail]
host = "bear.local"
port = 1025
user = "test_user"
pass = "none"
encryption = "none"    # "none", "ssl", "tls"

addr_from = "[email protected]"
addr_to = ["[email protected]"]
subject = "Error on {{.Host}}"
template = """
Date:
{{.Date}}

Message:
{{.Text}}

{{if .TailError}}
There was a tail error:
{{.TailError}}
{{end}}
"""

Help


watch a text file for changes and do something with the latest line

Arguments:
  [<config-file>]    configuration file

Flags:
  -h, --help            Show context-sensitive help.
  -d, --debug           debug mode
  -V, --version-flag    display version
Owner
Similar Resources

rxscan provides functionality to scan text to variables using regular expression capture group.

rxscan rxscan provides functionality to scan text to variables using regular expression capture group. This library is still experimental, use at your

Dec 21, 2020

Simple utilities for creating ascii text in Go

Simple utilities for creating ascii text in Go

Oct 30, 2021

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Jan 2, 2023

Hex dump and read values of files quickly and swiftly with Go-Hex a program designed to dump any file in a hexadecimal format

Go-Hex Hex dump and read values of files quickly and swiftly with Go-Hex a program designed to dump any file in a hexadecimal format Dump Hashes ----

Oct 10, 2021

How much you spend for glovo. Make config file and launch yourself

how_much_you_spend How much you spend for glovo. Make config file and launch yourself, you are welcome! Put config file in the same folder as executab

Nov 9, 2021

GoWrap is a command line tool for generating decorators for Go interfaces

GoWrap GoWrap is a command line tool that generates decorators for Go interface types using simple templates. With GoWrap you can easily add metrics,

Dec 30, 2022

Tiny lib to manipulate the .line format (.rm in the reMarkable2) in Go

linestogo Tiny lib to manipulate the .line format

Apr 30, 2021

Utility to add network config file in apk

Utility to add network config file in apk. Which bypass the proxy intercept restriction for user installed burpsuit CA certificate.

Aug 19, 2022

golden provides utilities for golden file tests.

golden provides utilities for golden file tests.

Dec 27, 2022
Related tags
a decision & trigger framework backed by Google's Common Expression Language used in graphikDB

a decision & trigger framework backed by Google's Common Expression Language used in graphikDB

Nov 15, 2022
Implementing tail -f in Go

golang-tail-f An interviewer made me design this in 2 hours

Nov 15, 2021
simple GitHub action to parse Markdown Links into a .yaml file for Hugo

Obsidian Link Scrapper Used by Quartz This repository comes to you in two parts. GitHub Action (scrapes links into a .yml file) Hugo Partial (turns .y

Dec 30, 2022
Generates random text based on trigrams generated from input text
Generates random text based on trigrams generated from input text

Trigrams Generates random text based on trigrams generated from input text Contents Building Running Using Implementation notes NGram size Maximum wor

Feb 9, 2022
Di - A (very) WIP Go 1.18+ generic dependency injection package based on type reflection

di A (very) WIP Go 1.18+ generic dependency injection package based on type refl

Apr 26, 2022
A Github action to codon optimize sequences.

codon-optimize A Github action to codon optimize sequences. codon-optimize is a Github Action that receives a path for an amino acid fasta file (faa),

Jul 28, 2022
Cell is a Go package that creates new instances by string in running time.

Cell Cell is a Go package that creates new instances by string in running time. Getting Started Installing To start using CELL, install Go and run go

Dec 20, 2021
A helper function to create a pointer to a new object in Go 1.18+
A helper function to create a pointer to a new object in Go 1.18+

A helper function to create a pointer to a new object in Go 1.18+

Nov 9, 2022
Go library that provides fuzzy string matching optimized for filenames and code symbols in the style of Sublime Text, VSCode, IntelliJ IDEA et al.
Go library that provides fuzzy string matching optimized for filenames and code symbols in the style of Sublime Text, VSCode, IntelliJ IDEA et al.

Go library that provides fuzzy string matching optimized for filenames and code symbols in the style of Sublime Text, VSCode, IntelliJ IDEA et al. This library is external dependency-free. It only depends on the Go standard library.

Dec 27, 2022
📋 cross-platform clipboard package that supports accessing text and image in Go (macOS/Linux/Windows/Android/iOS)

clipboard Cross platform (macOS/Linux/Windows/Android/iOS) clipboard package in Go import "golang.design/x/clipboard" Features Cross platform supports

Dec 24, 2022