Skip to content

Instantly share code, notes, and snippets.

@nibalizer
Created August 31, 2012 11:52
Show Gist options
  • Select an option

  • Save nibalizer/3551844 to your computer and use it in GitHub Desktop.

Select an option

Save nibalizer/3551844 to your computer and use it in GitHub Desktop.
colortail config for drbd
COLOR magenta
{
# matches the date
^(... ..).*$
^.*([0-9][0-9]\.[0-9]%).*$
}
COLOR cyan
{
^.*\[=*>(\.*)].*$
# matches the time
^... .. (..:..:..).*$
}
COLOR green
{
^.*\[=*(>)\.*].*$
# matches the hostname
^... .. ..:..:.. ([^ ]+).*$
^.*(sync'ed).*$
}
COLOR yellow
{
# matches the "program" that wrote to syslog
^... .. ..:..:.. [^ ]+ ([^ ]+)
}
COLOR brightyellow
{
^.*\[(=*)>\.*].*$
# matches all ip adresses
^.*([0-9]{3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*$
^.*([0-9]{2}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*$
^.*([0-9]{1}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*$
# matches two ip adresses in one line
^.*([0-9]{3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*([0-9]{3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*$
^.*([0-9]{2}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*([0-9]{2}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*$
^.*([0-9]{1}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*([0-9]{1}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*$
}
COLOR brightred
{
# matches the word root
^.*(\[)=*>\.*].*$
^.*\[=*>\.*(]).*$
^.*(root).*$
# matches DENY
^.*(ppp-in DENY ppp0).*$
^.*(eth-in DENY eth0).*$
^.*\([0-9]*/([0-9]*)\).*$
}
COLOR brightblue
{
# matches the output from the "program"
^... .. ..:..:.. [^ ]+ [^ ]+ (.*)
^.*\(([0-9]*)/[0-9]*\).*$
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment