Skip to content

ksckaan1/stati

Repository files navigation

Stati

stati-logo

Realtime monitoring for Go Runtime

Installation

go get -u github.com/ksckaan1/stati

Features

  • Run/Stop fetching new monitoring data,
  • Show stats in table or line graph mode,
  • Simple and elegant theme,
  • Show/hide labels in line graph,
  • Show min, max, avarage and last values of stats on table mode.

Usage

package main

import (
	"log"
	"time"

	"github.com/ksckaan1/stati"
)

func main() {
	s := stati.New().
		WithAddr(":3000").
		WithChartBuffer(100).
		WithInterval(time.Second).
		WithTitle("Stati")

	err := s.Start()
	if err != nil {
		log.Fatalln(err)
	}
}

or use concurrent

package main

import (
	"log"
	"time"

	"github.com/ksckaan1/stati"
)

func main() {
	s := stati.New().
		WithAddr(":3000").
		WithChartBuffer(100).
		WithInterval(time.Second).
		WithTitle("Stati")

	go func(){
		err := s.Start()
		if err != nil {
			log.Fatalln(err)
		}
	}()

	// other processes ...
}

Open http://localhost:3000/stati on your browser.

Dependencies

Screenshot

ss