Commit graph

38 commits

Author SHA1 Message Date
Matthias Rampke d9db83b9be
Merge pull request #106 from prometheus/mr/rework-sample-counters
Break out the telemetry during sample processing
2017-11-15 09:42:46 +01:00
Brian Akins e58bf8e1ca Set name in mapping, rather than from special label with key 'name' 2017-11-13 07:23:14 -05:00
Matthias Rampke cdf79ba2f9 Break out the telemetry during sample processing
The "packets" metric had heavily overloaded meaning for different
"outcomes", and would often be incremented multiple times, sometimes
even with a single (per-line) increment in one outcome corresponding to
multiple increments in another.

This removes the broken metric, and replaces it with separate total and
error counters for each level of processing. This allows monitoring the
network traffic handled separately from the samples incurred by it.
2017-11-10 19:23:54 +00:00
Dave Rawks ab2a88c06f Allow help text to be customized (#87)
* Updated mappings to accept custom help text in YAML config
* Updated exporter to display configured help messages
* Update README to reflect aditional configurability
* Removed inaccurate comment

* Removed some cruft from a rebase
2017-10-04 18:11:58 +02:00
Dave Rawks 0478c40ab0 Removes -statsd.add-suffix option flag
* Remove option flag
* Update NewExporter call signature to not take suffix boolean
* Update tests to reflect new behavior and signature
* Update documentation to reflect option flag removal
2017-09-28 11:30:17 -07:00
Tobias Schmidt 7e11f326ae Merge pull request #92 from drawks/log_levels
Resolves #81 - Reduce log levels
2017-08-26 12:25:26 +02:00
Dave Rawks e493a9c766 Fixup per PR review:
* Added internal metric to track `illegal_negative_counter` events
2017-08-15 09:03:13 -07:00
Dave Rawks 42e41f1a7e Resolves #81 - Reduce log levels
* Reduced all `log.Error*` events to `log.Debug*` in `exporter.go` where
  an existing internal metric tracks the event.
2017-08-14 16:04:57 -07:00
Dave Rawks e37bee9bf2 Resolves #88 - histograms use wrong units 2017-08-14 11:23:14 -07:00
Julius Volz aeab2905ad Merge pull request #66 from bakins/extended-config
Allow histograms for timer metrics
2017-08-03 17:25:30 +02:00
jwfang 07543ac557 Add TCP StatsD listener support (#71)
* add TCP StatsD listener support

* add listen-tcp flag to control UDP/TCP mode on same port

* statsdListenUDP/statsdListenTCP as string, and alias listen-address to listen-udp

* add stats for tcp error/line_too_long

* add test for TCP listener
2017-08-01 12:21:00 +02:00
Brian Akins 2643f1550f cleanup debug statements 2017-07-26 18:40:56 -04:00
Brian Akins b467a537d5 Validate timer type while reading config 2017-07-26 14:50:29 -04:00
Brian Akins 74975b8411 merge with upstream master 2017-07-26 14:03:08 -04:00
Thomas Jackson bbd5227a1c Add metric for total number of conflicting events 2017-07-18 08:58:40 -07:00
Thomas Jackson c1791d7ecb Ensure we log errors every time there is a problem
Move addition of metric to "Elements" until after a successful registry
with prometheus, otherwise we'll continue to increment a metric which
isn't registered
2017-07-18 08:58:40 -07:00
Thomas Jackson d9aa6e2867 Don't crash on conflicting metric names
This patch simply moves the error message from a log.Fatalf() to a
log.Errorf() to continue on.

Fixes #63
2017-07-18 08:58:40 -07:00
Thomas Jackson 22520f4c7b Move value check before metric get
If someone is emitting negative counters we shouldn't even register the
metric for them
2017-07-18 08:58:40 -07:00
Andreas Andersen b5dfc9c9ce Added support for sampling factor on timing events 2017-05-15 15:57:31 +02:00
Brian Akins 1488f0f902 Allow overriding default timing type 2017-03-13 06:32:58 -04:00
Brian Akins 3048412df6 Add YAML config file and ability to set histograms 2017-03-12 21:11:05 -04:00
Justin Reid 9cd4b974e4 consensed if/else statement 2017-03-09 17:39:20 -07:00
Justin Reid 3efcef6229 Simplified inc/dec logic based on PR feedback.
There is no need to add the string to all event types as only Gauge
is compatible with inc/dec functionality.  Removed valueStr from all
events and added a simple boolean to the Gauge event instead
2017-03-09 17:35:29 -07:00
Justin Reid 7fc8727306 Added increment/decrement support to Gauges
Now passing the value as a string (with operation prefix) through to build event so that Listen() can modify the gauge metric appropriately
2017-03-09 15:50:06 -07:00
Ilya Margolin 1fbc392800 Remove unintended changes 2016-07-21 17:55:47 +02:00
Ilya Margolin bb4e42068f Skip metrics with invalid utf8 2016-07-20 20:27:23 +02:00
David Haguenauer 56f65c4870 Don't panic on empty metric names or components
* Don't panic on empty metric names
* Don't panic on empty metric components
* Test tolerance the above kinds of broken StatsD lines
2016-05-19 12:43:35 -04:00
Johannes 'fish' Ziemke 03fde8f3ba Use common/version and common/log packages 2016-05-04 23:12:18 +02:00
Johannes 'fish' Ziemke 8e43fc2654 Merge pull request #37 from prometheus/fish/remove-auto-suffixes
Make metric suffixes optional, expose unmapped events
2016-05-03 09:46:59 -07:00
Tobias Schmidt ba9c37eb20 Merge pull request #40 from Jimdo/dogstats-extensions-squashed
Dogstats extensions squashed
2016-05-03 12:42:38 -04:00
Johannes 'fish' Ziemke 3d0ccb9ed5 Count events for which no mapping was found 2016-05-03 18:39:57 +02:00
Ilya Margolin 0b792e0be6 DogStatsD: review changes 2016-05-03 18:28:33 +02:00
Daniel Bonkowski 8f36baf045 sanitize tag keys
- add tests for edge cases
 - fix typo
2016-05-03 18:27:42 +02:00
Johannes 'fish' Ziemke f031e30721 Add flag to disable metric type suffixes 2016-05-03 01:16:34 +02:00
Julius Volz c9baaf5ba1 Increase receivable UDP datagram size to 65535 bytes.
Fixes https://github.com/prometheus/statsd_exporter/issues/35
2016-04-29 17:39:55 +02:00
Jonathon Klobucar 494cc38bf8 Don't panic when negative number counter is submitted.
Instead now we will send a warning message to the logs
and continue on with our day.

Also a guard has been added when we detect a channel has been
closed and the `Exporter.Listen` function will return out of
its loop vs always running. When a channel is closed there will
be no more data to consume, so this seems correct. It also allows
for a test to be written for the panic.
2016-04-01 10:53:20 -07:00
Peter Woodman ab7c27ee77 Support datadog extensions to statsd datagrams
Datadog's format extensions allow attaching labels and tags to statsd
metrics, and are documented at
http://docs.datadoghq.com/guides/dogstatsd/#datagram-format

Additionally changes compare method in tests to reflect.DeepEqual, as
the tag maps don't sort deterministically, corrects an inversion in
displaying test failure cases, and treats an invalid sample value as 1
instead of throwing out the sample.
2016-03-04 16:22:34 +01:00
Mac Browning ea7341a6c4 rename bridge -> exporter 2015-10-09 20:34:28 -04:00
Renamed from bridge.go (Browse further)