Documentation ¶
Overview ¶
Package redis_exporter embeds https://github.com/oliver006/redis_exporter
Index ¶
- Variables
- func New(log log.Logger, c *Config) (integrations.Integration, error)
- type Config
- func (c *Config) CommonConfig() config.Common
- func (c Config) GetExporterOptions() re.Options
- func (c *Config) InstanceKey(agentKey string) (string, error)
- func (c *Config) Name() string
- func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)
- func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
var DefaultConfig = Config{ Namespace: "redis", ConfigCommand: "CONFIG", ConnectionTimeout: 15 * time.Second, SetClientName: true, CheckKeyGroupsBatchSize: 10000, MaxDistinctKeyGroups: 100, }
DefaultConfig holds non-zero default options for the Config when it is unmarshaled from YAML.
Functions ¶
func New ¶
func New(log log.Logger, c *Config) (integrations.Integration, error)
New creates a new redis_exporter integration. The integration queries a redis instance's INFO and exposes the results as metrics.
Types ¶
type Config ¶
type Config struct { Common 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,omitempty"` RedisUser string `yaml:"redis_user,omitempty"` RedisPassword config_util.Secret `yaml:"redis_password,omitempty"` RedisPasswordFile string `yaml:"redis_password_file,omitempty"` Namespace string `yaml:"namespace,omitempty"` ConfigCommand string `yaml:"config_command,omitempty"` CheckKeys string `yaml:"check_keys,omitempty"` CheckKeyGroups string `yaml:"check_key_groups,omitempty"` CheckKeyGroupsBatchSize int64 `yaml:"check_key_groups_batch_size,omitempty"` MaxDistinctKeyGroups int64 `yaml:"max_distinct_key_groups,omitempty"` CheckSingleKeys string `yaml:"check_single_keys,omitempty"` CheckStreams string `yaml:"check_streams,omitempty"` CheckSingleStreams string `yaml:"check_single_streams,omitempty"` CountKeys string `yaml:"count_keys,omitempty"` ScriptPath string `yaml:"script_path,omitempty"` ConnectionTimeout time.Duration `yaml:"connection_timeout,omitempty"` TLSClientKeyFile string `yaml:"tls_client_key_file,omitempty"` TLSClientCertFile string `yaml:"tls_client_cert_file,omitempty"` TLSCaCertFile string `yaml:"tls_ca_cert_file,omitempty"` SetClientName bool `yaml:"set_client_name,omitempty"` IsTile38 bool `yaml:"is_tile38,omitempty"` ExportClientList bool `yaml:"export_client_list,omitempty"` ExportClientPort bool `yaml:"export_client_port,omitempty"` RedisMetricsOnly bool `yaml:"redis_metrics_only,omitempty"` PingOnConnect bool `yaml:"ping_on_connect,omitempty"` InclSystemMetrics bool `yaml:"incl_system_metrics,omitempty"` SkipTLSVerification bool `yaml:"skip_tls_verification,omitempty"` }
Config controls the redis_exporter integration.
func (*Config) CommonConfig ¶
CommonConfig returns the common set of settings shared across all configs for integrations.
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) InstanceKey ¶ added in v0.21.0
InstanceKey returns the addr of the redis server.
func (*Config) NewIntegration ¶ added in v0.10.0
func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)
NewIntegration converts the config into an integration instance.
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler for Config