aboutsummaryrefslogtreecommitdiffstats
path: root/src/stats_statsd.c
AgeCommit message (Collapse)AuthorFilesLines
2018-10-24stats_statsd: Send all stat_items as gaugesDaniel Willmann1-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
2018-07-25stats_statsd: sanitize statsd nameAlexander Couzens1-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
2017-11-13Fix/Update copyright notices; Add SPDX annotationHarald Welte1-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
2017-10-16[doc] Add Doxygen API documentation for stats.c and stats_statsd.cHarald Welte1-1/+10
Change-Id: I8e49505f5c19beac90290fdba8821714e8eecd97
2017-06-23doxygen: unify use of \file across the boardNeels Hofmeyr1-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
2017-05-15stats: Disable stats*.c on embedded targetsHarald Welte1-0/+4
Change-Id: I6beb4fcc394ed7d3f8dd7a097b6e998245ecf401
2016-11-11statsd: Fix compiler warning (int32_t vs. int64_t)Harald Welte1-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
2016-10-18stats_statsd: use int64_t instead of int for value and delta.Alexander Couzens1-3/+3
The stats infrastructure use int64_t for values and delta. So the statsd reporter get call with int64_t. Change-Id: I33df86de60007a64fa853d6d3af9b609877a8fc6
2015-12-17stats: Fix compiler warning about losing constHolger Hans Peter Freyther1-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; ^
2015-12-08stat: Explicitly support stat_items without unitJacob Erlbeck1-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
2015-11-26stats: Move statsd related code into a separate fileJacob Erlbeck1-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