-
Notifications
You must be signed in to change notification settings - Fork 807
Add HTTP/TCP connections and Swap/Recovery metrics #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add HTTP/TCP connections and Swap/Recovery metrics #314
Conversation
| { | ||
| Type: prometheus.GaugeValue, | ||
| Desc: prometheus.NewDesc( | ||
| prometheus.BuildFQName(namespace, "os", "swap_in_bytes_used"), | ||
| "Amount of used swap space in bytes", | ||
| defaultNodeLabels, nil, | ||
| ), | ||
| Value: func(node NodeStatsNodeResponse) float64 { | ||
| return float64(node.OS.Swap.Used) | ||
| }, | ||
| Labels: defaultNodeLabelValues, | ||
| }, | ||
| { | ||
| Type: prometheus.GaugeValue, | ||
| Desc: prometheus.NewDesc( | ||
| prometheus.BuildFQName(namespace, "os", "swap_in_bytes_free"), | ||
| "Amount of free swap space in bytes", | ||
| defaultNodeLabels, nil, | ||
| ), | ||
| Value: func(node NodeStatsNodeResponse) float64 { | ||
| return float64(node.OS.Swap.Free) | ||
| }, | ||
| Labels: defaultNodeLabelValues, | ||
| }, | ||
| { | ||
| Type: prometheus.GaugeValue, | ||
| Desc: prometheus.NewDesc( | ||
| prometheus.BuildFQName(namespace, "os", "swap_in_bytes_total"), | ||
| "Total amount of swap space in bytes", | ||
| defaultNodeLabels, nil, | ||
| ), | ||
| Value: func(node NodeStatsNodeResponse) float64 { | ||
| return float64(node.OS.Swap.Total) | ||
| }, | ||
| Labels: defaultNodeLabelValues, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think these metrics should be named swap_used_bytes, swap_free_bytes & swap_total_bytes simalarly to mem_* metrics.
| Labels: defaultNodeLabelValues, | ||
| }, | ||
| { | ||
| Type: prometheus.CounterValue, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Number of current open connections should be a gauge.
| Desc: prometheus.NewDesc( | ||
| prometheus.BuildFQName(namespace, "http", "connections_opened_current"), | ||
| "Current number of opened connections", | ||
| defaultNodeLabels, nil, | ||
| ), | ||
| Value: func(node NodeStatsNodeResponse) float64 { | ||
| return float64(node.HTTP.CurrentOpen) | ||
| }, | ||
| Labels: defaultNodeLabelValues, | ||
| }, | ||
| { | ||
| Type: prometheus.CounterValue, | ||
| Desc: prometheus.NewDesc( | ||
| prometheus.BuildFQName(namespace, "http", "connections_opened_total"), | ||
| "Total number of opened connections", | ||
| defaultNodeLabels, nil, | ||
| ), | ||
| Value: func(node NodeStatsNodeResponse) float64 { | ||
| return float64(node.HTTP.TotalOpen) | ||
| }, | ||
| Labels: defaultNodeLabelValues, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you think it's worth to rename Elasticsearch's metrics? This makes harder matching exporter's metric to the origin.
Added the following metrics:
elasticsearch_indices_recovery_current_as_sourceelasticsearch_indices_recovery_current_as_targetelasticsearch_indices_recovery_throttle_time_seconds_totalelasticsearch_os_swap_in_bytes_usedelasticsearch_os_swap_in_bytes_freeelasticsearch_os_swap_in_bytes_totalelasticsearch_transport_tcp_connections_opened_totalelasticsearch_http_connections_opened_currentelasticsearch_http_connections_opened_total