status

package
v0.0.0-...-c4caace Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fmap

func Fmap() htemplate.FuncMap

Fmap return a fresh copy of a map of utility functions for HTML templating

func FormatDCAStatus

func FormatDCAStatus(data []byte) (string, error)

FormatDCAStatus takes a json bytestring and prints out the formatted statuspage

func FormatHPAStatus

func FormatHPAStatus(data []byte) (string, error)

FormatHPAStatus takes a json bytestring and prints out the formatted statuspage

func FormatMetadataMapCLI

func FormatMetadataMapCLI(data []byte) (string, error)

FormatMetadataMapCLI builds the rendering in the metadataMapper template.

func FormatSecurityAgentStatus

func FormatSecurityAgentStatus(data []byte) (string, error)

FormatSecurityAgentStatus takes a json bytestring and prints out the formatted status for security agent

func FormatStatus

func FormatStatus(data []byte) (string, error)

FormatStatus takes a json bytestring and prints out the formatted statuspage

func GetAndFormatDCAStatus

func GetAndFormatDCAStatus() ([]byte, error)

GetAndFormatDCAStatus gets and formats the DCA status all in one go.

func GetAndFormatSecurityAgentStatus

func GetAndFormatSecurityAgentStatus(runtimeStatus map[string]interface{}) ([]byte, error)

GetAndFormatSecurityAgentStatus gets and formats the security agent status

func GetAndFormatStatus

func GetAndFormatStatus() ([]byte, error)

GetAndFormatStatus gets and formats the status all in one go

func GetCheckStatus

func GetCheckStatus(c check.Check, cs *check.Stats) ([]byte, error)

GetCheckStatus gets the status of a single check as human-readable text

func GetCheckStatusJSON

func GetCheckStatusJSON(c check.Check, cs *check.Stats) ([]byte, error)

GetCheckStatusJSON gets the status of a single check as JSON

func GetDCAStatus

func GetDCAStatus() (map[string]interface{}, error)

GetDCAStatus grabs the status from expvar and puts it into a map

func GetStatus

func GetStatus() (map[string]interface{}, error)

GetStatus grabs the status from expvar and puts it into a map

func GetSystemProbeStats

func GetSystemProbeStats(socketPath string) map[string]interface{}

GetSystemProbeStats returns a notice that it is not supported on systems that do not at least build the process agent

func SetJMXStartupError

func SetJMXStartupError(s JMXStartupError)

SetJMXStartupError sets the last JMX startup error

func SetJMXStatus

func SetJMXStatus(s JMXStatus)

SetJMXStatus sets the last JMX Status

func Textfmap

func Textfmap() ttemplate.FuncMap

Textfmap return a fresh copy of a map of utility functions for text templating

Types

type CLCChecks

type CLCChecks struct {
	Checks map[string]map[string]CLCStats `json:"Checks"`
}

CLCChecks is used to unmarshall the runner expvar payload for CLC Runner

func GetExpvarRunnerStats

func GetExpvarRunnerStats() (CLCChecks, error)

GetExpvarRunnerStats grabs the status of the runner from expvar and puts it into a CLCChecks struct

type CLCStats

type CLCStats struct {
	AverageExecutionTime int  `json:"AverageExecutionTime"`
	MetricSamples        int  `json:"MetricSamples"`
	LastExecFailed       bool `json:"LastExecFailed"`
}

CLCStats is used to unmarshall the stats needed from the runner expvar payload

func (*CLCStats) UnmarshalJSON

func (d *CLCStats) UnmarshalJSON(data []byte) error

UnmarshalJSON overwrites the unmarshall method for CLCStats

type JMXStartupError

type JMXStartupError struct {
	LastError string
	Timestamp int64
}

JMXStartupError holds startup status and errors

func GetJMXStartupError

func GetJMXStartupError() JMXStartupError

GetJMXStartupError retrieves latest JMX startup error

type JMXStatus

type JMXStatus struct {
	Info         map[string]interface{} `json:"info"`
	ChecksStatus jmxCheckStatus         `json:"checks"`
	Timestamp    int64                  `json:"timestamp"`
	Errors       int64                  `json:"errors"`
}

JMXStatus holds status for JMX checks

func GetJMXStatus

func GetJMXStatus() JMXStatus

GetJMXStatus retrieves latest JMX Status

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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