-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Metrics UI] Add AWS Metricsets to Inventory Models #49983
Conversation
💔 Build Failed |
e0bb941
to
f8db271
Compare
💔 Build Failed |
f8db271
to
2b80ccf
Compare
💔 Build Failed |
2b80ccf
to
1dcc91c
Compare
💔 Build Failed |
💔 Build Failed |
@sorantis What "actions" should we have for the AWS EC2 metrics? Here is what we have now: I think the question is "Can we correlate on EC2 data with our other pillars of Observability? If so what are the fields used for each option?" |
💔 Build Failed |
@simianhacker good question.
|
@sorantis What kind of correlation are you thinking? By looking at the ec2 log example, there will be the instanceId field that can be directly link back to ec2 metrics from Metricbeat. I will start the investigation work around cloudwatch logs after I get the permissions I need from infra team. |
@kaiyan-sheng something that could tie AWS logs to metrics so that the |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
|
||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; | ||
|
||
export const awsEC2CpuUtilization: TSVBMetricModelCreator = ( |
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.
What about creating some util funcs for these modelCreators. For example:
const createAWSEC2Model = (indexPattern: string, timeField: string, series: any) => {
return {
requires: ['aws.ec2'],
.....
series
}
}
createAWSEC2Model([
{
id: 'write',
split_mode: 'everything',
metrics: [
{
field: 'aws.ec2.diskio.write.bytes_per_sec',
id: 'avg-write',
type: 'avg',
},
],
},
{
id: 'read',
split_mode: 'everything',
metrics: [
{
field: 'aws.ec2.diskio.read.bytes_per_sec',
id: 'avg-read',
type: 'avg',
},
{
id: 'calculation-rate',
type: 'calculation',
variables: [{ id: 'rate-var', name: 'rate', field: 'avg-read' }],
script: 'params.rate * -1',
},
],
},
]);
Doing that could save about 70 lines of code in this PR alone.
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.
That would work... I was also thinking for all the basic ones where it's just an avg/max/min we could just create a function that takes the field name. I'm sure that would reduce things down some too.
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.
Looks great! Lots of code, but I think that might just be the nature of what we're trying to build. Couple of tiny questions.
@@ -24,8 +26,14 @@ export const calculateMetricInterval = async ( | |||
framework: KibanaFramework, | |||
requestContext: RequestHandlerContext, | |||
options: Options, | |||
modules: string[] | |||
modules: string[], | |||
nodeType?: InfraNodeType // TODO: check that this type still makes sense |
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.
Does it?
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Adding initial code for EC2 * Removing obsolute files; Adding EC2; * Removing currentTimerange and replacing it with currentTime; Timerange will now be calcuated on the server * Fixing AWS.s3 with Metrics Explorer * Auto calculating timerange and interval based on metricset.period * Adding S3 metricset * Inital addition of RDS metrics * Adding SQS and fixing a few things * Fixing typescript error * Adding RDS; Adjusting fields for S3; adding new formatter * Return 60 seconds by detault * Fixing types * Removing i18n * Fixing tests * Fixing translations * Fixes from merge * Removing IDX from code not covered by elastic#52354 * fixing tests * Adding controls for crossliking; consolidating display name * remove obsolete import * Adding drop_last_bucket_support to TSVB models * Changing type * Fixing value per type * remvoing obsolete translation * Removing duplicate lines * Removing icons from switcher * Reducing boilerplate in Toolbar Items * Changing file name
* Adding initial code for EC2 * Removing obsolute files; Adding EC2; * Removing currentTimerange and replacing it with currentTime; Timerange will now be calcuated on the server * Fixing AWS.s3 with Metrics Explorer * Auto calculating timerange and interval based on metricset.period * Adding S3 metricset * Inital addition of RDS metrics * Adding SQS and fixing a few things * Fixing typescript error * Adding RDS; Adjusting fields for S3; adding new formatter * Return 60 seconds by detault * Fixing types * Removing i18n * Fixing tests * Fixing translations * Fixes from merge * Removing IDX from code not covered by #52354 * fixing tests * Adding controls for crossliking; consolidating display name * remove obsolete import * Adding drop_last_bucket_support to TSVB models * Changing type * Fixing value per type * remvoing obsolete translation * Removing duplicate lines * Removing icons from switcher * Reducing boilerplate in Toolbar Items * Changing file name
* Adding initial code for EC2 * Removing obsolute files; Adding EC2; * Removing currentTimerange and replacing it with currentTime; Timerange will now be calcuated on the server * Fixing AWS.s3 with Metrics Explorer * Auto calculating timerange and interval based on metricset.period * Adding S3 metricset * Inital addition of RDS metrics * Adding SQS and fixing a few things * Fixing typescript error * Adding RDS; Adjusting fields for S3; adding new formatter * Return 60 seconds by detault * Fixing types * Removing i18n * Fixing tests * Fixing translations * Fixes from merge * Removing IDX from code not covered by elastic#52354 * fixing tests * Adding controls for crossliking; consolidating display name * remove obsolete import * Adding drop_last_bucket_support to TSVB models * Changing type * Fixing value per type * remvoing obsolete translation * Removing duplicate lines * Removing icons from switcher * Reducing boilerplate in Toolbar Items * Changing file name
Summary
This PR adds the AWS metricset to the Inventory Models for EC2, RDS, S3 and SQS. It also cleans up a few areas that were missed in the Inventory Model PR.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Documentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibility