Documentation
¶
Index ¶
- Variables
- func InitLogger(config *RabbitExporterConfig) *logrus.Logger
- func RegisterExporter(name string, f func(*http.Client, *RabbitExporterConfig) Exporter)
- func SetLogger(l *logrus.Logger)
- type AlivenessInfo
- type Exporter
- type MetricMap
- type NodeInfo
- type RabbitCapabilitySet
- type RabbitExporterConfig
- type RabbitMQExporter
- type RabbitReply
- type StatsInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //Version of Rabbitmq Exporter is set during build. Version string //Revision of Rabbitmq Exporter is set during build. Revision string //Branch of Rabbitmq Exporter is set during build. Branch string //BuildDate of Rabbitmq Exporter is set during build. BuildDate string )
View Source
var BuildInfo *prometheus.GaugeVec
BuildInfo is a metric with a constant '1' value labeled by version, revision, branch and build date on which the rabbitmq_exporter was built
Functions ¶
func InitLogger ¶
func InitLogger(config *RabbitExporterConfig) *logrus.Logger
func RegisterExporter ¶
func RegisterExporter(name string, f func(*http.Client, *RabbitExporterConfig) Exporter)
RegisterExporter makes an exporter available by the provided name.
Types ¶
type AlivenessInfo ¶
type Exporter ¶
type Exporter interface { Collect(ctx context.Context, ch chan<- prometheus.Metric) error Describe(ch chan<- *prometheus.Desc) }
Exporter interface for prometheus metrics. Collect is fetching the data and therefore can return an error
type NodeInfo ¶
type NodeInfo struct { Node string RabbitmqVersion string ErlangVersion string ClusterName string TotalQueues int }
NodeInfo presents the name and version of fetched rabbitmq
type RabbitCapabilitySet ¶
type RabbitCapabilitySet map[rabbitCapability]bool
func ParseCapabilities ¶
func ParseCapabilities(raw string) RabbitCapabilitySet
type RabbitExporterConfig ¶
type RabbitExporterConfig struct { RabbitURL string `json:"rabbit_url"` RabbitUsername string `json:"rabbit_user"` RabbitPassword string `json:"rabbit_pass"` RabbitConnection string `json:"rabbit_connection"` PublishPort string `json:"publish_port"` PublishAddr string `json:"publish_addr"` OutputFormat string `json:"output_format"` CAFile string `json:"ca_file"` CertFile string `json:"cert_file"` KeyFile string `json:"key_file"` InsecureSkipVerify bool `json:"insecure_skip_verify"` ExcludeMetrics []string `json:"exlude_metrics"` SkipExchanges *regexp.Regexp `json:"-"` IncludeExchanges *regexp.Regexp `json:"-"` SkipQueues *regexp.Regexp `json:"-"` IncludeQueues *regexp.Regexp `json:"-"` SkipVHost *regexp.Regexp `json:"-"` IncludeVHost *regexp.Regexp `json:"-"` IncludeExchangesString string `json:"include_exchanges"` SkipExchangesString string `json:"skip_exchanges"` IncludeQueuesString string `json:"include_queues"` SkipQueuesString string `json:"skip_queues"` SkipVHostString string `json:"skip_vhost"` IncludeVHostString string `json:"include_vhost"` RabbitCapabilitiesString string `json:"rabbit_capabilities"` RabbitCapabilities RabbitCapabilitySet `json:"-"` AlivenessVhost string `json:"aliveness_vhost"` EnabledExporters []string `json:"enabled_exporters"` Timeout int `json:"timeout"` MaxQueues int `json:"max_queues"` }
type RabbitMQExporter ¶
type RabbitMQExporter struct {
// contains filtered or unexported fields
}
func NewExporter ¶
func NewExporter(config *RabbitExporterConfig) *RabbitMQExporter
func (*RabbitMQExporter) Collect ¶
func (e *RabbitMQExporter) Collect(ch chan<- prometheus.Metric)
func (*RabbitMQExporter) Describe ¶
func (e *RabbitMQExporter) Describe(ch chan<- *prometheus.Desc)
func (*RabbitMQExporter) LastScrapeOK ¶
func (e *RabbitMQExporter) LastScrapeOK() bool
type RabbitReply ¶
type RabbitReply interface { // MakeMap makes a flat map from string to float values from a // RabbitMQ reply. Processing happens recursively and nesting // is represented by '.'-separated keys. Entries are added // only for values that can be reasonably converted to float // (numbers and booleans). Failure to parse should result in // an empty result map. MakeMap() MetricMap // MakeStatsInfo parses a list of details about some named // RabbitMQ objects (i.e. list of queues, exchanges, etc.). // Failure to parse should result in an empty result list. MakeStatsInfo([]string) []StatsInfo // GetString returns the string value for the given key // If the key cannot be found the second return is false GetString(key string) (string, bool) }
RabbitReply is an inteface responsible for extracting usable information from RabbitMQ HTTP API replies, independent of the actual transfer format used.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.