Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a metric for the count of mapped fields by index and field type #68

Merged
merged 2 commits into from
Jun 23, 2020

Conversation

braedon
Copy link
Owner

@braedon braedon commented Jun 21, 2020

The new collector parses the /_mappings endpoint, producing the new es_indices_mappings_field_count metric. The labels index and field_type are available.

Closes #66

The new collector parses the `/_mappings` endpoint, producing the new
`es_indices_mappings_field_count` metric. The labels `index` and
`field_type` are available.
@braedon braedon added this to the release-0.10.0 milestone Jun 21, 2020
@braedon braedon linked an issue Jun 21, 2020 that may be closed by this pull request
@braedon
Copy link
Owner Author

braedon commented Jun 21, 2020

@jonny-wg2 Here's a quick attempt at getting the field count metric. Please take a look and let me know if it solves your use case.

The clusters I have to test on don't have very complex mappings, so it'd be great if you could run it against your cluster to make sure there aren't any mappings parsing issues. Let me know if you need an alpha version pushed to Dockerhub or PyPi to do this.

@jonny-wg2
Copy link

@braedon Awesome stuff!!

I just deployed this in my cluster and it works like a charm. In our usecase, we have two different indexes, logstash-xxx-date and logstash-yyy-date and It was able to pick these up. Also it separated the field mapping nice between keywords, objects, long, ips etc.

But again, awesome stuff! I wasn't able to find an exporter that has this metric, and I think it's one of the most important as an ES cluster will tend to fall over if there are more than 1000 fields in an index.

@braedon
Copy link
Owner Author

braedon commented Jun 23, 2020

Sweet, I'll merge and cut a release.

@braedon braedon merged commit 20953a1 into release-0.10.0 Jun 23, 2020
@braedon braedon deleted the indices-mappings-collector branch June 23, 2020 07:05
@braedon
Copy link
Owner Author

braedon commented Jun 23, 2020

Released in version 0.10.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Total field metric
2 participants