Documentation ¶
Index ¶
- Variables
- func AssignRequest()
- func BytesIn(val int64)
- func BytesOut(val int64)
- func ConnectionClose()
- func ConnectionOpen()
- func DeleteRequest()
- func LoopPushingMetric(name, instance, addr string, intervalSeconds int)
- func MemStat() *volume_server_pb.MemStatus
- func NewDiskStatus(path string) (disk *volume_server_pb.DiskStatus)
- func ReadRequest()
- func RequestClose()
- func RequestOpen()
- func SourceName(port uint32) string
- func StartMetricsServer(port int)
- func WriteRequest()
- type Channels
- type DurationCounter
- type RoundRobinCounter
- type ServerStats
- type TimedValue
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Gather = prometheus.NewRegistry() FilerRequestCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "SeaweedFS", Subsystem: "filer", Name: "request_total", Help: "Counter of filer requests.", }, []string{"type"}) FilerRequestHistogram = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "SeaweedFS", Subsystem: "filer", Name: "request_seconds", Help: "Bucketed histogram of filer request processing time.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 24), }, []string{"type"}) FilerStoreCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "SeaweedFS", Subsystem: "filerStore", Name: "request_total", Help: "Counter of filer store requests.", }, []string{"store", "type"}) FilerStoreHistogram = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "SeaweedFS", Subsystem: "filerStore", Name: "request_seconds", Help: "Bucketed histogram of filer store request processing time.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 24), }, []string{"store", "type"}) VolumeServerRequestCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "SeaweedFS", Subsystem: "volumeServer", Name: "request_total", Help: "Counter of volume server requests.", }, []string{"type"}) VolumeServerRequestHistogram = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "SeaweedFS", Subsystem: "volumeServer", Name: "request_seconds", Help: "Bucketed histogram of volume server request processing time.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 24), }, []string{"type"}) VolumeServerVolumeCounter = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: "SeaweedFS", Subsystem: "volumeServer", Name: "volumes", Help: "Number of volumes or shards.", }, []string{"collection", "type"}) VolumeServerReadOnlyVolumeGauge = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: "SeaweedFS", Subsystem: "volumeServer", Name: "read_only_volumes", Help: "Number of read only volumes.", }, []string{"collection", "type"}) VolumeServerMaxVolumeCounter = prometheus.NewGauge( prometheus.GaugeOpts{ Namespace: "SeaweedFS", Subsystem: "volumeServer", Name: "max_volumes", Help: "Maximum number of volumes.", }) VolumeServerDiskSizeGauge = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: "SeaweedFS", Subsystem: "volumeServer", Name: "total_disk_size", Help: "Actual disk size used by volumes.", }, []string{"collection", "type"}) S3RequestCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "SeaweedFS", Subsystem: "s3", Name: "request_total", Help: "Counter of s3 requests.", }, []string{"type", "code"}) S3RequestHistogram = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "SeaweedFS", Subsystem: "s3", Name: "request_seconds", Help: "Bucketed histogram of s3 request processing time.", Buckets: prometheus.ExponentialBuckets(0.0001, 2, 24), }, []string{"type"}) )
Functions ¶
func AssignRequest ¶
func AssignRequest()
func ConnectionClose ¶
func ConnectionClose()
func ConnectionOpen ¶
func ConnectionOpen()
func DeleteRequest ¶
func DeleteRequest()
func LoopPushingMetric ¶
func MemStat ¶
func MemStat() *volume_server_pb.MemStatus
func NewDiskStatus ¶
func NewDiskStatus(path string) (disk *volume_server_pb.DiskStatus)
func ReadRequest ¶
func ReadRequest()
func RequestClose ¶
func RequestClose()
func RequestOpen ¶
func RequestOpen()
func SourceName ¶
func StartMetricsServer ¶
func StartMetricsServer(port int)
func WriteRequest ¶
func WriteRequest()
Types ¶
type Channels ¶
type Channels struct { Connections chan *TimedValue Requests chan *TimedValue AssignRequests chan *TimedValue ReadRequests chan *TimedValue WriteRequests chan *TimedValue DeleteRequests chan *TimedValue BytesIn chan *TimedValue BytesOut chan *TimedValue }
var (
Chan *Channels
)
type DurationCounter ¶
type DurationCounter struct { MinuteCounter *RoundRobinCounter HourCounter *RoundRobinCounter DayCounter *RoundRobinCounter WeekCounter *RoundRobinCounter }
func NewDurationCounter ¶
func NewDurationCounter() *DurationCounter
func (*DurationCounter) Add ¶
func (sc *DurationCounter) Add(tv *TimedValue)
Add is for cumulative counts
type RoundRobinCounter ¶
func NewRoundRobinCounter ¶
func NewRoundRobinCounter(slots int) *RoundRobinCounter
func (*RoundRobinCounter) Add ¶
func (rrc *RoundRobinCounter) Add(index int, val int64)
func (*RoundRobinCounter) Count ¶
func (rrc *RoundRobinCounter) Count() (cnt int64)
func (*RoundRobinCounter) Max ¶
func (rrc *RoundRobinCounter) Max() (max int64)
func (*RoundRobinCounter) Sum ¶
func (rrc *RoundRobinCounter) Sum() (sum int64)
func (*RoundRobinCounter) ToList ¶
func (rrc *RoundRobinCounter) ToList() (ret []int64)
type ServerStats ¶
type ServerStats struct { Requests *DurationCounter Connections *DurationCounter AssignRequests *DurationCounter ReadRequests *DurationCounter WriteRequests *DurationCounter DeleteRequests *DurationCounter BytesIn *DurationCounter BytesOut *DurationCounter }
func NewServerStats ¶
func NewServerStats() *ServerStats
func (*ServerStats) Start ¶
func (ss *ServerStats) Start()
type TimedValue ¶
type TimedValue struct {
// contains filtered or unexported fields
}
func NewTimedValue ¶
func NewTimedValue(t time.Time, val int64) *TimedValue
Click to show internal directories.
Click to hide internal directories.