bosun.org: bosun.org/cmd/bosun/web Index | Files

package web

import "bosun.org/cmd/bosun/web"

Index

Package Files

chart.go embed.go expr.go incident.go middlewares.go roles.go save.go search.go static.go web.go

Variables

var (

    //InternetProxy is a url to use as a proxy when communicating with external services.
    //currently only google's shortener.
    InternetProxy   *url.URL
    AnnotateBackend backend.Backend
)

func APIRedirect Uses

func APIRedirect(w http.ResponseWriter, req *http.Request)

func Action Uses

func Action(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Alerts Uses

func Alerts(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func AnnotateEnabled Uses

func AnnotateEnabled(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func BulkEdit Uses

func BulkEdit(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Config Uses

func Config(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func ConfigRunningHash Uses

func ConfigRunningHash(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func ConfigTest Uses

func ConfigTest(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func DeleteMetadata Uses

func DeleteMetadata(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func DiffConfig Uses

func DiffConfig(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Dir Uses

func Dir(useLocal bool, name string) http.FileSystem

Dir returns a http.Filesystem for the embedded assets on a given prefix dir. If useLocal is true, the filesystem's contents are instead used.

func ErrorHistory Uses

func ErrorHistory(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Expr Uses

func Expr(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (v interface{}, err error)

func ExprGraph Uses

func ExprGraph(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

ExprGraph returns an svg graph. The basename of the requested svg file should be a base64 encoded expression.

func FS Uses

func FS(useLocal bool) http.FileSystem

FS returns a http.Filesystem for the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSByte Uses

func FSByte(useLocal bool, name string) ([]byte, error)

FSByte returns the named file from the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSMustByte Uses

func FSMustByte(useLocal bool, name string) []byte

FSMustByte is the same as FSByte, but panics if name is not present.

func FSMustString Uses

func FSMustString(useLocal bool, name string) string

FSMustString is the string version of FSMustByte.

func FSString Uses

func FSString(useLocal bool, name string) (string, error)

FSString is the string version of FSByte.

func FilteredTagsetsByMetric Uses

func FilteredTagsetsByMetric(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func GetMetadata Uses

func GetMetadata(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)
func GetShortLink(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Graph Uses

func Graph(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

Graph takes an OpenTSDB request data structure and queries OpenTSDB. Use the json parameter to pass JSON. Use the b64 parameter to pass base64-encoded JSON.

func HealthCheck Uses

func HealthCheck(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Host Uses

func Host(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func IncidentEvents Uses

func IncidentEvents(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Index Uses

func Index(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func IndexTSDB Uses

func IndexTSDB(w http.ResponseWriter, r *http.Request)

func JSON Uses

func JSON(h func(miniprofiler.Timer, http.ResponseWriter, *http.Request) (interface{}, error)) http.Handler

func Last Uses

func Last(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

Last returns the most recent datapoint for a metric+tagset. The metric+tagset string should be formated like os.cpu{host=foo}. The tag porition expects the that the keys will be in alphabetical order.

func ListOpenIncidents Uses

func ListOpenIncidents(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Listen Uses

func Listen(httpAddr, httpsAddr, certFile, keyFile string, devMode bool, tsdbHost string, reloadFunc func() error, authConfig *conf.AuthConf, st time.Time) error

func MetadataMetrics Uses

func MetadataMetrics(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func MetricsByTagKey Uses

func MetricsByTagKey(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func MetricsByTagPair Uses

func MetricsByTagPair(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func OpenTSDBVersion Uses

func OpenTSDBVersion(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func PutMetadata Uses

func PutMetadata(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Quiet Uses

func Quiet(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Relay Uses

func Relay(dest string) http.Handler

func Reload Uses

func Reload(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func ResetSchedule Uses

func ResetSchedule()

func Rule Uses

func Rule(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func RunEsc Uses

func RunEsc()

Run esc to embed entire static directory into static.go

func RunTsc Uses

func RunTsc()

Run tsc to compile all ts files into bosun.js

func SaveConfig Uses

func SaveConfig(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func SaveEnabled Uses

func SaveEnabled(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Shorten Uses

func Shorten(_ miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func SilenceClear Uses

func SilenceClear(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func SilenceGet Uses

func SilenceGet(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func SilenceSet Uses

func SilenceSet(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Status Uses

func Status(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func TagKeysByMetric Uses

func TagKeysByMetric(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func TagValuesByMetricTagKey Uses

func TagValuesByMetricTagKey(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func TagValuesByTagKey Uses

func TagValuesByTagKey(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func TestHTTPNotification Uses

func TestHTTPNotification(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func UniqueMetrics Uses

func UniqueMetrics(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

UniqueMetrics returns a sorted list of available metrics.

func Version Uses

func Version(w http.ResponseWriter, r *http.Request)

type ExtIncidentStatus Uses

type ExtIncidentStatus struct {
    ExtStatus
    IsActive  bool
    Silence   *models.Silence
    SilenceId string
}

type ExtStatus Uses

type ExtStatus struct {
    AlertName string
    Subject   string
    *models.IncidentState
    *models.RenderedTemplates
}

type Health Uses

type Health struct {
    // RuleCheck is true if last check happened within the check frequency window.
    RuleCheck     bool
    Quiet         bool
    UptimeSeconds int64
    StartEpoch    int64
    Notifications NotificationStats
}

type MetricMetaTagKeys Uses

type MetricMetaTagKeys struct {
    *database.MetricMetadata
    TagKeys []string
}

type MultiError Uses

type MultiError map[string]error

func (MultiError) Error Uses

func (m MultiError) Error() string

type NotificationStats Uses

type NotificationStats struct {
    // Post and email notifiaction stats
    PostNotificationsSuccess  int64
    PostNotificationsFailed   int64
    EmailNotificationsSuccess int64
    EmailNotificationsFailed  int64
}

type Res Uses

type Res struct {
    *models.Event
    Key models.AlertKey
}

Package web imports 55 packages (graph) and is imported by 10 packages. Updated 2020-06-21. Refresh now. Tools for package owners.