Skip to content

Commit ebae900

Browse files
committed
Fix naming for index search active queries
The README was wrong as noted in #640. Add the indices_ prefix to the subsystem since this is related to indices and update the README. Signed-off-by: Joe Adams <[email protected]>
1 parent 70152fe commit ebae900

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Further Information
130130
| elasticsearch_filesystem_io_stats_device_write_operations_count | gauge | 1 | Count of disk write operations
131131
| elasticsearch_filesystem_io_stats_device_read_size_kilobytes_sum | gauge | 1 | Total kilobytes read from disk
132132
| elasticsearch_filesystem_io_stats_device_write_size_kilobytes_sum | gauge | 1 | Total kilobytes written to disk
133-
| elasticsearch_indices_active_queries | gauge | 1 | The number of currently active queries
133+
| elasticsearch_indices_search_active_queries | gauge | 1 | The number of currently active search and suggest queries
134134
| elasticsearch_indices_docs | gauge | 1 | Count of documents on this node
135135
| elasticsearch_indices_docs_deleted | gauge | 1 | Count of deleted documents on this node
136136
| elasticsearch_indices_docs_primary | gauge | | Count of documents with only primary shards on all nodes

collector/indices.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ package collector
1616
import (
1717
"encoding/json"
1818
"fmt"
19-
"github.com/go-kit/log"
20-
"github.com/go-kit/log/level"
21-
"github.com/prometheus-community/elasticsearch_exporter/pkg/clusterinfo"
22-
"github.com/prometheus/client_golang/prometheus"
2319
"io/ioutil"
2420
"net/http"
2521
"net/url"
2622
"path"
2723
"sort"
2824
"strconv"
25+
26+
"github.com/go-kit/log"
27+
"github.com/go-kit/log/level"
28+
"github.com/prometheus-community/elasticsearch_exporter/pkg/clusterinfo"
29+
"github.com/prometheus/client_golang/prometheus"
2930
)
3031

3132
type labels struct {
@@ -518,8 +519,8 @@ func NewIndices(logger log.Logger, client *http.Client, url *url.URL, shards boo
518519
{
519520
Type: prometheus.GaugeValue,
520521
Desc: prometheus.NewDesc(
521-
prometheus.BuildFQName(namespace, "search", "active_queries"),
522-
"The number of currently active queries",
522+
prometheus.BuildFQName(namespace, "indices_search", "active_queries"),
523+
"The number of currently active search and suggest queries",
523524
indexLabels.keys(), nil,
524525
),
525526
Value: func(indexStats IndexStatsIndexResponse) float64 {

0 commit comments

Comments
 (0)