tools

package
v0.0.0-...-37766d3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2013 License: GPL-3.0 Imports: 8 Imported by: 5

Documentation

Overview

Package tools provides various functions for working with the monitors and alerts in the monitoring client.

Index

Constants

This section is empty.

Variables

View Source
var ConfigDir string = "/etc/monitor/"

Functions

func Logger

func Logger(mn string, msg string)

Function Logger takes monitor name and message as strings and writes them to a logfile.

func RaiseAlert

func RaiseAlert(alertMessage string, alertLevel int)

RaiseAlert formats the alertString into an Gob encoded message and passes it to the monitoring server

Types

type ConfigLine

type ConfigLine struct {
	Fields []string
}

func ReadConfig

func ReadConfig(mn string) []ConfigLine

Function ReadConfig takes the monitor name and uses it to form a file name. It reads this file and splits the lines into fields and returns them in a []string

Jump to

Keyboard shortcuts

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