Documentation ¶
Index ¶
- Constants
- Variables
- func CephVersionsCmd() ([]byte, error)
- func ParseCephVersions(buf []byte) (map[string]map[string]float64, error)
- type CephOSDPerfStat
- type ClusterHealthCollector
- type ClusterUsageCollector
- type Conn
- type CrashesCollector
- type Exporter
- type MDSCollector
- type MonitorCollector
- type OSDCollector
- type PoolInfoCollector
- type PoolStat
- type PoolUsageCollector
- type RGWCollector
- type RbdMirrorStatusCollector
- type Version
Constants ¶
const ( // CephHealthOK denotes the status of ceph cluster when healthy. CephHealthOK = "HEALTH_OK" // CephHealthWarn denotes the status of ceph cluster when unhealthy but recovering. CephHealthWarn = "HEALTH_WARN" // CephHealthErr denotes the status of ceph cluster when unhealthy but usually needs // manual intervention. CephHealthErr = "HEALTH_ERR" )
const ( MDSModeDisabled = 0 MDSModeForeground = 1 MDSModeBackground = 2 )
const ( // RbdMirrorOK denotes the status of the rbd-mirror when healthy. RbdMirrorOK = "OK" // RbdMirrorWarn denotes the status of rbd-mirror when unhealthy. RbdMirrorWarn = "WARNING" // RbdMirrorErr denotes the status of rbd-mirror when unhealthy but usually needs // manual intervention. RbdMirrorErr = "ERROR" )
const ( RGWModeDisabled = 0 RGWModeForeground = 1 RGWModeBackground = 2 )
Variables ¶
var ( // ErrInvalidVersion indicates that the given version string was invalid ErrInvalidVersion = errors.New("invalid version") // Nautilus is the *Version at which Ceph Nautilus was released. Nautilus = &Version{Major: 14, Minor: 2, Patch: 0, Revision: 0, Commit: ""} // Octopus is the *Version at which Ceph Octopus was released. Octopus = &Version{Major: 15, Minor: 2, Patch: 0, Revision: 0, Commit: ""} // Pacific is the *Version at which Ceph Pacific was released. Pacific = &Version{Major: 16, Minor: 2, Patch: 0, Revision: 0, Commit: ""} // Quincy is the *Version at which Ceph Quincy was released. Quincy = &Version{Major: 17, Minor: 2, Patch: 0, Revision: 0, Commit: ""} )
Functions ¶
func CephVersionsCmd ¶
Types ¶
type CephOSDPerfStat ¶
type CephOSDPerfStat struct {
// contains filtered or unexported fields
}
type ClusterHealthCollector ¶
type ClusterHealthCollector struct { // HealthStatus shows the overall health status of a given cluster. HealthStatus *prometheus.Desc // HealthStatusInterpreter shows the overall health status of a given // cluster, with a breakdown of the HEALTH_WARN status into two groups // based on criticality. HealthStatusInterpreter prometheus.Gauge // MONsDown show the no. of Monitor that are int DOWN state MONsDown *prometheus.Desc // TotalPGs shows the total no. of PGs the cluster constitutes of. TotalPGs *prometheus.Desc // PGstate contains state of all PGs labelled with the name of states. PGState *prometheus.Desc // ActivePGs shows the no. of PGs the cluster is actively serving data // from. ActivePGs *prometheus.Desc // DegradedPGs shows the no. of PGs that have some of the replicas // missing. DegradedPGs *prometheus.Desc // StuckDegradedPGs shows the no. of PGs that have some of the replicas // missing, and are stuck in that state. StuckDegradedPGs *prometheus.Desc // UncleanPGs shows the no. of PGs that do not have all objects in the PG // that are supposed to be in it. UncleanPGs *prometheus.Desc // StuckUncleanPGs shows the no. of PGs that do not have all objects in the PG // that are supposed to be in it, and are stuck in that state. StuckUncleanPGs *prometheus.Desc // UndersizedPGs depicts the no. of PGs that have fewer copies than configured // replication level. UndersizedPGs *prometheus.Desc // StuckUndersizedPGs depicts the no. of PGs that have fewer copies than configured // replication level, and are stuck in that state. StuckUndersizedPGs *prometheus.Desc // StalePGs depicts no. of PGs that are in an unknown state i.e. monitors do not know // anything about their latest state since their pg mapping was modified. StalePGs *prometheus.Desc // StuckStalePGs depicts no. of PGs that are in an unknown state i.e. monitors do not know // anything about their latest state since their pg mapping was modified, and are stuck // in that state. StuckStalePGs *prometheus.Desc // PeeringPGs depicts no. of PGs that have one or more OSDs undergo state changes // that need to be communicated to the remaining peers. PeeringPGs *prometheus.Desc // ScrubbingPGs depicts no. of PGs that are in scrubbing state. // Light scrubbing checks the object size and attributes. ScrubbingPGs *prometheus.Desc // DeepScrubbingPGs depicts no. of PGs that are in scrubbing+deep state. // Deep scrubbing reads the data and uses checksums to ensure data integrity. DeepScrubbingPGs *prometheus.Desc // RecoveringPGs depicts no. of PGs that are in recovering state. // The PGs in this state have been dequeued from recovery_wait queue and are // actively undergoing recovery. RecoveringPGs *prometheus.Desc // RecoveryWaitPGs depicts no. of PGs that are in recovery_wait state. // The PGs in this state are still in queue to start recovery on them. RecoveryWaitPGs *prometheus.Desc // BackfillingPGs depicts no. of PGs that are in backfilling state. // The PGs in this state have been dequeued from backfill_wait queue and are // actively undergoing recovery. BackfillingPGs *prometheus.Desc // BackfillWaitPGs depicts no. of PGs that are in backfill_wait state. // The PGs in this state are still in queue to start backfill on them. BackfillWaitPGs *prometheus.Desc // ForcedRecoveryPGs depicts no. of PGs that are undergoing forced recovery. ForcedRecoveryPGs *prometheus.Desc // ForcedBackfillPGs depicts no. of PGs that are undergoing forced backfill. ForcedBackfillPGs *prometheus.Desc // DownPGs depicts no. of PGs that are currently down and not able to serve traffic. DownPGs *prometheus.Desc // IncompletePGs depicts no. of PGs that are currently incomplete and not able to serve traffic. IncompletePGs *prometheus.Desc // InconsistentPGs depicts no. of PGs that are currently inconsistent InconsistentPGs *prometheus.Desc // SnaptrimPGs depicts no. of PGs that are currently snaptrimming SnaptrimPGs *prometheus.Desc // SnaptrimWaitPGs depicts no. of PGs that are currently waiting to snaptrim SnaptrimWaitPGs *prometheus.Desc // RepairingPGs depicts no. of PGs that are currently repairing RepairingPGs *prometheus.Desc // SlowOps depicts no. of total slow ops in the cluster SlowOps *prometheus.Desc // DegradedObjectsCount gives the no. of RADOS objects are constitute the degraded PGs. // This includes object replicas in its count. DegradedObjectsCount *prometheus.Desc // MisplacedObjectsCount gives the no. of RADOS objects that constitute the misplaced PGs. // Misplaced PGs usually represent the PGs that are not in the storage locations that // they should be in. This is different than degraded PGs which means a PG has fewer copies // that it should. // This includes object replicas in its count. MisplacedObjectsCount *prometheus.Desc // MisplacedRatio shows the ratio of misplaced objects to total objects MisplacedRatio *prometheus.Desc // NewCrashReportCount reports if new Ceph daemon crash reports are available NewCrashReportCount *prometheus.Desc // TooManyRepairs reports the number of OSDs exceeding mon_osd_warn_num_repaired TooManyRepairs *prometheus.Desc // Objects show the total no. of RADOS objects that are currently allocated Objects *prometheus.Desc // OSDMapFlags - **these are being deprecated in favor of using the OSDMapFlags ConstMetrics descriptor** OSDMapFlagFull prometheus.Gauge OSDMapFlagPauseRd prometheus.Gauge OSDMapFlagPauseWr prometheus.Gauge OSDMapFlagNoUp prometheus.Gauge OSDMapFlagNoDown prometheus.Gauge OSDMapFlagNoIn prometheus.Gauge OSDMapFlagNoOut prometheus.Gauge OSDMapFlagNoBackfill prometheus.Gauge OSDMapFlagNoRecover prometheus.Gauge OSDMapFlagNoRebalance prometheus.Gauge OSDMapFlagNoScrub prometheus.Gauge OSDMapFlagNoDeepScrub prometheus.Gauge OSDMapFlagNoTierAgent prometheus.Gauge // OSDMapFlags, but implemented as a ConstMetric and each flag is a label OSDMapFlags *prometheus.Desc // OSDFlagToGaugeMap maps flags to gauges OSDFlagToGaugeMap map[string]*prometheus.Gauge // OSDsDown show the no. of OSDs that are in the DOWN state. OSDsDown *prometheus.Desc // OSDsUp show the no. of OSDs that are in the UP state and are able to serve requests. OSDsUp *prometheus.Desc // OSDsIn shows the no. of OSDs that are marked as IN in the cluster. OSDsIn *prometheus.Desc // OSDsNum shows the no. of total OSDs the cluster has. OSDsNum *prometheus.Desc // RemappedPGs show the no. of PGs that are currently remapped and needs to be moved // to newer OSDs. RemappedPGs *prometheus.Desc // RecoveryIORate shows the i/o rate at which the cluster is performing its ongoing // recovery at. RecoveryIORate *prometheus.Desc // RecoveryIOKeys shows the rate of rados keys recovery. RecoveryIOKeys *prometheus.Desc // RecoveryIOObjects shows the rate of rados objects being recovered. RecoveryIOObjects *prometheus.Desc // ClientReadBytesPerSec shows the total client read i/o on the cluster. ClientReadBytesPerSec *prometheus.Desc // ClientWriteBytesPerSec shows the total client write i/o on the cluster. ClientWriteBytesPerSec *prometheus.Desc // ClientIOOps shows the rate of total operations conducted by all clients on the cluster. ClientIOOps *prometheus.Desc // ClientIOReadOps shows the rate of total read operations conducted by all clients on the cluster. ClientIOReadOps *prometheus.Desc // ClientIOWriteOps shows the rate of total write operations conducted by all clients on the cluster. ClientIOWriteOps *prometheus.Desc // CacheFlushIORate shows the i/o rate at which data is being flushed from the cache pool. CacheFlushIORate *prometheus.Desc // CacheEvictIORate shows the i/o rate at which data is being flushed from the cache pool. CacheEvictIORate *prometheus.Desc // CachePromoteIOOps shows the rate of operations promoting objects to the cache pool. CachePromoteIOOps *prometheus.Desc // MgrsActive shows the number of active mgrs, can be either 0 or 1. MgrsActive *prometheus.Desc // MgrsNum shows the total number of mgrs, including standbys. MgrsNum *prometheus.Desc // RbdMirrorUp shows the alive rbd-mirror daemons RbdMirrorUp *prometheus.Desc // contains filtered or unexported fields }
ClusterHealthCollector collects information about the health of an overall cluster. It surfaces changes in the ceph parameters unlike data usage that ClusterUsageCollector does.
func NewClusterHealthCollector ¶
func NewClusterHealthCollector(exporter *Exporter) *ClusterHealthCollector
NewClusterHealthCollector creates a new instance of ClusterHealthCollector to collect health metrics on.
func (*ClusterHealthCollector) Collect ¶
func (c *ClusterHealthCollector) Collect(ch chan<- prometheus.Metric, version *Version)
Collect sends all the collected metrics to the provided prometheus channel. It requires the caller to handle synchronization.
func (*ClusterHealthCollector) Describe ¶
func (c *ClusterHealthCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends all the descriptions of individual metrics of ClusterHealthCollector to the provided prometheus channel.
type ClusterUsageCollector ¶
type ClusterUsageCollector struct { // GlobalCapacity displays the total storage capacity of the cluster. This // information is based on the actual no. of objects that are // allocated. It does not take overcommitment into consideration. GlobalCapacity prometheus.Gauge // UsedCapacity shows the storage under use. UsedCapacity prometheus.Gauge // AvailableCapacity shows the remaining capacity of the cluster that is // left unallocated. AvailableCapacity prometheus.Gauge // contains filtered or unexported fields }
A ClusterUsageCollector is used to gather all the global stats about a given ceph cluster. It is sometimes essential to know how fast the cluster is growing or shrinking as a whole in order to zero in on the cause. The pool specific stats are provided separately.
func NewClusterUsageCollector ¶
func NewClusterUsageCollector(exporter *Exporter) *ClusterUsageCollector
NewClusterUsageCollector creates and returns the reference to ClusterUsageCollector and internally defines each metric that display cluster stats.
func (*ClusterUsageCollector) Collect ¶
func (c *ClusterUsageCollector) Collect(ch chan<- prometheus.Metric, version *Version)
Collect sends the metric values for each metric pertaining to the global cluster usage over to the provided prometheus Metric channel.
func (*ClusterUsageCollector) Describe ¶
func (c *ClusterUsageCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the descriptors of each metric over to the provided channel. The corresponding metric values are sent separately.
type Conn ¶
type Conn interface { MonCommand([]byte) ([]byte, string, error) MgrCommand([][]byte) ([]byte, string, error) GetPoolStats(string) (*PoolStat, error) }
Conn interface implements only necessary methods that are used in this repository on top of *rados.Conn. This keeps rest of the implementation clean and *rados.Conn doesn't need to show up everywhere (it being more of an implementation detail in reality). Also it makes mocking easier for unit-testing the collectors.
type CrashesCollector ¶
type CrashesCollector struct {
// contains filtered or unexported fields
}
CrashesCollector collects information on how many crash reports are currently open. These reports are counted by daemon/client name, and by status (new or archived). This is NOT the same as new_crash_reports, that only counts new reports in the past two weeks as reported by 'ceph health'.
func NewCrashesCollector ¶
func NewCrashesCollector(exporter *Exporter) *CrashesCollector
NewCrashesCollector creates a new CrashesCollector instance
func (*CrashesCollector) Collect ¶
func (c *CrashesCollector) Collect(ch chan<- prometheus.Metric, version *Version)
Collect sends all the collected metrics Prometheus.
func (*CrashesCollector) Describe ¶
func (c *CrashesCollector) Describe(ch chan<- *prometheus.Desc)
Describe provides the metrics descriptions to Prometheus
type Exporter ¶
type Exporter struct { Conn Conn Cluster string Config string User string RgwMode int MDSMode int RbdMirror bool Logger *logrus.Logger Version *Version // contains filtered or unexported fields }
Exporter wraps all the ceph collectors and provides a single global exporter to extracts metrics out of. It also ensures that the collection is done in a thread-safe manner, the necessary requirement stated by prometheus. It also implements a prometheus.Collector interface in order to register it correctly.
func NewExporter ¶
func NewExporter(conn Conn, cluster, config, user string, rgwMode, mdsMode int, logger *logrus.Logger) *Exporter
NewExporter returns an initialized *Exporter We can choose to enable a collector to extract stats out of by adding it to the list of collectors.
func (*Exporter) Collect ¶
func (exporter *Exporter) Collect(ch chan<- prometheus.Metric)
Collect sends the collected metrics from each of the collectors to prometheus. Collect could be called several times concurrently and thus its run is protected by a single mutex.
func (*Exporter) Describe ¶
func (exporter *Exporter) Describe(ch chan<- *prometheus.Desc)
Describe sends all the descriptors of the collectors included to the provided channel.
type MDSCollector ¶
type MDSCollector struct { // MDSState reports the state of MDS process running. MDSState *prometheus.Desc // MDSBlockedOPs reports the slow or blocked ops on an MDS. MDSBlockedOps *prometheus.Desc // contains filtered or unexported fields }
MDSCollector collects metrics from the MDS daemons.
func NewMDSCollector ¶
func NewMDSCollector(exporter *Exporter, background bool) *MDSCollector
NewMDSCollector creates an instance of the MDSCollector and instantiates the individual metrics that we can collect from the MDS daemons.
func (*MDSCollector) Collect ¶
func (m *MDSCollector) Collect(ch chan<- prometheus.Metric, version *Version)
Collect sends all the collected metrics to the provided prometheus channel. It requires the caller to handle synchronization.
func (*MDSCollector) Describe ¶
func (m *MDSCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the descriptors of each MDSCollector related metrics we have defined to the provided prometheus channel.
type MonitorCollector ¶
type MonitorCollector struct { // ClockSkew shows how far the monitor clocks have skewed from each other. This // is an important metric because the functioning of Ceph's paxos depends on // the clocks being aligned as close to each other as possible. ClockSkew *prometheus.GaugeVec // Latency displays the time the monitors take to communicate between themselves. Latency *prometheus.GaugeVec // NodesinQuorum show the size of the working monitor quorum. Any change in this // metric can imply a significant issue in the cluster if it is not manually changed. NodesinQuorum prometheus.Gauge // CephVersions exposes a view of the `ceph versions` command. CephVersions *prometheus.GaugeVec // CephFeatures exposes a view of the `ceph features` command. CephFeatures *prometheus.GaugeVec // contains filtered or unexported fields }
MonitorCollector is used to extract stats related to monitors running within Ceph cluster. As we extract information pertaining to each monitor instance, there are various vector metrics we need to use.
func NewMonitorCollector ¶
func NewMonitorCollector(exporter *Exporter) *MonitorCollector
NewMonitorCollector creates an instance of the MonitorCollector and instantiates the individual metrics that show information about the monitor processes.
func (*MonitorCollector) Collect ¶
func (m *MonitorCollector) Collect(ch chan<- prometheus.Metric, version *Version)
Collect extracts the given metrics from the Monitors and sends it to the prometheus channel.
func (*MonitorCollector) Describe ¶
func (m *MonitorCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the descriptors of each Monitor related metric we have defined to the channel provided.
type OSDCollector ¶
type OSDCollector struct { // CrushWeight is a persistent setting, and it affects how CRUSH assigns data to OSDs. // It displays the CRUSH weight for the OSD CrushWeight *prometheus.GaugeVec // Depth displays the OSD's level of hierarchy in the CRUSH map Depth *prometheus.GaugeVec // Reweight sets an override weight on the OSD. // It displays value within 0 to 1. Reweight *prometheus.GaugeVec // Bytes displays the total bytes available in the OSD Bytes *prometheus.GaugeVec // UsedBytes displays the total used bytes in the OSD UsedBytes *prometheus.GaugeVec // AvailBytes displays the total available bytes in the OSD AvailBytes *prometheus.GaugeVec // Utilization displays current utilization of the OSD Utilization *prometheus.GaugeVec // Variance displays current variance of the OSD from the standard utilization Variance *prometheus.GaugeVec // Pgs displays total number of placement groups in the OSD. // Available in Ceph Jewel version. Pgs *prometheus.GaugeVec // PgUpmapItemsTotal displays the total number of items in the pg-upmap exception table. PgUpmapItemsTotal prometheus.Gauge // CommitLatency displays in seconds how long it takes for an operation to be applied to disk CommitLatency *prometheus.GaugeVec // ApplyLatency displays in seconds how long it takes to get applied to the backing filesystem ApplyLatency *prometheus.GaugeVec // OSDIn displays the In state of the OSD OSDIn *prometheus.GaugeVec // OSDUp displays the Up state of the OSD OSDUp *prometheus.GaugeVec // OSDMetaData displays metadata of an OSD OSDMetadata *prometheus.GaugeVec // OSDFullRatio displays current full_ratio of OSD OSDFullRatio prometheus.Gauge // OSDFullRatio displays current backfillfull_ratio of OSD OSDBackfillFullRatio prometheus.Gauge // OSDNearFullRatio displays current nearfull_ratio of OSD OSDNearFullRatio prometheus.Gauge // OSDFull flags if an OSD is full OSDFull *prometheus.GaugeVec // OSDNearfull flags if an OSD is near full OSDNearFull *prometheus.GaugeVec // OSDBackfillFull flags if an OSD is backfill full OSDBackfillFull *prometheus.GaugeVec // OSDDownDesc displays OSDs present in the cluster in "down" state OSDDownDesc *prometheus.Desc // TotalBytes displays total bytes in all OSDs TotalBytes prometheus.Gauge // TotalUsedBytes displays total used bytes in all OSDs TotalUsedBytes prometheus.Gauge // TotalAvailBytes displays total available bytes in all OSDs TotalAvailBytes prometheus.Gauge // AverageUtil displays average utilization in all OSDs AverageUtil prometheus.Gauge // ScrubbingStateDesc depicts if an OSD is being scrubbed // labeled by OSD ScrubbingStateDesc *prometheus.Desc // PGObjectsRecoveredDesc displays total number of objects recovered in a PG PGObjectsRecoveredDesc *prometheus.Desc // OSDObjectsBackfilled displays average number of objects backfilled in an OSD OSDObjectsBackfilled *prometheus.CounterVec // OldestInactivePG gives us the amount of time that the oldest inactive PG // has been inactive for. This is useful to discern between rolling peering // (such as when issuing a bunch of upmaps or weight changes) and a single PG // stuck peering, for example. OldestInactivePG prometheus.Gauge // contains filtered or unexported fields }
OSDCollector displays statistics about OSD in the Ceph cluster. An important aspect of monitoring OSDs is to ensure that when the cluster is up and running that all OSDs that are in the cluster are up and running, too
func NewOSDCollector ¶
func NewOSDCollector(exporter *Exporter) *OSDCollector
NewOSDCollector creates an instance of the OSDCollector and instantiates the individual metrics that show information about the OSD.
func (*OSDCollector) Collect ¶
func (o *OSDCollector) Collect(ch chan<- prometheus.Metric, version *Version)
Collect sends all the collected metrics to the provided Prometheus channel. It requires the caller to handle synchronization.
func (*OSDCollector) Describe ¶
func (o *OSDCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the descriptors of each OSDCollector related metrics we have defined to the provided Prometheus channel.
type PoolInfoCollector ¶
type PoolInfoCollector struct { // PGNum contains the count of PGs allotted to a particular pool. PGNum *prometheus.GaugeVec // PlacementPGNum contains the count of PGs allotted to a particular pool // and used for placements. PlacementPGNum *prometheus.GaugeVec // MinSize shows minimum number of copies or chunks of an object // that need to be present for active I/O. MinSize *prometheus.GaugeVec // ActualSize shows total copies or chunks of an object that need to be // present for a healthy cluster. ActualSize *prometheus.GaugeVec // QuotaMaxBytes lists maximum amount of bytes of data allowed in a pool. QuotaMaxBytes *prometheus.GaugeVec // QuotaMaxObjects contains maximum amount of RADOS objects allowed in a pool. QuotaMaxObjects *prometheus.GaugeVec // StripeWidth contains width of a RADOS object in a pool. StripeWidth *prometheus.GaugeVec // ExpansionFactor Contains a float >= 1 that defines the EC or replication multiplier of a pool ExpansionFactor *prometheus.GaugeVec // contains filtered or unexported fields }
PoolInfoCollector gives information about each pool that exists in a given ceph cluster.
func NewPoolInfoCollector ¶
func NewPoolInfoCollector(exporter *Exporter) *PoolInfoCollector
NewPoolInfoCollector displays information about each pool in the cluster.
func (*PoolInfoCollector) Collect ¶
func (p *PoolInfoCollector) Collect(ch chan<- prometheus.Metric, version *Version)
Collect extracts the current values of all the metrics and sends them to the prometheus channel.
func (*PoolInfoCollector) Describe ¶
func (p *PoolInfoCollector) Describe(ch chan<- *prometheus.Desc)
Describe fulfills the prometheus.Collector's interface and sends the descriptors of pool's metrics to the given channel.
type PoolStat ¶
type PoolStat struct {
ObjectsUnfound uint64
}
PoolStats contains data for a single pool. We currently only use one field but may add more from co-ceph/rados.PoolStat
type PoolUsageCollector ¶
type PoolUsageCollector struct { // UsedBytes tracks the amount of bytes currently allocated for the pool. This // does not factor in the overcommitment made for individual images. UsedBytes *prometheus.Desc // RawUsedBytes tracks the amount of raw bytes currently used for the pool. This // factors in the replication factor (size) of the pool. RawUsedBytes *prometheus.Desc // MaxAvail tracks the amount of bytes currently free for the pool, // which depends on the replication settings for the pool in question. MaxAvail *prometheus.Desc // PercentUsed is the percentage of raw space available to the pool currently in use PercentUsed *prometheus.Desc // Objects shows the no. of RADOS objects created within the pool. Objects *prometheus.Desc // DirtyObjects shows the no. of RADOS dirty objects in a cache-tier pool, // this doesn't make sense in a regular pool, see: // http://lists.ceph.com/pipermail/ceph-users-ceph.com/2015-April/000557.html DirtyObjects *prometheus.Desc // UnfoundObjects shows the no. of RADOS unfound object within each pool. UnfoundObjects *prometheus.Desc // ReadIO tracks the read IO calls made for the images within each pool. ReadIO *prometheus.Desc // Readbytes tracks the read throughput made for the images within each pool. ReadBytes *prometheus.Desc // WriteIO tracks the write IO calls made for the images within each pool. WriteIO *prometheus.Desc // WriteBytes tracks the write throughput made for the images within each pool. WriteBytes *prometheus.Desc // contains filtered or unexported fields }
PoolUsageCollector displays statistics about each pool in the Ceph cluster.
func NewPoolUsageCollector ¶
func NewPoolUsageCollector(exporter *Exporter) *PoolUsageCollector
NewPoolUsageCollector creates a new instance of PoolUsageCollector and returns its reference.
func (*PoolUsageCollector) Collect ¶
func (p *PoolUsageCollector) Collect(ch chan<- prometheus.Metric, version *Version)
Collect extracts the current values of all the metrics and sends them to the prometheus channel.
func (*PoolUsageCollector) Describe ¶
func (p *PoolUsageCollector) Describe(ch chan<- *prometheus.Desc)
Describe fulfills the prometheus.Collector's interface and sends the descriptors of pool's metrics to the given channel.
type RGWCollector ¶
type RGWCollector struct { // GCActiveTasks reports the number of (expired) RGW GC tasks. GCActiveTasks *prometheus.GaugeVec // GCActiveObjects reports the total number of RGW GC objects contained in active tasks. GCActiveObjects *prometheus.GaugeVec // GCPendingTasks reports the number of RGW GC tasks queued but not yet expired. GCPendingTasks *prometheus.GaugeVec // GCPendingObjects reports the total number of RGW GC objects contained in pending tasks. GCPendingObjects *prometheus.GaugeVec // ActiveReshards reports the number of active RGW bucket reshard operations. ActiveReshards *prometheus.GaugeVec // ActiveBucketReshard reports the state of reshard operation for a particular bucket. ActiveBucketReshard *prometheus.Desc // contains filtered or unexported fields }
RGWCollector collects metrics from the RGW service
func NewRGWCollector ¶
func NewRGWCollector(exporter *Exporter, background bool) *RGWCollector
NewRGWCollector creates an instance of the RGWCollector and instantiates the individual metrics that we can collect from the RGW service
func (*RGWCollector) Collect ¶
func (r *RGWCollector) Collect(ch chan<- prometheus.Metric, version *Version)
Collect sends all the collected metrics to the provided prometheus channel. It requires the caller to handle synchronization.
func (*RGWCollector) Describe ¶
func (r *RGWCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the descriptors of each RGWCollector related metrics we have defined to the provided prometheus channel.
type RbdMirrorStatusCollector ¶
type RbdMirrorStatusCollector struct { // RbdMirrorStatus shows the overall health status of a rbd-mirror. RbdMirrorStatus prometheus.Gauge // RbdMirrorDaemonStatus shows the health status of a rbd-mirror daemons. RbdMirrorDaemonStatus prometheus.Gauge // RbdMirrorImageStatus shows the health status of rbd-mirror images. RbdMirrorImageStatus prometheus.Gauge // contains filtered or unexported fields }
RbdMirrorStatusCollector displays statistics about each pool in the Ceph cluster.
func NewRbdMirrorStatusCollector ¶
func NewRbdMirrorStatusCollector(exporter *Exporter) *RbdMirrorStatusCollector
NewRbdMirrorStatusCollector creates a new RbdMirrorStatusCollector instance
func (*RbdMirrorStatusCollector) Collect ¶
func (c *RbdMirrorStatusCollector) Collect(ch chan<- prometheus.Metric, version *Version)
Collect sends all the collected metrics Prometheus.
func (*RbdMirrorStatusCollector) Describe ¶
func (c *RbdMirrorStatusCollector) Describe(ch chan<- *prometheus.Desc)
Describe provides the metrics descriptions to Prometheus