Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ UseSASLHandshake: true, KafkaVersion: sarama.V2_0_0_0.String(), MetadataRefreshInterval: "1m", AllowConcurrent: true, MaxOffsets: 1000, PruneIntervalSeconds: 30, OffsetShowAll: true, TopicWorkers: 100, TopicsFilter: ".*", TopicsExclude: "^$", GroupFilter: ".*", GroupExclude: "^$", }
DefaultConfig holds the default settings for the kafka_lag_exporter integration.
Functions ¶
func New ¶
func New(logger log.Logger, c *Config) (integrations.Integration, error)
New creates a new kafka_exporter integration.
Types ¶
type Config ¶
type Config struct { // The instance label for metrics. Instance string `yaml:"instance,omitempty"` // Address array (host:port) of Kafka server KafkaURIs []string `yaml:"kafka_uris,omitempty"` // Connect using SASL/PLAIN UseSASL bool `yaml:"use_sasl,omitempty"` // Only set this to false if using a non-Kafka SASL proxy UseSASLHandshake bool `yaml:"use_sasl_handshake,omitempty"` // SASL user name SASLUsername string `yaml:"sasl_username,omitempty"` // SASL user password SASLPassword config_util.Secret `yaml:"sasl_password,omitempty"` // The SASL SCRAM SHA algorithm sha256 or sha512 as mechanism SASLMechanism string `yaml:"sasl_mechanism,omitempty"` // Configure the Kerberos client to not use PA_FX_FAST. SASLDisablePAFXFast bool `yaml:"sasl_disable_pafx_fast,omitempty"` // Connect using TLS UseTLS bool `yaml:"use_tls,omitempty"` // Used to verify the hostname on the returned certificates unless tls.insecure-skip-tls-verify is given. The kafka server's name should be given. TlsServerName string `yaml:"tls_server_name,omitempty"` // The optional certificate authority file for TLS client authentication CAFile string `yaml:"ca_file,omitempty"` // The optional certificate file for TLS client authentication CertFile string `yaml:"cert_file,omitempty"` // The optional key file for TLS client authentication KeyFile string `yaml:"key_file,omitempty"` // If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure InsecureSkipVerify bool `yaml:"insecure_skip_verify,omitempty"` // Kafka broker version KafkaVersion string `yaml:"kafka_version,omitempty"` // if you need to use a group from zookeeper UseZooKeeperLag bool `yaml:"use_zookeeper_lag,omitempty"` // Address array (hosts) of zookeeper server. ZookeeperURIs []string `yaml:"zookeeper_uris,omitempty"` // Kafka cluster name ClusterName string `yaml:"kafka_cluster_name,omitempty"` // Metadata refresh interval MetadataRefreshInterval string `yaml:"metadata_refresh_interval,omitempty"` // Service name when using kerberos Auth. ServiceName string `yaml:"gssapi_service_name,omitempty"` // Kerberos config path. KerberosConfigPath string `yaml:"gssapi_kerberos_config_path,omitempty"` // Kerberos realm. Realm string `yaml:"gssapi_realm,omitempty"` // Kerberos keytab file path. KeyTabPath string `yaml:"gssapi_key_tab_path,omitempty"` // Kerberos auth type. Either 'keytabAuth' or 'userAuth'. KerberosAuthType string `yaml:"gssapi_kerberos_auth_type,omitempty"` // Whether show the offset/lag for all consumer group, otherwise, only show connected consumer groups. OffsetShowAll bool `yaml:"offset_show_all,omitempty"` // Number of topic workers. TopicWorkers int `yaml:"topic_workers,omitempty"` // If true, all scrapes will trigger kafka operations otherwise, they will share results. WARN: This should be disabled on large clusters AllowConcurrent bool `yaml:"allow_concurrency,omitempty"` // If true, the broker may auto-create topics that we requested which do not already exist. AllowAutoTopicCreation bool `yaml:"allow_auto_topic_creation,omitempty"` // Maximum number of offsets to store in the interpolation table for a partition MaxOffsets int `yaml:"max_offsets,omitempty"` // No-op (deprecated). Use metadata_refresh_interval instead. PruneIntervalSeconds int `yaml:"prune_interval_seconds,omitempty"` // Regex filter for topics to be monitored TopicsFilter string `yaml:"topics_filter_regex,omitempty"` // Regex that determines which topics to exclude. TopicsExclude string `yaml:"topics_exclude_regex,omitempty"` // Regex filter for consumer groups to be monitored GroupFilter string `yaml:"groups_filter_regex,omitempty"` // Regex that determines which consumer groups to exclude. GroupExclude string `yaml:"groups_exclude_regex,omitempty"` }
Config controls kafka_exporter
func (*Config) InstanceKey ¶
InstanceKey returns the hostname:port of the first Kafka node, if any. If there is not exactly one Kafka node, the user must manually provide their own value for instance key in the common config.
func (*Config) NewIntegration ¶
func (c *Config) NewIntegration(logger log.Logger) (integrations.Integration, error)
NewIntegration creates a new elasticsearch_exporter
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler for Config
Click to show internal directories.
Click to hide internal directories.