Skip to content
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

Fix naming for index search active queries #641

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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