Documentation ¶
Index ¶
- Variables
- func AddHeartBeat(instance string, value float64, ch chan<- prometheus.Metric)
- func AddMetricsByHostCount(instance string, value float64, ch chan<- prometheus.Metric)
- type ApplicationHealthCache
- type CacheServer
- type IncomingBuffer
- type IncomingDataCache
- type ShardedIncomingDataCache
- func (shard *ShardedIncomingDataCache) Expired() bool
- func (shard *ShardedIncomingDataCache) FlushAllMetrics()
- func (shard *ShardedIncomingDataCache) FlushPrometheusMetric(usetimestamp bool, ch chan<- prometheus.Metric) int
- func (shard *ShardedIncomingDataCache) GetData(itemKey string) incoming.MetricDataFormat
- func (shard *ShardedIncomingDataCache) GetLastAccess() int64
- func (shard *ShardedIncomingDataCache) SetData(data incoming.MetricDataFormat) error
- func (shard *ShardedIncomingDataCache) Size() int
Constants ¶
This section is empty.
Variables ¶
var MAXTTL int64 = 300
MAXTTL to remove plugin is stale for 5
Functions ¶
func AddHeartBeat ¶
func AddHeartBeat(instance string, value float64, ch chan<- prometheus.Metric)
AddHeartBeat ...
func AddMetricsByHostCount ¶
func AddMetricsByHostCount(instance string, value float64, ch chan<- prometheus.Metric)
AddMetricsByHostCount ...
Types ¶
type ApplicationHealthCache ¶
type ApplicationHealthCache struct { QpidRouterState int ElasticSearchState int LastAccess int64 //timestamp in seconds }
ApplicationHealthCache ...
func NewApplicationHealthCache ¶
func NewApplicationHealthCache() *ApplicationHealthCache
NewApplicationHealthCache ..
type CacheServer ¶
type CacheServer struct {
// contains filtered or unexported fields
}
CacheServer ..
func (*CacheServer) GetCache ¶
func (cs *CacheServer) GetCache() *IncomingDataCache
GetCache Get All hosts
type IncomingBuffer ¶
type IncomingBuffer struct {
// contains filtered or unexported fields
}
IncomingBuffer this is inut data send to cache server IncomingBuffer ..its of type collectd or anything else
type IncomingDataCache ¶
type IncomingDataCache struct {
// contains filtered or unexported fields
}
IncomingDataCache cache server converts it into this
func (*IncomingDataCache) FlushAll ¶
func (i *IncomingDataCache) FlushAll()
FlushAll Flush raw meterics data
func (IncomingDataCache) GetHosts ¶
func (i IncomingDataCache) GetHosts() (*sync.RWMutex, map[string]*ShardedIncomingDataCache)
GetHosts locks the cache and returns the whole cache together with the lock. Caller needs to explicitly unlocks after the operation is done.
func (IncomingDataCache) GetShard ¶
func (i IncomingDataCache) GetShard(key string) *ShardedIncomingDataCache
GetShard ..
type ShardedIncomingDataCache ¶
type ShardedIncomingDataCache struct {
// contains filtered or unexported fields
}
ShardedIncomingDataCache types of sharded cache collectd, influxdb etc ShardedIncomingDataCache ..
func NewShardedIncomingDataCache ¶
func NewShardedIncomingDataCache(maxttl int64) *ShardedIncomingDataCache
NewShardedIncomingDataCache .
func (*ShardedIncomingDataCache) Expired ¶
func (shard *ShardedIncomingDataCache) Expired() bool
Expired ... add expired test
func (*ShardedIncomingDataCache) FlushAllMetrics ¶
func (shard *ShardedIncomingDataCache) FlushAllMetrics()
FlushAllMetrics Generic Flushing metrics not used.. used only for testing
func (*ShardedIncomingDataCache) FlushPrometheusMetric ¶
func (shard *ShardedIncomingDataCache) FlushPrometheusMetric(usetimestamp bool, ch chan<- prometheus.Metric) int
FlushPrometheusMetric generate Prometheus metrics
func (*ShardedIncomingDataCache) GetData ¶
func (shard *ShardedIncomingDataCache) GetData(itemKey string) incoming.MetricDataFormat
GetData ...
func (*ShardedIncomingDataCache) GetLastAccess ¶
func (shard *ShardedIncomingDataCache) GetLastAccess() int64
GetLastAccess ..Get last access time ...
func (*ShardedIncomingDataCache) SetData ¶
func (shard *ShardedIncomingDataCache) SetData(data incoming.MetricDataFormat) error
SetData ... value as is saved under in DataCache
func (*ShardedIncomingDataCache) Size ¶
func (shard *ShardedIncomingDataCache) Size() int
Size no of plugin per shard