summaryrefslogtreecommitdiffstats
path: root/src/stats_statsd.c
Commit message (Collapse)AuthorAgeFilesLines
* stats_statsd: Send all stat_items as gaugesDaniel Willmann2018-10-241-11/+8
| | | | | | | | | | | | | When sending a statsd metric we need to specify a type which can be a "g"auge, "c"ounter, "t"imer, "h"istogram, and "m"eter. We used to just pass the stat_item unit into this field, but that is the unit of the metric (Seconds for a timer, % for utilization, ...). Change the type field so stat_items are sent as "g"auges. Note that negative values don't seem to be supported by statsd. Change-Id: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
* stats_statsd: sanitize statsd nameAlexander Couzens2018-07-251-1/+22
| | | | | | | | The statsd protocol use ':' as seperator between name and value. It's not allowed to use the seperator in a name. Replace ':' with '.' before sending the packet to the statsd server. Change-Id: Ib46d08481e8ca04afd97cb9ae241e4e39c91ad66
* Fix/Update copyright notices; Add SPDX annotationHarald Welte2017-11-131-3/+3
| | | | | | | | Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
* [doc] Add Doxygen API documentation for stats.c and stats_statsd.cHarald Welte2017-10-161-1/+10
| | | | Change-Id: I8e49505f5c19beac90290fdba8821714e8eecd97
* doxygen: unify use of \file across the boardNeels Hofmeyr2017-06-231-0/+1
| | | | | | | | | | | | | | | | | Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
* stats: Disable stats*.c on embedded targetsHarald Welte2017-05-151-0/+4
| | | | Change-Id: I6beb4fcc394ed7d3f8dd7a097b6e998245ecf401
* statsd: Fix compiler warning (int32_t vs. int64_t)Harald Welte2016-11-111-0/+1
| | | | | | | | | Fixes the following compiler warning: stats_statsd.c: In function ‘osmo_stats_reporter_create_statsd’: stats_statsd.c:54:18: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] srep->send_item = osmo_stats_reporter_statsd_send_item; Change-Id: Id36914906e0982f6ac092a311210727de66b343a
* stats_statsd: use int64_t instead of int for value and delta.Alexander Couzens2016-10-181-3/+3
| | | | | | | The stats infrastructure use int64_t for values and delta. So the statsd reporter get call with int64_t. Change-Id: I33df86de60007a64fa853d6d3af9b609877a8fc6
* stats: Fix compiler warning about losing constHolger Hans Peter Freyther2015-12-171-1/+1
| | | | | | | stats_statsd.c: In function ‘osmo_stats_reporter_statsd_send_item’: stats_statsd.c:154:15: warning: initialization discards ‘const’ qualifier from pointer target type char *unit = desc->unit; ^
* stat: Explicitly support stat_items without unitJacob Erlbeck2015-12-081-1/+11
| | | | | | | Add OSMO_STAT_ITEM_NO_UNIT for stat items without an unit. The statsd reporter uses gauges ("g") to report them. Sponsored-by: On-Waves ehf
* stats: Move statsd related code into a separate fileJacob Erlbeck2015-11-261-0/+158
This commit moves the stats specific code parts into stats_statsd.c while keeping the generic parts in stats.c. The code in stats.c no longer contains references to statsd symbols. Note that the VTY code still needs to know about every stats reporter backend. Sponsored-by: On-Waves ehf