Versions in this module Expand all Collapse all v0 v0.0.4 Jun 23, 2022 v0.0.3 Jun 22, 2022 v0.0.2 Jun 22, 2022 Changes in this version + func IsUnixTime(strTime string) (bool, error) + func UnixToTime(sTime, eTime string) (time.Time, time.Time, error) v0.0.1 Jun 9, 2022 Changes in this version + var Annotate = map[string]parse.Func + var AzureMonitor = map[string]parse.Func + var CloudWatch = map[string]parse.Func + var DimensionParseError = errors.New("dimensions must be in format key:value") + var Elastic = map[string]parse.Func + var EndParseError = errors.New("Could not parse the end value") + var ErrUnknownOp = fmt.Errorf("expr: unknown op type") + var Graphite = map[string]parse.Func + var Influx = map[string]parse.Func + var PeriodParseError = errors.New("Could not parse the period value") + var Prom = map[string]parse.Func + var StartParseError = errors.New("Could not parse the start value") + var TSDB = map[string]parse.Func + func ScopeES2(ts opentsdb.TagSet, q elastic.Query) elastic.Query + func ScopeES5(ts opentsdb.TagSet, q elastic.Query) elastic.Query + func ScopeES6(ts opentsdb.TagSet, q elastic.Query) elastic.Query + func ScopeES7(ts opentsdb.TagSet, q elastic.Query) elastic.Query + type AlertStatusProvider interface + GetUnknownAndUnevaluatedAlertKeys func(alertName string) (unknown, unevaluated []models.AlertKey) + type AzureApplicationInsightsApp struct + AppId string + ApplicationName string + Tags map[string]string + func (app AzureApplicationInsightsApp) Ask(filter string) (bool, error) + type AzureApplicationInsightsApps struct + Applications []AzureApplicationInsightsApp + Prefix string + func (a AzureApplicationInsightsApps) Type() models.FuncType + func (a AzureApplicationInsightsApps) Value() interface{} + type AzureMonitorClientCollection struct + AIComponentsClient ainsightsmgmt.ComponentsClient + AIMetricsClient ainsights.MetricsClient + Concurrency int + MetricDefinitionsClient insights.MetricDefinitionsClient + MetricsClient insights.MetricsClient + ResourcesClient resources.Client + TenantId string + type AzureMonitorClients map[string]AzureMonitorClientCollection + type AzureResource struct + ID string + Name string + ResourceGroup string + Tags map[string]string + Type string + func (ar AzureResource) Ask(filter string) (bool, error) + type AzureResources struct + Prefix string + Resources []AzureResource + func (a AzureResources) Type() models.FuncType + func (a AzureResources) Value() interface{} + func (resources AzureResources) Get(rType, rsg, name string) (az AzureResource, found bool) + type Backends struct + AzureMonitor AzureMonitorClients + CloudWatchContext cloudwatch.Context + ElasticConfig ElasticConfig + ElasticHosts ElasticHosts + GraphiteContext graphite.Context + InfluxConfig client.HTTPConfig + PromConfig PromClients + TSDBContext opentsdb.Context + type BosunProviders struct + Annotate backend.Backend + Cache *cache.Cache + History AlertStatusProvider + Search *search.Search + Squelched func(tags opentsdb.TagSet) bool + type ESIndexer struct + Generate func(startDuration, endDuration *time.Time) []string + TimeField string + func (e ESIndexer) MarshalJSON() ([]byte, error) + func (e ESIndexer) Type() models.FuncType + func (e ESIndexer) Value() interface{} + type ESQuery struct + Query func(ver ESVersion) interface{} + func (e ESQuery) MarshalJSON() ([]byte, error) + func (e ESQuery) Type() models.FuncType + func (e ESQuery) Value() interface{} + type ESVersion string + const ESV2 + const ESV5 + const ESV6 + const ESV7 + type ElasticConfig struct + ClientOptionFuncs interface{} + Hosts []string + SimpleClient bool + Version ESVersion + type ElasticHosts struct + Hosts map[string]ElasticConfig + func (e ElasticHosts) InitClient(prefix string) error + func (e ElasticHosts) InitClient2(prefix string) error + func (e ElasticHosts) InitClient5(prefix string) error + func (e ElasticHosts) InitClient6(prefix string) error + func (e ElasticHosts) InitClient7(prefix string) error + func (e ElasticHosts) Query2(r *ElasticRequest2) (*elastic.SearchResult, error) + func (e ElasticHosts) Query5(r *ElasticRequest5) (*elastic.SearchResult, error) + func (e ElasticHosts) Query6(r *ElasticRequest6) (*elastic.SearchResult, error) + func (e ElasticHosts) Query7(r *ElasticRequest7) (*elastic.SearchResult, error) + type ElasticRequest2 struct + End *time.Time + HostKey string + Indices []string + Source *elastic.SearchSource + Start *time.Time + func ESBaseQuery2(now time.Time, indexer ESIndexer, filter elastic.Query, ...) (*ElasticRequest2, error) + func (r *ElasticRequest2) CacheKey() (string, error) + type ElasticRequest5 struct + End *time.Time + HostKey string + Indices []string + Source *elastic.SearchSource + Start *time.Time + func ESBaseQuery5(now time.Time, indexer ESIndexer, filter elastic.Query, ...) (*ElasticRequest5, error) + func (r *ElasticRequest5) CacheKey() (string, error) + type ElasticRequest6 struct + End *time.Time + HostKey string + Indices []string + Source *elastic.SearchSource + Start *time.Time + func ESBaseQuery6(now time.Time, indexer ESIndexer, filter elastic.Query, ...) (*ElasticRequest6, error) + func (r *ElasticRequest6) CacheKey() (string, error) + type ElasticRequest7 struct + End *time.Time + HostKey string + Indices []string + Source *elastic.SearchSource + Start *time.Time + func ESBaseQuery7(now time.Time, indexer ESIndexer, filter elastic.Query, ...) (*ElasticRequest7, error) + func (r *ElasticRequest7) CacheKey() (string, error) + type Expr struct + func New(expr string, funcs ...map[string]parse.Func) (*Expr, error) + func (e *Expr) Execute(backends *Backends, providers *BosunProviders, T miniprofiler.Timer, ...) (r *Results, queries []opentsdb.Request, err error) + func (e *Expr) ExecuteState(s *State) (r *Results, queries []opentsdb.Request, err error) + func (e *Expr) MarshalJSON() ([]byte, error) + type Info []interface + func (i Info) Type() models.FuncType + func (i Info) Value() interface{} + type Number float64 + func (n Number) MarshalJSON() ([]byte, error) + func (n Number) Type() models.FuncType + func (n Number) Value() interface{} + type NumberExpr Expr + func (s NumberExpr) Type() models.FuncType + func (s NumberExpr) Value() interface{} + type PromClients map[string]promv1.API + type Result struct + Group opentsdb.TagSet + type ResultSlice []*Result + func (r ResultSlice) DescByValue() ResultSlice + func (r ResultSlice) Filter(filter opentsdb.TagSet) ResultSlice + type ResultSliceByGroup ResultSlice + func (r ResultSliceByGroup) Len() int + func (r ResultSliceByGroup) Less(i, j int) bool + func (r ResultSliceByGroup) Swap(i, j int) + type ResultSliceByValue ResultSlice + func (r ResultSliceByValue) Len() int + func (r ResultSliceByValue) Less(i, j int) bool + func (r ResultSliceByValue) Swap(i, j int) + type Results struct + IgnoreOtherUnjoined bool + IgnoreUnjoined bool + NaNValue *float64 + Results ResultSlice + func Abs(e *State, set *Results) *Results + func AddTags(e *State, set *Results, s string) (*Results, error) + func Aggr(e *State, series *Results, groups string, aggregator string) (*Results, error) + func AnCounts(e *State, filter, startDuration, endDuration string) (r *Results, err error) + func AnDurations(e *State, filter, startDuration, endDuration string) (r *Results, err error) + func AnTable(e *State, filter, fieldsCSV, startDuration, endDuration string) (r *Results, err error) + func Avg(e *State, series *Results) (*Results, error) + func AzureAIFilterApps(prefix string, e *State, apps AzureApplicationInsightsApps, filter string) (r *Results, err error) + func AzureAIListApps(prefix string, e *State) (r *Results, err error) + func AzureAIMetricMD(prefix string, e *State, apps AzureApplicationInsightsApps) (r *Results, err error) + func AzureAIQuery(prefix string, e *State, metric, segmentCSV, filter string, ...) (r *Results, err error) + func AzureFilterResources(e *State, resources AzureResources, filter string) (r *Results, err error) + func AzureMetricDefinitions(prefix string, e *State, namespace, metric, rsg, resource string) (r *Results, err error) + func AzureMultiQuery(prefix string, e *State, metric, tagKeysCSV string, resources AzureResources, ...) (r *Results, err error) + func AzureQuery(prefix string, e *State, ...) (r *Results, err error) + func AzureResourcesByType(prefix string, e *State, tp string) (r *Results, err error) + func Band(e *State, query, duration, period string, num float64) (r *Results, err error) + func BandQuery(e *State, query, duration, period, eduration string, num float64) (r *Results, err error) + func CCount(e *State, series *Results) (*Results, error) + func Change(e *State, query, sduration, eduration string) (r *Results, err error) + func CloudWatchQuery(prefix string, e *State, ...) (*Results, error) + func Count(e *State, query, sduration, eduration string) (r *Results, err error) + func Crop(e *State, sSet *Results, startSet *Results, endSet *Results) (*Results, error) + func Des(e *State, series *Results, alpha float64, beta float64) *Results + func Dev(e *State, series *Results) (*Results, error) + func Diff(e *State, series *Results) (r *Results, err error) + func DropBool(e *State, target *Results, filter *Results) (*Results, error) + func DropG(e *State, series *Results, threshold *Results) (*Results, error) + func DropGe(e *State, series *Results, threshold *Results) (*Results, error) + func DropL(e *State, series *Results, threshold *Results) (*Results, error) + func DropLe(e *State, series *Results, threshold *Results) (*Results, error) + func DropNA(e *State, series *Results) (*Results, error) + func DropValues(e *State, series *Results, threshold *Results, ...) (*Results, error) + func Duration(e *State, d string) (*Results, error) + func ESAll(e *State) (*Results, error) + func ESAnd(e *State, esqueries ...ESQuery) (*Results, error) + func ESCount(prefix string, e *State, indexer ESIndexer, keystring string, filter ESQuery, ...) (r *Results, err error) + func ESDaily(e *State, timeField, indexRoot, layout string) (*Results, error) + func ESDateHistogram2(prefix string, e *State, indexer ESIndexer, keystring string, ...) (r *Results, err error) + func ESDateHistogram5(prefix string, e *State, indexer ESIndexer, keystring string, ...) (r *Results, err error) + func ESDateHistogram6(prefix string, e *State, indexer ESIndexer, keystring string, ...) (r *Results, err error) + func ESDateHistogram7(prefix string, e *State, indexer ESIndexer, keystring string, ...) (r *Results, err error) + func ESExists(e *State, field string) (*Results, error) + func ESGT(e *State, key string, gt float64) (*Results, error) + func ESGTE(e *State, key string, gte float64) (*Results, error) + func ESIndicies(e *State, timeField string, literalIndices ...string) *Results + func ESLS(e *State, indexRoot string) (*Results, error) + func ESLT(e *State, key string, lt float64) (*Results, error) + func ESLTE(e *State, key string, lte float64) (*Results, error) + func ESMonthly(e *State, timeField, indexRoot, layout string) (*Results, error) + func ESNot(e *State, query ESQuery) (*Results, error) + func ESOr(e *State, esqueries ...ESQuery) (*Results, error) + func ESQueryString(e *State, key string, query string) (*Results, error) + func ESRegexp(e *State, key string, regex string) (*Results, error) + func ESStat(prefix string, e *State, indexer ESIndexer, keystring string, filter ESQuery, ...) (r *Results, err error) + func Epoch(e *State) (*Results, error) + func Filter(e *State, set *Results, numberSet *Results) (*Results, error) + func First(e *State, series *Results) (*Results, error) + func Forecast_lr(e *State, series *Results, y *Results) (r *Results, err error) + func GraphiteBand(e *State, query, duration, period, format string, num float64) (r *Results, err error) + func GraphiteQuery(e *State, query string, sduration, eduration, format string) (r *Results, err error) + func InfluxQuery(e *State, db, query, startDuration, endDuration, groupByInterval string) (*Results, error) + func IsNaN(e *State, nSet *Results) (*Results, error) + func Last(e *State, series *Results) (*Results, error) + func LeftJoin(e *State, keysCSV, columnsCSV string, rowData ...*Results) (*Results, error) + func Length(e *State, series *Results) (*Results, error) + func Limit(e *State, set *Results, v float64) (*Results, error) + func Line_lr(e *State, series *Results, d string) (*Results, error) + func Map(e *State, series *Results, expr *Results) (*Results, error) + func Max(e *State, series *Results) (r *Results, err error) + func Median(e *State, series *Results) (r *Results, err error) + func Merge(e *State, series ...*Results) (*Results, error) + func Min(e *State, series *Results) (r *Results, err error) + func Month(e *State, offset float64, startEnd string) (*Results, error) + func NV(e *State, series *Results, v float64) (results *Results, err error) + func Over(e *State, query, duration, period string, num float64) (r *Results, err error) + func OverQuery(e *State, query, duration, period, eduration string, num float64) (r *Results, err error) + func Percentile(e *State, series *Results, p *Results) (r *Results, err error) + func PromMQuery(prefix string, e *State, ...) (r *Results, err error) + func PromMRate(prefix string, e *State, ...) (r *Results, err error) + func PromMRawAggSeriesQuery(prefix string, e *State, query, stepDuration, sdur, edur string) (*Results, error) + func PromMetricList(prefix string, e *State) (r *Results, err error) + func PromQuery(prefix string, e *State, ...) (r *Results, err error) + func PromRate(prefix string, e *State, ...) (r *Results, err error) + func PromRawAggSeriesQuery(prefix string, e *State, query, stepDuration, sdur, edur string) (*Results, error) + func PromTagInfo(prefix string, e *State, metric, sdur, edur string) (r *Results, err error) + func Query(e *State, query, sduration, eduration string) (r *Results, err error) + func Remove(e *State, set *Results, tagKey string) (*Results, error) + func Rename(e *State, set *Results, s string) (*Results, error) + func SeriesFunc(e *State, tags string, pairs ...float64) (*Results, error) + func Shift(e *State, series *Results, d string) (*Results, error) + func ShiftBand(e *State, query, duration, period string, num float64) (r *Results, err error) + func Since(e *State, series *Results) (*Results, error) + func Sort(e *State, series *Results, order string) (*Results, error) + func Streak(e *State, series *Results) (*Results, error) + func Sum(e *State, series *Results) (*Results, error) + func Tail(e *State, series *Results, number *Results) (*Results, error) + func TimeDelta(e *State, series *Results) (*Results, error) + func ToDuration(e *State, sec float64) (*Results, error) + func Transpose(e *State, d *Results, gp string) (*Results, error) + func Ungroup(e *State, d *Results) (*Results, error) + func V(e *State) (*Results, error) + func Window(e *State, query, duration, period string, num float64, rfunc string) (*Results, error) + func (a *Results) Equal(b *Results) (bool, error) + func (r *Results) NaN() Number + type Scalar float64 + func (s Scalar) MarshalJSON() ([]byte, error) + func (s Scalar) Type() models.FuncType + func (s Scalar) Value() interface{} + type Series map[time.Time]float64 + func (a Series) Equal(b Series) bool + func (s Series) MarshalJSON() ([]byte, error) + func (s Series) Type() models.FuncType + func (s Series) Value() interface{} + type SortablePoint struct + T time.Time + V float64 + type SortableSeries []SortablePoint + func NewSortedSeries(dps Series) SortableSeries + func (s SortableSeries) Len() int + func (s SortableSeries) Less(i, j int) bool + func (s SortableSeries) Swap(i, j int) + type State struct + Origin string + Timer miniprofiler.Timer + func (e *State) AddComputation(r *Result, text string, value interface{}) + type String string + func (s String) Type() models.FuncType + func (s String) Value() interface{} + type Table struct + Columns []string + Rows [][]interface{} + func (t Table) Type() models.FuncType + func (t Table) Value() interface{} + type Union struct + A Value + B Value + Group opentsdb.TagSet + func (u *Union) ExtendComputations(o *Result) + type Value interface + Type func() models.FuncType + Value func() interface{}