|
| 1 | + |
| 2 | + |
| 3 | +# Module prometheus_vm_dist_collector # |
| 4 | +* [Description](#description) |
| 5 | + |
| 6 | +Collects information about the sockets and processes involved |
| 7 | +in the Erlang distribution mechanism. |
| 8 | + |
| 9 | +__Behaviours:__ [`prometheus_collector`](prometheus_collector.md). |
| 10 | + |
| 11 | +<a name="description"></a> |
| 12 | + |
| 13 | +## Description ## |
| 14 | + |
| 15 | +All metrics include a label 'peer' that indicates which |
| 16 | +distributed connection the metric is about. |
| 17 | + |
| 18 | + |
| 19 | +### <a name="Exported_metrics">Exported metrics</a> ### |
| 20 | + |
| 21 | +Metrics pertaining to processes may apply to three different types |
| 22 | +of proccesses depending on the distribution transport: |
| 23 | +`type="dist"`, `type="tls_connection"` or `type="tls_sender"`. |
| 24 | + |
| 25 | +* `erlang_vm_dist_recv_bytes`<br /> |
| 26 | +Type: gauge.<br /> |
| 27 | +Number of bytes received by the socket. |
| 28 | + |
| 29 | +* `erlang_vm_dist_recv_cnt`<br /> |
| 30 | +Type: gauge.<br /> |
| 31 | +Number of packets received by the socket. |
| 32 | + |
| 33 | +* `erlang_vm_dist_recv_max_bytes`<br /> |
| 34 | +Type: gauge.<br /> |
| 35 | +Size of the largest packet, in bytes, received by the socket. |
| 36 | + |
| 37 | +* `erlang_vm_dist_recv_avg_bytes`<br /> |
| 38 | +Type: gauge.<br /> |
| 39 | +Average size of packets, in bytes, received by the socket. |
| 40 | + |
| 41 | +* `erlang_vm_dist_recv_dvi_bytes`<br /> |
| 42 | +Type: gauge.<br /> |
| 43 | +Average packet size deviation, in bytes, received by the socket. |
| 44 | + |
| 45 | +* `erlang_vm_dist_send_bytes`<br /> |
| 46 | +Type: gauge.<br /> |
| 47 | +Number of bytes sent from the socket. |
| 48 | + |
| 49 | +* `erlang_vm_dist_send_cnt`<br /> |
| 50 | +Type: gauge.<br /> |
| 51 | +Number of packets sent from the socket. |
| 52 | + |
| 53 | +* `erlang_vm_dist_send_max_bytes`<br /> |
| 54 | +Type: gauge.<br /> |
| 55 | +Size of the largest packet, in bytes, sent from the socket. |
| 56 | + |
| 57 | +* `erlang_vm_dist_send_avg_bytes`<br /> |
| 58 | +Type: gauge.<br /> |
| 59 | +Average size of packets, in bytes, sent from the socket. |
| 60 | + |
| 61 | +* `erlang_vm_dist_send_pend_bytes`<br /> |
| 62 | +Type: gauge.<br /> |
| 63 | +Number of bytes waiting to be sent by the socket. |
| 64 | + |
| 65 | +* `erlang_vm_dist_port_input_bytes`<br /> |
| 66 | +Type: gauge.<br /> |
| 67 | +The total number of bytes read from the port. |
| 68 | + |
| 69 | +* `erlang_vm_dist_port_output_bytes`<br /> |
| 70 | +Type: gauge.<br /> |
| 71 | +The total number of bytes written to the port. |
| 72 | + |
| 73 | +* `erlang_vm_dist_port_memory_bytes`<br /> |
| 74 | +Type: gauge.<br /> |
| 75 | +The total number of bytes allocated for this port by the runtime system. |
| 76 | +The port itself can have allocated memory that is not included. |
| 77 | + |
| 78 | +* `erlang_vm_dist_port_queue_size_bytes`<br /> |
| 79 | +Type: gauge.<br /> |
| 80 | +The total number of bytes queued by the port using the ERTS driver queue implementation. |
| 81 | + |
| 82 | +* `erlang_vm_dist_proc_memory_bytes`<br /> |
| 83 | +Type: gauge.<br /> |
| 84 | +The size in bytes of the process. This includes call stack, heap, and internal structures. |
| 85 | + |
| 86 | +* `erlang_vm_dist_proc_heap_size_words`<br /> |
| 87 | +Type: gauge.<br /> |
| 88 | +The size in words of the youngest heap generation of the process. |
| 89 | +This generation includes the process stack. This information is |
| 90 | +highly implementation-dependent, and can change if the implementation changes. |
| 91 | + |
| 92 | +* `erlang_vm_dist_proc_min_heap_size_words`<br /> |
| 93 | +Type: gauge.<br /> |
| 94 | +The minimum heap size for the process. |
| 95 | + |
| 96 | +* `erlang_vm_dist_proc_min_bin_vheap_size_words`<br /> |
| 97 | +Type: gauge.<br /> |
| 98 | +The minimum binary virtual heap size for the process. |
| 99 | + |
| 100 | +* `erlang_vm_dist_proc_stack_size_words`<br /> |
| 101 | +Type: gauge.<br /> |
| 102 | +The stack size, in words, of the process. |
| 103 | + |
| 104 | +* `erlang_vm_dist_proc_total_heap_size_words`<br /> |
| 105 | +Type: gauge.<br /> |
| 106 | +The total size, in words, of all heap fragments of the process. |
| 107 | +This includes the process stack and any unreceived messages that |
| 108 | +are considered to be part of the heap. |
| 109 | + |
| 110 | +* `erlang_vm_dist_proc_message_queue_len`<br /> |
| 111 | +Type: gauge.<br /> |
| 112 | +The number of messages currently in the message queue of the process. |
| 113 | + |
| 114 | +* `erlang_vm_dist_proc_reductions`<br /> |
| 115 | +Type: gauge.<br /> |
| 116 | +The number of reductions executed by the process. |
| 117 | + |
| 118 | +* `erlang_vm_dist_proc_status`<br /> |
| 119 | +Type: gauge.<br /> |
| 120 | +The current status of the distribution process.<br /> |
| 121 | +The status is represented as a numerical value where `exiting=1`, |
| 122 | +`suspended=2`, `runnable=3`, `garbage_collecting=4`, `running=5` |
| 123 | +and `waiting=6`. |
| 124 | + |
| 125 | +* `erlang_vm_dist_node_state`<br /> |
| 126 | +Type: gauge.<br /> |
| 127 | +The current state of the distribution link.<br /> |
| 128 | +The state is represented as a numerical value where `pending=1`, |
| 129 | +`up_pending=2` and `up=3`. |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | +### <a name="Configuration">Configuration</a> ### |
| 134 | + |
| 135 | +Metrics exported by this collector can be configured via |
| 136 | +`vm_dist_collector_metrics` key of `prometheus` app environment. |
| 137 | + |
| 138 | +Available options: |
| 139 | + |
| 140 | +* `recv_bytes` for `erlang_vm_dist_recv_bytes`. |
| 141 | + |
| 142 | +* `recv_cnt` for `erlang_vm_dist_recv_cnt`. |
| 143 | + |
| 144 | +* `recv_max_bytes` for `erlang_vm_dist_recv_max_bytes`. |
| 145 | + |
| 146 | +* `recv_avg_bytes` for `erlang_vm_dist_recv_avg_bytes`. |
| 147 | + |
| 148 | +* `recv_dvi_bytes` for `erlang_vm_dist_recv_dvi_bytes`. |
| 149 | + |
| 150 | +* `send_bytes` for `erlang_vm_dist_send_bytes`. |
| 151 | + |
| 152 | +* `send_cnt` for `erlang_vm_dist_send_cnt`. |
| 153 | + |
| 154 | +* `send_max_bytes` for `erlang_vm_dist_send_max_bytes`. |
| 155 | + |
| 156 | +* `send_avg_bytes` for `erlang_vm_dist_send_avg_bytes`. |
| 157 | + |
| 158 | +* `send_pend_bytes` for `erlang_vm_dist_send_pend_bytes`. |
| 159 | + |
| 160 | +* `port_input_bytes` for `erlang_vm_dist_port_input_bytes`. |
| 161 | + |
| 162 | +* `port_output_bytes` for `erlang_vm_dist_port_output_bytes`. |
| 163 | + |
| 164 | +* `port_memory_bytes` for `erlang_vm_dist_port_memory_bytes`. |
| 165 | + |
| 166 | +* `port_queue_size_bytes` for `erlang_vm_dist_port_queue_size_bytes`. |
| 167 | + |
| 168 | +* `proc_memory_bytes` for `erlang_vm_dist_proc_memory_bytes`. |
| 169 | + |
| 170 | +* `proc_heap_size_words` for `erlang_vm_dist_proc_heap_size_words`. |
| 171 | + |
| 172 | +* `proc_min_heap_size_words` for `erlang_vm_dist_proc_min_heap_size_words`. |
| 173 | + |
| 174 | +* `proc_min_bin_vheap_size_words` for `erlang_vm_dist_proc_min_bin_vheap_size_words`. |
| 175 | + |
| 176 | +* `proc_stack_size_words` for `erlang_vm_dist_proc_stack_size_words`. |
| 177 | + |
| 178 | +* `proc_total_heap_size_words` for `erlang_vm_dist_proc_total_heap_size_words`. |
| 179 | + |
| 180 | +* `proc_message_queue_len` for `erlang_vm_dist_proc_message_queue_len`. |
| 181 | + |
| 182 | +* `proc_reductions` for `erlang_vm_dist_proc_reductions`. |
| 183 | + |
| 184 | +* `proc_status` for `erlang_vm_dist_proc_status`. |
| 185 | + |
| 186 | +* `node_state` for `erlang_vm_dist_node_state`. |
| 187 | + |
| 188 | + |
| 189 | +By default all metrics are enabled. |
0 commit comments