statsd_exporter
django-prometheus
statsd_exporter | django-prometheus | |
---|---|---|
3 | 5 | |
896 | 1,377 | |
0.9% | - | |
7.7 | 7.0 | |
7 days ago | 5 months ago | |
Go | Python | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
statsd_exporter
-
Help: UDP proxy/relay to multiple destinations
It's part of the statsd_exporter.
- Ask HN: Prometheus vs. StatsD / Telegraf
-
Statsd + Prometheus on Grafana Cloud
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) } }
django-prometheus
-
Question: Django Graphene / GQL Monitoring via Prometheus?
We have a Django Graphene app working, and are gather Prometheus telemetry to monitor our end points. We are leveraging the Django Prometheus Middle Ware and are able to get telemetry and view it via Grafana. This all works and is awesome.
-
Ask HN: What SaaS would you recommend to monitor business data of a Django app?
Thank you in advance.
[0] - https://github.com/korfuri/django-prometheus
- Best practices for setting up monitoring for a Dockerized Django app on Ubuntu 20.04?
-
Monitoring Django apps
Prometheus stores data in a custom format and provides it's own metrics SDK's. Uriel Corfa has done the heavy lifting for us by writing an app which hooks into the Django middleware, ORM and cache layer and automatically exposes metrics generalized metrics. All you need to do is to install and configure django-prometheus.
-
Ask HN: Prometheus vs. StatsD / Telegraf
[2] https://github.com/korfuri/django-prometheus/blob/master/doc...
What are some alternatives?
pushgateway - Push acceptor for ephemeral and batch jobs.
celery-exporter - A Prometheus exporter for Celery metrics
windows_exporter - Prometheus exporter for Windows machines
django-health-check - a pluggable app that runs a full check on the deployment, using a number of plugins to check e.g. database, queue server, celery processes, etc.
process-exporter - Prometheus exporter that mines /proc to report on selected processes
haproxy_exporter - Simple server that scrapes HAProxy stats and exports them via HTTP for Prometheus consumption
netbox-plugin-prometheus-sd - Provide Prometheus url_sd compatible API Endpoint with data from Netbox
script_exporter - Prometheus exporter to execute scripts and collect metrics from the output or the exit status.
client_python - Prometheus instrumentation library for Python applications
blackbox_exporter - Blackbox prober exporter