This module generates suitable metrics for a Prometheus monitoring platform. It answers Prometheus pull requests (HTTP requests to /metrics URL). The module generates metrics based on Kamailio statistics, and also the user can create his own metrics (currently counters, gauges and histograms). The xHTTP_PROM module uses the xHTTP module to handle HTTP requests. Read the documentation of the xHTTP module for more details. NOTE: This module is based on xHTTP_RPC one. IMPORTANT: This module uses private memory to generate HTTP responses, and shared memory to store all the metrics. Remember to increase size of private and shared memory if you use a huge amount of metrics. Prometheus URLs: * https://prometheus.io/ * https://prometheus.io/docs/concepts/data_model/#metric-names-and-la bels * https://prometheus.io/docs/instrumenting/exposition_formats/
| Parámetro | Tipo | Descripción |
|---|---|---|
| xhttp_prom_buf_size | integer | 3.2. xhttp_prom_timeout (integer) 3.3. xhttp_prom_stats (str) 3.4. xhttp_prom_pkg_stats (integer) 3.5. xhttp_prom_uptime_stat (integer) 3.6. xhttp_prom_beginning (str) 3.7. xhttp_prom_metadata_flags ( |
| xhttp_prom_timeout | integer | 3.3. xhttp_prom_stats (str) 3.4. xhttp_prom_pkg_stats (integer) 3.5. xhttp_prom_uptime_stat (integer) 3.6. xhttp_prom_beginning (str) 3.7. xhttp_prom_metadata_flags (integer) 3.8. xhttp_prom_tags (str |
| xhttp_prom_stats | str | 3.4. xhttp_prom_pkg_stats (integer) 3.5. xhttp_prom_uptime_stat (integer) 3.6. xhttp_prom_beginning (str) 3.7. xhttp_prom_metadata_flags (integer) 3.8. xhttp_prom_tags (str) 3.9. prom_counter (str) 3. |
| xhttp_prom_pkg_stats | integer | 3.5. xhttp_prom_uptime_stat (integer) 3.6. xhttp_prom_beginning (str) 3.7. xhttp_prom_metadata_flags (integer) 3.8. xhttp_prom_tags (str) 3.9. prom_counter (str) 3.10. prom_gauge (str) 3.11. prom_hist |
| xhttp_prom_uptime_stat | integer | 3.6. xhttp_prom_beginning (str) 3.7. xhttp_prom_metadata_flags (integer) 3.8. xhttp_prom_tags (str) 3.9. prom_counter (str) 3.10. prom_gauge (str) 3.11. prom_histogram (str) |
| xhttp_prom_beginning | str | 3.7. xhttp_prom_metadata_flags (integer) 3.8. xhttp_prom_tags (str) 3.9. prom_counter (str) 3.10. prom_gauge (str) 3.11. prom_histogram (str) |
| xhttp_prom_metadata_flags | integer | 3.8. xhttp_prom_tags (str) 3.9. prom_counter (str) 3.10. prom_gauge (str) 3.11. prom_histogram (str) |
| xhttp_prom_tags | str | 3.9. prom_counter (str) 3.10. prom_gauge (str) 3.11. prom_histogram (str) |
| prom_counter | str | 3.10. prom_gauge (str) 3.11. prom_histogram (str) |
| prom_gauge | str | 3.11. prom_histogram (str) |
| prom_histogram | str | 3.1. xhttp_prom_buf_size (integer) |
| xhttp_prom_buf_size | integer | Specifies the maximum length of the buffer (in bytes) used to write the metric reply information in order to build the HTML response. |
| xhttp_prom_timeout | integer | Specifies a timeout in minutes. A metric not used during this timeout is automatically deleted. Listing metrics does not count as using them. |
| xhttp_prom_stats | str | Specifies which internal statistics from Kamailio to show. Possible values: * all - Show whole Kamailio statistics * group_name: - Show all statistics for a group * statistic_name - Show a specific st |
| xhttp_prom_pkg_stats | integer | Enable or disable internal Kamailio pkg memory statistics. |
| xhttp_prom_uptime_stat | integer | Enable or disable Kamailio uptime statistic. |
| xhttp_prom_beginning | str | Specifies beginning of string the metrics are build with. |
| xhttp_prom_metadata_flags | integer | Flags to enable Prometheus metadata lines in the output. The flags are defined as a bitmask on an integer value. Bits have the following meaning: * 1 - include TYPE metadata string for user defined me |
| xhttp_prom_tags | str | Specifies additional tags for the metrics. These can be useful for evaluating the metrics afterwards. |
| prom_counter | str | Create a counter metric. |
| prom_gauge | str | Create a gauge metric. |
| prom_histogram | str | Create a histogram metric. |
4.2. prom_gauge_reset(name, l0, l1, l2) 4.3. prom_counter_inc(name, number, l0, l1, l2) 4.4. prom_gauge_inc(name, number, l0, l1, l2) 4.5. prom_gauge_set(name, number, l0, l1, l2) 4.6. prom_histogram_observe(name, number, l0, l1, l2) 4.7. prom_dispat
4.3. prom_counter_inc(name, number, l0, l1, l2) 4.4. prom_gauge_inc(name, number, l0, l1, l2) 4.5. prom_gauge_set(name, number, l0, l1, l2) 4.6. prom_histogram_observe(name, number, l0, l1, l2) 4.7. prom_dispatch() 4.8. prom_check_uri()
4.4. prom_gauge_inc(name, number, l0, l1, l2) 4.5. prom_gauge_set(name, number, l0, l1, l2) 4.6. prom_histogram_observe(name, number, l0, l1, l2) 4.7. prom_dispatch() 4.8. prom_check_uri()
4.5. prom_gauge_set(name, number, l0, l1, l2) 4.6. prom_histogram_observe(name, number, l0, l1, l2) 4.7. prom_dispatch() 4.8. prom_check_uri()
4.6. prom_histogram_observe(name, number, l0, l1, l2) 4.7. prom_dispatch() 4.8. prom_check_uri()
4.7. prom_dispatch() 4.8. prom_check_uri()
4.8. prom_check_uri()
4.1. prom_counter_reset(name, l0, l1, l2)
Get a counter based on its name and labels and reset its value to 0. Name parameter is mandatory. Values of labels are optional (from none up to three). Name in prom_counter_reset has to match same name in prom_counter parameter. Number of labels in
Get a gauge based on its name and labels and reset its value to 0. Name parameter is mandatory. Values of labels are optional (from none up to three). Name in prom_gauge_reset has to match same name in prom_gauge parameter. Number of labels in prom_g
Get a counter identified by its name and labels and increase its value by a number. If counter does not exist it creates the counter, initializes it to zero and adds the number.
Get a gauge identified by its name and labels and increase (or decrease, if amount is negative) its value by a given amount. If gauge does not exist it creates the gauge and assigns the value to it.
; ... # Decrease the value of gg01 by 22.5. # After the update gg01 will have value -10. prom_gauge_inc("gg01", "-22.5"); ...
Get a gauge identified by its name and labels and set its value to a number. If gauge does not exist it creates the gauge and assigns the value to it.
Get a histogram identified by its name and labels and observe a value in it. If histogram does not exist it creates the histogram and accumulate the value in its buckets, counter and sum.
Copyright © 2019 www.sonoc.io