Skip to content

Conversation

@AdrienChevrot1A
Copy link

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

Comment on lines +290 to +325
{
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,
},

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,
Copy link

@anti-social anti-social Nov 24, 2020

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.

Comment on lines +1563 to +1584
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,
},

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.

anti-social added a commit to anti-social/json-exporter that referenced this pull request Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants