monitor

package
v0.0.0-...-11fc6bb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  = 1
	KB = 1024 * B
	MB = 1024 * KB
	GB = 1024 * MB
)

Variables

This section is empty.

Functions

func CPUCheck

func CPUCheck(c *gin.Context)

@Summary Checks the cpu usage @Description Checks the cpu usage @Tags monitor @Accept json @Produce json @Success 200 {string} plain "CRITICAL - Load average: 1.78, 1.99, 2.02 | Cores: 2" @Router /monitor/cpu [get]

func DiskCheck

func DiskCheck(c *gin.Context)

@Summary Checks the disk usage @Description Checks the disk usage @Tags monitor @Accept json @Produce json @Success 200 {string} plain "OK - Free space: 17233MB (16GB) / 51200MB (50GB) | Used: 33%" @Router /monitor/disk [get]

func HealthCheck

func HealthCheck(c *gin.Context)

@Summary Shows OK as the ping-pong result @Description Shows OK as the ping-pong result @Tags monitor @Accept json @Produce json @Success 200 {string} plain "OK" @Router /monitor/health [get]

func RAMCheck

func RAMCheck(c *gin.Context)

@Summary Checks the ram usage @Description Checks the ram usage @Tags monitor @Accept json @Produce json @Success 200 {string} plain "OK - Free space: 402MB (0GB) / 8192MB (8GB) | Used: 4%" @Router /monitor/ram [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL