Documentation ¶
Overview ¶
Package command starts an http server and displays the collected metrics at "/metrics" endpoint. It collects metrics from collector.go You have to instantiate NewExporter by calling collector.NewExporter method and pass the Jiva volume controller IP.
Index ¶
- func AddCASTypeFlag(cmd *cobra.Command, value *string)
- func AddControllerAddressFlag(cmd *cobra.Command, value *string)
- func AddListenAddressFlag(cmd *cobra.Command, value *string)
- func AddMetricsPathFlag(cmd *cobra.Command, value *string)
- func NewCmdVolumeExporter() (*cobra.Command, error)
- func Run(cmd *cobra.Command, options *VolumeExporterOptions) error
- type VolumeExporterOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCASTypeFlag ¶
AddCASTypeFlag is used to create flag to pass the storage engine name
func AddControllerAddressFlag ¶
AddControllerAddressFlag is used to create flag to pass the Jiva volume controllers IP.
func AddListenAddressFlag ¶
AddListenAddressFlag is used to create flag to pass the listen address of exporter.
func AddMetricsPathFlag ¶
AddMetricsPathFlag is used to create flag to pass the listen path where volume metrics are exposed.
func NewCmdVolumeExporter ¶
NewCmdVolumeExporter is used to create command monitoring and it initialize monitoring flags also.
Types ¶
type VolumeExporterOptions ¶
type VolumeExporterOptions struct { ListenAddress string MetricsPath string ControllerAddress string CASType string }
VolumeExporterOptions is used to create flags for the monitoring command
func (*VolumeExporterOptions) RegisterCstor ¶
func (o *VolumeExporterOptions) RegisterCstor()
RegisterCstor initiates the connection with the cstor and register the exporter with Prometheus for collecting the metrics.This doesn't returns error because that case is handled in InitiateConnection().
func (*VolumeExporterOptions) RegisterJiva ¶
func (o *VolumeExporterOptions) RegisterJiva() error
RegisterJiva parses the jiva controller URL and initialises an instance of Jiva.This returns err if the URL is not correct.
func (*VolumeExporterOptions) RegisterPool ¶
func (o *VolumeExporterOptions) RegisterPool()
RegisterPool registers pool collector which collects pool level metrics
func (*VolumeExporterOptions) StartMayaExporter ¶
func (options *VolumeExporterOptions) StartMayaExporter() error
StartMayaExporter starts an HTTP server that exposes the metrics on <clusterIP>:9500/metrics endpoint and for getting the metrics in json the "type=json" action can be used. e.g <clusterIP>:9500/metrics/?type=json