| 1 |
; |
| 2 |
; res_prometheus Module configuration for Asterisk |
| 3 |
; |
| 4 |
|
| 5 |
; |
| 6 |
; This configuration file is consumed by res_prometheus, which |
| 7 |
; provides the functionality for serving up Asterisk statistics to a |
| 8 |
; Prometheus server. |
| 9 |
; |
| 10 |
; Because Prometheus scrapes statistics from HTTP servers, this module requires |
| 11 |
; Asterisk's built-in HTTP server to be enabled and configured properly. |
| 12 |
; |
| 13 |
; Module Dependencies: |
| 14 |
; only if Asterisk is build with pjproject bundled (default) |
| 15 |
; * res_pjsip.so |
| 16 |
; * res_pjsip_outbound_registration.so |
| 17 |
|
| 18 |
; Settings that affect all statistic generation |
| 19 |
[general] |
| 20 |
enabled = no ; Enable/disable all statistic generation. |
| 21 |
; Default is "no", as enabling this without |
| 22 |
; proper securing of your Asterisk system |
| 23 |
; may result in external systems learning |
| 24 |
; a lot about your Asterisk system. |
| 25 |
; Note #1: If Asterisk's HTTP server is |
| 26 |
; disabled, this setting won't matter. |
| 27 |
; Note #2: It is highly recommended that you |
| 28 |
; set up Basic Auth and configure your |
| 29 |
; Prometheus server to authenticate with |
| 30 |
; Asterisk. Failing to do so will make it easy |
| 31 |
; for external systems to scrape your Asterisk |
| 32 |
; instance and learn things about your system |
| 33 |
; that you may not want them to. While the |
| 34 |
; metrics exposed by this module do not |
| 35 |
; necessarily contain information that can |
| 36 |
; lead to an exploit, an ounce of prevention |
| 37 |
; goes a long way. Particularly for those out |
| 38 |
; there who are exceedingly lax in updating |
| 39 |
; your Asterisk system. You are updating on a |
| 40 |
; regular cadence, aren't you??? |
| 41 |
core_metrics_enabled = yes ; Enable/disable core metrics. Core metrics |
| 42 |
; include various properties such as the |
| 43 |
; version of Asterisk, uptime, last reload |
| 44 |
; time, and the overall time it takes to |
| 45 |
; scrape metrics. Default is "yes" |
| 46 |
uri = metrics ; The HTTP route to expose metrics on. |
| 47 |
; Default is "metrics". |
| 48 |
|
| 49 |
; auth_username = Asterisk ; If provided, Basic Auth will be enabled on |
| 50 |
; the metrics route. Failure to provide both |
| 51 |
; auth_username and auth_password will result |
| 52 |
; in a module load error. |
| 53 |
; auth_password = ; The password to use for Basic Auth. Note |
| 54 |
; that I'm leaving this blank to prevent |
| 55 |
; you from merely uncommenting the line and |
| 56 |
; running with a config provided password. |
| 57 |
; Because yes, people actually *do* that. |
| 58 |
; I mean, if you're going to do that, just |
| 59 |
; run unsecured. Fake security is usually |
| 60 |
; worse than no security. |
| 61 |
; auth_realm = ; Realm to use for authentication. Defaults |
| 62 |
; to Asterisk Prometheus Metrics |