mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	This patch adds basic Asterisk channel statistics to the res_prometheus module. This includes: * asterisk_calls_sum: A running sum of the total number of processed calls * asterisk_calls_count: The current number of calls * asterisk_channels_count: The current number of channels * asterisk_channels_state: The state of any particular channel * asterisk_channels_duration_seconds: How long a channel has existed, in seconds In all cases, enough information is provided with each channel metric to determine a unique instance of Asterisk that provided the data, as well as the name, type, unique ID, and - if present - linked ID of each channel. ASTERISK-28403 Change-Id: I0db306ec94205d4f58d1e7fbabfe04b185869f59
		
			
				
	
	
		
			59 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| ;
 | |
| ; res_prometheus Module configuration for Asterisk
 | |
| ;
 | |
| 
 | |
| ;
 | |
| ; This configuration file is consumed by res_prometheus, which
 | |
| ; provides the functionality for serving up Asterisk statistics to a
 | |
| ; Prometheus server.
 | |
| ;
 | |
| ; Because Prometheus scrapes statistics from HTTP servers, this module requires
 | |
| ; Asterisk's built-in HTTP server to be enabled and configured properly.
 | |
| ;
 | |
| 
 | |
| ; Settings that affect all statistic generation
 | |
| [general]
 | |
| enabled = no                      ; Enable/disable all statistic generation.
 | |
|                                   ; Default is "no", as enabling this without
 | |
|                                   ; proper securing of your Asterisk system
 | |
|                                   ; may result in external systems learning
 | |
|                                   ; a lot about your Asterisk system.
 | |
|                                   ; Note #1: If Asterisk's HTTP server is
 | |
|                                   ; disabled, this setting won't matter.
 | |
|                                   ; Note #2: It is highly recommended that you
 | |
|                                   ; set up Basic Auth and configure your
 | |
|                                   ; Prometheus server to authenticate with
 | |
|                                   ; Asterisk. Failing to do so will make it easy
 | |
|                                   ; for external systems to scrape your Asterisk
 | |
|                                   ; instance and learn things about your system
 | |
|                                   ; that you may not want them to. While the
 | |
|                                   ; metrics exposed by this module do not
 | |
|                                   ; necessarily contain information that can
 | |
|                                   ; lead to an exploit, an ounce of prevention
 | |
|                                   ; goes a long way. Particularly for those out
 | |
|                                   ; there who are exceedingly lax in updating
 | |
|                                   ; your Asterisk system. You are updating on a
 | |
|                                   ; regular cadence, aren't you???
 | |
| core_metrics_enabled = yes        ; Enable/disable core metrics. Core metrics
 | |
|                                   ; include various properties such as the
 | |
|                                   ; version of Asterisk, uptime, last reload
 | |
|                                   ; time, and the overall time it takes to
 | |
|                                   ; scrape metrics. Default is "yes"
 | |
| uri = metrics                     ; The HTTP route to expose metrics on.
 | |
|                                   ; Default is "metrics".
 | |
| 
 | |
| ; auth_username = Asterisk        ; If provided, Basic Auth will be enabled on
 | |
|                                   ; the metrics route. Failure to provide both
 | |
|                                   ; auth_username and auth_password will result
 | |
|                                   ; in a module load error.
 | |
| ; auth_password =                 ; The password to use for Basic Auth. Note
 | |
|                                   ; that I'm leaving this blank to prevent
 | |
|                                   ; you from merely uncommenting the line and
 | |
|                                   ; running with a config provided password.
 | |
|                                   ; Because yes, people actually *do* that.
 | |
|                                   ; I mean, if you're going to do that, just
 | |
|                                   ; run unsecured. Fake security is usually
 | |
|                                   ; worse than no security.
 | |
| ; auth_realm =                    ; Realm to use for authentication. Defaults
 | |
|                                   ; to Asterisk Prometheus Metrics
 |