-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Stack Monitoring] health api support for data ingested from package #138964
Conversation
getNewIndexPatterns, | ||
getLegacyIndexPattern, |
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.
Took the opportunity to reuse the functions used to build the patterns throughout the server code
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
x-pack/plugins/monitoring/server/routes/api/v1/_health/index.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
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 tried using your profile from elastic/integrations#4018 then running this branch against it. Since I don't think this branch supports metrics-*
for the regular UI I then enabled internal collection, but so far I'm only seeing internal-collection data in the health api. Nothing agent based yet.
GET http://localhost:5602/ftw/api/monitoring/v1/_health
{
"monitoredClusters": {
"clusters": {
"0pMSN574ShOT3UQkRDRHxg": {
"cluster": {
"0pMSN574ShOT3UQkRDRHxg": {
"index_summary": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.108Z"
}
},
"index_recovery": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.111Z"
}
},
"index": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.108Z"
}
},
"cluster_stats": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.099Z"
}
}
}
},
"elasticsearch": {
"6TyLurl-R3ChzhNEa2u8zw": {
"node_stats": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.061Z"
}
},
"shard": {
"internal-monitoring": {
"index": ".monitoring-es-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:15.108Z"
}
}
}
},
"kibana": {
"71916d11-34bc-451d-b87e-f9ff2fb1137c": {
"stats": {
"internal-monitoring": {
"index": ".monitoring-kibana-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:22.268Z"
}
}
},
"5b2de169-2785-441b-ae8c-186a1936b17d": {
"stats": {
"internal-monitoring": {
"index": ".monitoring-kibana-7-2022.09.06",
"lastSeen": "2022-09-06T09:13:23.866Z"
}
}
}
}
},
"standalone": {
}
},
"execution": {
"timedOut": false,
"errors": [
]
}
},
"metricbeatErrors": {
"products": {
},
"execution": {
"timedOut": false,
"errors": [
]
}
},
"settings": {
"ccs": true,
"logsIndex": "filebeat-*",
"metricbeatIndex": "metricbeat-*",
"hasRemoteClusterConfigured": false
}
}
Maybe we can toss it around in our 1:1
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @klacabane |
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.
We paired up on this and that last commit should have things working nicely!
…lastic#138964) * query for data_stream datasets * support package collection mode * build index with metrics pattern * trailing comma * use getNewIndexPatterns everywhere * Include new stack_monitoring infix in healthcheck dataset name Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Mat Schaffer <[email protected]>
Summary
Closes #138864
Add support for data ingested from packages in the
metrics-{product}.*
patterns.This change only fetches the data for the successfully monitored products, but we can also retrieve the errors like we do for metricbeat since an
error.message
may be populated on failure. This will be handled in elastic/integrations#4011Testing
localhost:5602/api/monitoring/v1/_health
- a monitored cluster should show up with cluster, elasticsearch and logstash data collected with thepackage
method