-
Notifications
You must be signed in to change notification settings - Fork 783
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
Add HTTP/TCP connections and Swap/Recovery metrics #314
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.
@@ -1510,6 +1558,30 @@ func NewNodes(logger log.Logger, client *http.Client, url *url.URL, all bool, no | |||
}, | |||
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_source
elasticsearch_indices_recovery_current_as_target
elasticsearch_indices_recovery_throttle_time_seconds_total
elasticsearch_os_swap_in_bytes_used
elasticsearch_os_swap_in_bytes_free
elasticsearch_os_swap_in_bytes_total
elasticsearch_transport_tcp_connections_opened_total
elasticsearch_http_connections_opened_current
elasticsearch_http_connections_opened_total