Documentation
¶
Overview ¶
package redis_exporter embeds https://github.com/oliver006/redis_exporter
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultConfig holds non-zero default options for the Config when it is // unmarshaled from YAML. DefaultConfig = Config{ Namespace: "redis", ConfigCommand: "CONFIG", ConnectionTimeout: (15 * time.Second), SetClientName: true, } )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enabled bool `yaml:"enabled"` CommonConfig config.Common `yaml:",inline"` IncludeExporterMetrics bool `yaml:"include_exporter_metrics"` // exporter-specific config. // // The exporter binary config differs to this, but these // are the only fields that are relevant to the exporter struct. RedisAddr string `yaml:"redis_addr"` RedisUser string `yaml:"redis_user"` RedisPassword string `yaml:"redis_password"` RedisPasswordFile string `yaml:"redis_password_file"` Namespace string `yaml:"namespace"` ConfigCommand string `yaml:"config_command"` CheckKeys string `yaml:"check_keys"` CheckSingleKeys string `yaml:"check_single_keys"` CheckStreams string `yaml:"check_streams"` CheckSingleStreams string `yaml:"check_single_streams"` CountKeys string `yaml:"count_keys"` ScriptPath string `yaml:"script_path"` ConnectionTimeout time.Duration `yaml:"connection_timeout"` TLSClientKeyFile string `yaml:"tls_client_key_file"` TLSClientCertFile string `yaml:"tls_client_cert_file"` TLSCaCertFile string `yaml:"tls_ca_cert_file"` SetClientName bool `yaml:"set_client_name"` IsTile38 bool `yaml:"is_tile38"` ExportClientList bool `yaml:"export_client_list"` RedisMetricsOnly bool `yaml:"redis_metrics_only"` PingOnConnect bool `yaml:"ping_on_connect"` InclSystemMetrics bool `yaml:"incl_system_metrics"` SkipTLSVerification bool `yaml:"skip_tls_verification"` }
Config controls the redis_exporter integration.
func (Config) GetExporterOptions ¶
GetExporterOptions returns relevant Config properties as a redis_exporter Options struct. The redis_exporter Options struct has no yaml tags, so we marshal the yaml into Config and then create the re.Options from that.
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler for Config
type Integration ¶
type Integration struct {
// contains filtered or unexported fields
}
Integration is the redis_exporter integration. The integration queries a redis instance's INFO and exposes the results as metrics.
func New ¶
func New(log log.Logger, c Config) (*Integration, error)
New creates a new redis_exporter integration.
func (*Integration) CommonConfig ¶
func (i *Integration) CommonConfig() config.Common
CommonConfig satisfies Integration.CommonConfig.
func (*Integration) RegisterRoutes ¶
func (i *Integration) RegisterRoutes(r *mux.Router) error
RegisterRoutes satisfies Integration.RegisterRoutes. The mux.Router provided here is expected to be a subrouter, where all registered paths will be registered within that subroute.
func (*Integration) Run ¶
func (i *Integration) Run(ctx context.Context) error
Run satisfies Integration.Run.
func (*Integration) ScrapeConfigs ¶
func (i *Integration) ScrapeConfigs() []config.ScrapeConfig
ScrapeConfigs satisfies Integration.ScrapeConfigs.