summaryrefslogtreecommitdiff
path: root/res/res_statsd.c
AgeCommit message (Collapse)Author
2018-01-29Merge "Remove redundant module checks and references."Jenkins2
2018-01-24Remove redundant module checks and references.Corey Farrell
This removes references that are no longer needed due to automatic references created by module dependencies. In addition this removes most calls to ast_module_check as they were checking modules which are listed as dependencies. Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
2018-01-22Add missing OPTIONAL_API and ARI dependences.Corey Farrell
I've audited all modules that include any header which includes asterisk/optional_api.h. All modules which use OPTIONAL_API now declare those dependencies in AST_MODULE_INFO using requires or optional_modules as appropriate. In addition ARI dependency declarations have been reworked. Instead of declaring additional required modules in res/ari/resource_*.c we now add them to an optional array "requiresModules" in api-docs for each module. This allows the AST_MODULE_INFO dependencies to include those missing modules. Change-Id: Ia0c70571f5566784f63605e78e1ceccb4f79c606
2017-12-15aco: Minimize use of regex.Corey Farrell
Remove nearly all use of regex from ACO users. Still remaining: * app_confbridge has a legitamate use of option name regex. * ast_sorcery_object_fields_register is implemented with regex, all callers use simple prefix based regex. I haven't decided the best way to fix this in both 13/15 and master. Change-Id: Ib5ed478218d8a661ace4d2eaaea98b59a897974b
2017-11-01Prevent unload of modules which implement an Optional API.Corey Farrell
Once an Optional API module is loaded it should stay loaded. Unloading an optional API module runs the risk of a crash if something else is using it. This patch causes all optional API providers to tell the module loader not to unload except at shutdown. ASTERISK-27389 Change-Id: Ia07786fe655681aec49cc8d3d96e06483b11f5e6
2017-04-12modules: change module LOAD_FAILUREs to LOAD_DECLINESGeorge Joseph
In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed to AST_MODULE_LOAD_DECLINE. This prevents asterisk from exiting if a module can't be loaded. If the user wishes to retain the FAILURE behavior for a specific module, they can use the "require" or "preload-require" keyword in modules.conf. A new API was added to logger: ast_is_logger_initialized(). This allows asterisk.c/check_init() to print to the error log once the logger subsystem is ready instead of just to stdout. If something does fail before the logger is initialized, we now print to stderr instead of stdout. Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
2016-10-27Remove ASTERISK_REGISTER_FILE.Corey Farrell
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes all traces of it. Previously exported symbols removed: * __ast_register_file * __ast_unregister_file * ast_complete_source_filename This also removes the mtx_prof static variable that was declared when MTX_PROFILE was enabled. This variable was only used in lock.c so it is now initialized in that file only. ASTERISK-26480 #close Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2015-11-22res_statsd: Add functions that support variable argumentsMatt Jordan
Often, the metric names of statistics we are generating for StatsD have some dynamic component to them. This can be the name of a particular resource, or some internal status label in Asterisk. With the current set of functions, callers of the statsd API must first build the metric name themselves, then pass this to the API functions. This results in a large amount of boilerplate code and usage of either fixed length static buffers or dynamic memory allocation, neither of which is desireable. This patch adds two new functions to the StatsD API that support a printf style format specifier for constructing the metric name. A dynamic string, allocated in threadstorage, is used to build the metric name. This eases the burden on users of the StatsD API. Change-Id: If533c72d1afa26d807508ea48b4d8c7b32f414ea
2015-11-04StatsD: Add res_statsd compatibilitytcambron
Added a new api to res_statsd.c to allow it to receive a character pointer for the value argument. This allows for a '+' and a '-' to easily be sent with the value. ASTERISK-25419 Reported By: Ashley Sanders Change-Id: Id6bb53600943d27347d2bcae26c0bd5643567611
2015-05-13AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro.Rodrigo Ramírez Norambuena
Change-Id: Icf88f9f861c6b2a16e5f626ff25795218a6f2723
2015-04-13git migration: Refactor the ASTERISK_FILE_VERSION macroMatt Jordan
Git does not support the ability to replace a token with a version string during check-in. While it does have support for replacing a token on clone, this is somewhat sub-optimal: the token is replaced with the object hash, which is not particularly easy for human consumption. What's more, in practice, the source file version was often not terribly useful. Generally, when triaging bugs, the overall version of Asterisk is far more useful than an individual SVN version of a file. As a result, this patch removes Asterisk's support for showing source file versions. Specifically, it does the following: * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and remove passing the version in with the macro. Other facilities than 'core show file version' make use of the file names, such as setting a debug level only on a specific file. As such, the act of registering source files with the Asterisk core still has use. The macro rename now reflects the new macro purpose. * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Remove the "core show file version" CLI command. Without the file version, it is no longer useful. - Remove the ast_file_version_find function. The file version is no longer tracked. - Rename ast_register_file_version/ast_unregister_file_version to ast_register_file/ast_unregister_file, respectively. * main/manager: Remove value from the Version key of the ModuleCheck Action. The actual key itself has not been removed, as doing so would absolutely constitute a backwards incompatible change. However, since the file version is no longer tracked, there is no need to attempt to include it in the Version key. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action - Removal of the "core show file version" CLI command Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2014-07-25Add module support level to ast_module_info structure. Print it in CLI ↵Mark Michelson
"module show" . ASTERISK-23919 #close Reported by Malcolm Davenport Review: https://reviewboard.asterisk.org/r/3802 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-27Rename everything Stasis-HTTP to ARIKinsey Moore
This renames all files and API calls from several variants of Stasis-HTTP to ARI including: * Stasis-HTTP -> ARI * STASIS_HTTP -> ARI * stasis_http -> ari (ast_ari for global symbols, file names as well) * stasis http -> ARI Review: https://reviewboard.asterisk.org/r/2706/ (closes issue ASTERISK-22136) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24Fix menuselect display for stasis modules.Richard Mudgett
The menuselect parser is very simple. It looks for AST_MODULE_INFO and uses any quoted string on that line as the module summary display. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-26Example of how to use the Stasis message busDavid M. Lee
In order to get people familiar with the Stasis message bus, it would be useful to have something of a tutorial. Since I'm not clever enough to think of some cool integration we could do with Twitter, I settled for something that might actually be useful. This patch adds a res_statsd.so module, which implements a basic statsd[1] client. Statsd is a very simple statistics gathering server, which can publish its results to a backend graphing engine, like Graphite[2]. There are several different Statsd server implementations[3], so you can pick what works best for your environment. The actual example of how to use the Stasis message bus is in res_chan_stats.so. This module demonstrates how to use subscriptions and the message router by monitoring messages and posting channels stats to the statsd server. A wiki page walking through res_chan_stats.so is forthcoming. [1]: https://github.com/etsy/statsd/ [2]: http://graphite.readthedocs.org/en/latest/ [3]: http://joemiller.me/2011/09/21/list-of-statsd-server-implementations/ Review: https://reviewboard.asterisk.org/r/2460/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386624 65c4cc65-6c06-0410-ace0-fbb531ad65f3