statsd_exporter

StatsD to Prometheus metrics exporter (by prometheus)

Statsd_exporter Alternatives

Similar projects and alternatives to statsd_exporter

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better statsd_exporter alternative or higher similarity.

statsd_exporter reviews and mentions

Posts with mentions or reviews of statsd_exporter. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-08-08.
  • Help: UDP proxy/relay to multiple destinations
    2 projects | /r/sysadmin | 8 Aug 2022
    It's part of the statsd_exporter.
  • Ask HN: Prometheus vs. StatsD / Telegraf
    5 projects | news.ycombinator.com | 11 Apr 2021
  • Statsd + Prometheus on Grafana Cloud
    1 project | dev.to | 21 Mar 2021
    package metrics import ( "fmt" "strings" "time" "github.com/alexcesaro/statsd" ) // Hybrid metrics type Hybrid struct { Statsd StatsdConfig Client *statsd.Client AttachLabels bool } // StatsdConfig ... type StatsdConfig struct { Host string Prefix string } // Init ... func (m *Hybrid) Init() error { // Set up the statsd client client, err := statsd.New( statsd.Address(m.Statsd.Host), statsd.Prefix(m.Statsd.Prefix), statsd.FlushPeriod(time.Second*1), ) if err != nil { return fmt.Errorf("Hybrid: Could not connect to %s: %s", m.Statsd.Host, err.Error()) } m.Client = client return nil } // Format key with labels func (m *Hybrid) formatKeyWithLabels(key string, labels map[string]string) string { // Do we want to attach labels? if m.AttachLabels == false { return key } // Use librato-style tags // metrim.name#tagName=val,tag2Name=val2:0|c // https://github.com/prometheus/statsd_exporter#tagging-extensions if len(key) == 0 { return key } formattedLabels := []string{} for labelKey, labelVal := range labels { formattedLabels = append(formattedLabels, fmt.Sprintf("%s=%s", labelKey, labelVal)) } joinedFormattedLabels := strings.TrimSpace(strings.Join(formattedLabels, ",")) if joinedFormattedLabels != "" { key = fmt.Sprintf("%s#%s", key, joinedFormattedLabels) } return strings.Trim(key, "#") } // Increment ... func (m *Hybrid) Increment(key string, labels map[string]string) { m.IncrementBy(key, 1, labels) } // IncrementBy ... func (m *Hybrid) IncrementBy(key string, by int, labels map[string]string) { updatedKey := m.formatKeyWithLabels(key, labels) if m.Client != nil { m.Client.Count(updatedKey, by) } } // Gauge ... func (m *Hybrid) Gauge(key string, value int, labels map[string]string) { updatedKey := m.formatKeyWithLabels(key, labels) if m.Client != nil { m.Client.Gauge(updatedKey, value) } }
  • A note from our sponsor - SaaSHub
    www.saashub.com | 26 Apr 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Stats

Basic statsd_exporter repo stats
3
891
7.9
7 days ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com