Skip to content

Commit

Permalink
Fix naming for index search active queries
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sysadmind committed Nov 1, 2022
1 parent 70152fe commit ebae900
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Further Information
| elasticsearch_filesystem_io_stats_device_write_operations_count | gauge | 1 | Count of disk write operations
| elasticsearch_filesystem_io_stats_device_read_size_kilobytes_sum | gauge | 1 | Total kilobytes read from disk
| elasticsearch_filesystem_io_stats_device_write_size_kilobytes_sum | gauge | 1 | Total kilobytes written to disk
| elasticsearch_indices_active_queries | gauge | 1 | The number of currently active queries
| elasticsearch_indices_search_active_queries | gauge | 1 | The number of currently active search and suggest queries
| elasticsearch_indices_docs | gauge | 1 | Count of documents on this node
| elasticsearch_indices_docs_deleted | gauge | 1 | Count of deleted documents on this node
| elasticsearch_indices_docs_primary | gauge | | Count of documents with only primary shards on all nodes
Expand Down
13 changes: 7 additions & 6 deletions collector/indices.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ package collector
import (
"encoding/json"
"fmt"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus-community/elasticsearch_exporter/pkg/clusterinfo"
"github.com/prometheus/client_golang/prometheus"
"io/ioutil"
"net/http"
"net/url"
"path"
"sort"
"strconv"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus-community/elasticsearch_exporter/pkg/clusterinfo"
"github.com/prometheus/client_golang/prometheus"
)

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

0 comments on commit ebae900

Please sign in to comment.