Skip to content

Instantly share code, notes, and snippets.

@spinscale
Created December 25, 2015 14:31
Show Gist options
  • Save spinscale/58b92f89d5afe055d5d1 to your computer and use it in GitHub Desktop.
Save spinscale/58b92f89d5afe055d5d1 to your computer and use it in GitHub Desktop.
Elasticsearch clogrc configuration
# log levels
elasticsearch rule /\[INFO(\s*)]/ --> green match
elasticsearch rule /\[ERROR(\s*)]/ --> red match
elasticsearch rule /\[DEBUG(\s*)]/ --> yellow match
elasticsearch rule /\[TRACE(\s*)]/ --> yellow match
elasticsearch rule /\[WARN(\s*)]/ --> yellow match
# events
elasticsearch rule " new_master " --> bold cyan match
elasticsearch rule " added " --> bold cyan match
elasticsearch rule " removed " --> bold cyan match
# startup resembles an event, bolden the whole line
elasticsearch rule /version\[\d+\.\d+\.\d+\], pid\[\d+\], build\[.*\]/ --> black on white match
# cluster state
elasticsearch rule "[cluster.routing.allocation]" --> bold match
elasticsearch rule "[RED]" --> red match
elasticsearch rule "[YELLOW]" --> yellow match
elasticsearch rule "[GREEN]" --> green match
# ipv4 addresses and ports
# note: multiple matches of the same rule are not highlighted, as in multiple IP addresses
elasticsearch rule /(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?):[0-9]{1,5}/ --> green match
elasticsearch rule /\[(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\]:[0-9]{1,5}/ --> green match
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment