Skip to content

thewh1teagle/Lens

Repository files navigation

Lens

Your lens to insights.

Introduction

Lens is a versatile data exploration and dashboard creation tool that provides rapid insights through an intuitive user interface. With Lens, you can effortlessly generate dynamic dashboards from simple JSON configuration files.

Features

  • Easy to setup (just 1 binary!)
  • Simple to config (everything inside single JSON file with autocompletion)
  • Built in task scheduler (see examples/with_tasks.json)
  • Custom user agent for URL data source
  • Hot reload (Changes in JSON reflected immediately)
  • Alerts with push notifications

Setup

Download lens from releases

./lens examples/simple.json

Config

It's recommend to edit with an editor which works with json-schema for autocompletion, for instance - vscode

Examples

Examples available in Lens/examples

Variables

Queries can receive the following variables which comes from UI

  • $start_date start date
  • $end_date end date See examples

Data source

  • Sqlite Database
  • URL: any JSON URL
  • FS: any file in filesystem

Showcase

  • SpeedLens - Speedtest monitor with Lens dashboard

Docker

You only need to mount the JSON file and run it.

services:
  lens:
    image: thewh1teagle/lens
    command: /lens examples/simple.json
    volumes:
      - ./examples/:/examples
    ports:
      - 0.0.0.0:8080:8080
    environment:
      - LENS_HOST=0.0.0.0
      - LENS_PORT=8080

Dates

Dates are very important in this app.

Expected dates for UI/Server are UTC dates with the default SQLite format %Y-%m-%d %H:%M:%S.

This way, we can leverage the power of built-in functions of SQLite.