Afenioux's Blog page

3am; darkness; Maintenance window closing. Safety net: rollback.

Triggers for iTerm2 (example for Arista EOS)

Written by Arnaud no comments

I wrote some triggers to get colors when using iTerm2 (screenshot below) with Arista EOS but it should also work on Cisco IOSes with some minor tuning.

iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.14 or newer. It allows you to create Triggers. Triggers watch for text matching a regular expression to arrive in a terminal session and then perform an action in response. You can import triggers from a file/profile but you can configure them on "Preferences, Profile, Advanced, Edit Triggers".

The whole options are detailed in the official documentation for triggers.

errors on interface

 These regexp have been split to 3 lines to be easy to read

[1-9][0-9]* (input|output) (errors|discards)
[1-9][0-9]*( late)? collisions?
[1-9][0-9]* (deferred|CRC|alignment|symbol)

Background in red, text in white.


interface status

( up\s+up ) | connected   Highlight text in green.
( down (down|lowerlayerdown|notpresent) )| notconnect | errdisabled  Highlight text in red.


BGP sessions status

( Estab ) | Established          Highlight text in green when bgp session is established.
Estab +\d+ +0                 Highlight text in orange when bgp session is established and no route is received.
.*\s(Active|Idle\(NoIf\)|Idle\(MaxPath\)|Connect|Passive)\s*$      Highlight all the line in red when bgp session is not established.


interface description

If you are using observium syntax...

\sCore:     Highlight text in violet.
\sCust:          Highlight text in blue.
\sServer:      Highlight text in green.



Set colors on logs lines/patterns

.* %LINEPROTO-5-UPDOWN: .* down

You get the idea :)

Classified in : Arista Tags : none

Comments are closed.

Rss feed of the article's comments