-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Check ES for CCR feature availability #17073
Conversation
Pinging @elastic/integrations (Team:Integrations) |
Hey @andresrc I've removed the |
Pinging @elastic/stack-monitoring (Stack monitoring) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, it looks good to me. One question, is there any documentation related place need to be added/changed?
Yeah, probably a good idea to mention something on https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-elasticsearch-ccr.html. Thanks, I will update this PR with the necessary doc changes. |
@@ -1,3 +1,8 @@ | |||
This is the `ccr` metricset of the Elasticsearch module. It interrogates the | |||
Cross Cluster Replication Stats API endpoint to fetch information about shards | |||
in the Elasticsearch cluster that are participating in cross-cluster replication. | |||
Cross-Cluster Replication Stats API endpoint to fetch metrics about cross-cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a sentence fragment. Maybe say something like:
"This metricset uses the Cross-Cluster Replication Stats API endpoint to fetch...."
Cross Cluster Replication Stats API endpoint to fetch information about shards | ||
in the Elasticsearch cluster that are participating in cross-cluster replication. | ||
Cross-Cluster Replication Stats API endpoint to fetch metrics about cross-cluster | ||
replication from the Elasticsearch clusters that are participating in cross-cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, but I'm trying to clean up the docs by using the correct attribute to resolve product names. So you should use {es} instead of Elasticsearch throughout this topic.
replication from the Elasticsearch clusters that are participating in cross-cluster | ||
replication. | ||
|
||
If the Elasticserach cluster does not have the cross-cluster replication feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest pruning a few words here and saying: "...does not have cross-cluster replication enabled..."
replication. | ||
|
||
If the Elasticserach cluster does not have the cross-cluster replication feature | ||
enabled, this metricset will not collect any metrics. A DEBUG log message about this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, some pruning: "...will not collect metrics."
@dedemorton I've made the suggested changes. Please re-review when you get a chance. Thanks! |
Travis CI is green and Jenkins CI failures are unrelated. Merging. |
* Add TODO * Check if CCR feature is available in ES * Allow tests to disable license caching * Add unit tests * Separate message * Adding license header * Adding CHANGELOG entry * Check enabled, not available * Renaming var * Adding documentation * Doc feedback fixes
What does this PR do?
Improves the check for CCR availability by not just checking the license level but also checking if the CCR feature is actually available in Elasticsearch.
Why is it important?
In some environments, like Elastic Cloud, the CCR feature is not available in Elasticsearch despite the license level being high enough. In such environments we currently throw errors in the log. This change will fix the error logging behavior.
Checklist
I have made corresponding change to the default configuration filesHow to test this PR locally
Spin up a deployment on Elastic Cloud.
Grab the Elasticsearch Endpoint URL.
Grab the password for the
elastic
user.Enable the
elasticsearch-xpack
Metricbeat module.Edit
modules.d/elasticsearch-xpack.yml
.hosts
to the Elasticsearch Endpoint URL from step 2.username
toelastic
.password
to the password from step 3.For ease of testing, edit
metricbeat.yml
and setoutput.elasticsearch.enabled: false
,output.file.path: /tmp
, andoutput.file.filename: metricbeat
.Start Metricbeat and watch the logs being output to the console.
Assert that the following message does not appear:
Stop Metricbeat.
Restart Metricbeat with debug logging for the Elasticsearch CCR metricset and watch the logs being output to the console.
Assert that the following message does appear:
Related issues