Code Monkey home page Code Monkey logo

lnav's Introduction

lnav Add-ons for the Curity Identity Server

The Curity Identity Server logs various information in log files. To make it easier to view and navigate these logs, the tool lnav can be used. This tool provides a number of helpful features that make it easier to view and work with the server's logs, including:

  • Syntax highlighting of log messages
  • Automatic correlation of log messages when viewing multiple files concurrently
  • Filtering out messages that were logged below a certain log level
  • Searching and querying log using SQL
  • Live updates of newly added messages (simulating the behavior of tail -f)
  • Easy navigation using regular expression searches, paging by time intervals
  • much, much more

Formats

lnav recognizes various log file formats out of the box, including generic formatting that makes it easier to work with the Curity Identity Server's logs. To make this even simpler, this repository includes custom formats which improve lnav's generic syntax highlighting. Currently, the formatters included are ones for the following log files:

  • Server log
  • Request log
  • Audit log
  • Cluster log
  • Configuration Service log

Installation

To install these formats, ensure that lnav is installed. Then, follow the instructions in the lnav manual to install these formats. There are a few ways to do this. Specifically, the following will install the formats:

  1. lnav -i https://github.com/curityio/lnav.git. This will clone this repository and also make the formats available. It will also make it possible to update the formats easily by executing lnav -u.

  2. After cloning this repository, do either of these:

    A. Run lnav -i $REPO_DIR/curity.json (where $REPO_DIR is the directory created after cloning this repository).

    B. Make a directory under $HOME/.lnav/formats called curity and place curity.json in that directory.

Once this is done, the formats should be available and working. If they aren't raise an issue or ping us on Twitter.

Using lnav

To help you get started using lnav together with the Curity Identity Server here are a few examples:

lnav $IDSVR_HOME/var/log/audit.log

This example opens the audit log in lnav. Notice how this JSON file is formatted with syntax highlighting.

$IDSVR_HOME/bin/idsvr | tee -i $IDSVR_HOME/var/log/server.log | lnav

This example starts the Curity Identity Server and tees the output to standard out and the file $IDSVR_HOME/var/log/server.log. If the log file isn't needed, the simpler version of this command would be $IDSVR_HOME/bin/idsvr | lnav.

lnav $IDSVR_HOME/var/log/cluster.log

This command opens the cluster log file in lnav. This log file is very verbose and often not very interesting except when debugging cluster-related issues. To make it easier to see issues in this log file, with lnav running, type : and then type set-min-log-level info (note that tab completion is available). This will reduce the log to just a handful of messages, making it easier to see the more important log messages.

More Information

For more information about lnav, refer to the following sources:

License

These formats are licensed under the MIT license.

Questions

For questions, contact Curity AB:

[email protected] https://curity.io

Copyright (C) 2016 Curity AB.

lnav's People

Contributors

travisspencer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.