Documentation ¶
Index ¶
- func GetConfigForClientFunc(certFile, keyFile, caCertFile string) func(*tls.ClientHelloInfo) (*tls.Config, error)
- func GetServerCertificateFunc(certFile, keyFile string) func(*tls.ClientHelloInfo) (*tls.Certificate, error)
- func LoadCAFile(caFile string) (*x509.CertPool, error)
- func LoadKeyPair(certFile, keyFile string) (*tls.Certificate, error)
- func LoadPwdFile(passwordFile string) (map[string]string, error)
- type BuildInfo
- type ClientInfo
- type Exporter
- func (e *Exporter) Collect(ch chan<- prometheus.Metric)
- func (e *Exporter) CreateClientTLSConfig() (*tls.Config, error)
- func (e *Exporter) CreateServerTLSConfig(certFile, keyFile, caCertFile, minVersionString string) (*tls.Config, error)
- func (e *Exporter) Describe(ch chan<- *prometheus.Desc)
- func (e *Exporter) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigForClientFunc ¶ added in v1.33.0
func GetConfigForClientFunc(certFile, keyFile, caCertFile string) func(*tls.ClientHelloInfo) (*tls.Config, error)
GetConfigForClientFunc returns a function for tls.Config.GetConfigForClient
func GetServerCertificateFunc ¶ added in v1.24.0
func GetServerCertificateFunc(certFile, keyFile string) func(*tls.ClientHelloInfo) (*tls.Certificate, error)
GetServerCertificateFunc returns a function for tls.Config.GetCertificate
func LoadCAFile ¶ added in v1.33.0
LoadCAFile reads and parses CA certificates from a file into a pool. The file must contain PEM encoded data.
func LoadKeyPair ¶ added in v1.24.0
func LoadKeyPair(certFile, keyFile string) (*tls.Certificate, error)
LoadKeyPair reads and parses a public/private key pair from a pair of files. The files must contain PEM encoded data.
Types ¶
type ClientInfo ¶ added in v1.49.0
type ClientInfo struct { Name, User, CreatedAt, IdleSince, Flags, Db, OMem, Cmd, Host, Port, Resp string }
type Exporter ¶
Exporter implements the prometheus.Exporter interface, and exports Redis metrics.
func NewRedisExporter ¶
NewRedisExporter returns a new exporter of Redis metrics.
func (*Exporter) Collect ¶
func (e *Exporter) Collect(ch chan<- prometheus.Metric)
Collect fetches new metrics from the RedisHost and updates the appropriate metrics.
func (*Exporter) CreateClientTLSConfig ¶ added in v1.24.0
CreateClientTLSConfig verifies configured files and return a prepared tls.Config
func (*Exporter) CreateServerTLSConfig ¶ added in v1.33.0
func (e *Exporter) CreateServerTLSConfig(certFile, keyFile, caCertFile, minVersionString string) (*tls.Config, error)
CreateServerTLSConfig verifies configuration and return a prepared tls.Config
func (*Exporter) Describe ¶
func (e *Exporter) Describe(ch chan<- *prometheus.Desc)
Describe outputs Redis metric descriptions.
type Options ¶ added in v1.13.0
type Options struct { User string Password string Namespace string PasswordMap map[string]string ConfigCommandName string CheckKeys string CheckSingleKeys string CheckStreams string CheckSingleStreams string CheckKeysBatchSize int64 CheckKeyGroups string MaxDistinctKeyGroups int64 CountKeys string LuaScript map[string][]byte ClientCertFile string ClientKeyFile string CaCertFile string InclConfigMetrics bool DisableExportingKeyValues bool RedactConfigMetrics bool InclSystemMetrics bool SkipTLSVerification bool SetClientName bool IsTile38 bool IsCluster bool ExportClientList bool ExportClientsInclPort bool ConnectionTimeouts time.Duration MetricsPath string RedisMetricsOnly bool PingOnConnect bool RedisPwdFile string Registry *prometheus.Registry BuildInfo BuildInfo }