-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[Feature Request]: Query Results Cloudwatch dashboard #3681
Comments
Hi, do you have any idea when this feature will be released? |
Hi @ayang-629 , you mentioned "It's currently possible to hack a way to create that Widget via a call to CfnDashboard instead". What's the best way to have 2 widgets in this dashboard, one is |
@vac-gollner what I meant by "hack a way" is that CfnDashboard allows you to manually construct a string that includes the raw cfn configuration for a query result widget. However, the reason one would prefer to use the CDK over say, the terraform option for this case is that instead of hard-coding a complex string (error-prone and tedious), a developer can programmatically define the desired infrastructure. This is what the CDK provides for most of the cloudwatch dashboard functionality, but not for the |
@ayang-629 yes I totally agree. Now I am having a use case that I want to have both |
You can extend the ConcreteWidget class to define your own custom widget implemntation where you define the JSON. Here's an example for a widget with an expression metric: class ExpressionMetricWidget(construct: Construct, props: ExpressionMetricWidgetProps) extends ConcreteWidget(props.width, props.height) {
val stack = Stack.of(construct)
override def toJson = {
jList(
Map(
"type" -> "metric",
"width" -> getWidth,
"height" -> getHeight,
"x" -> getX,
"y" -> getY,
"period" -> "300",
"properties" -> Map(
"view" -> "timeSeries",
"title" -> props.title,
"region" -> stack.getRegion,
"metrics" -> List(
List(
Map("expression" -> props.expression.getExpression)
)
)
)
)
)
}
} |
Hey @ayang-629, @ninahaack unfortunately we have long list of features to implement, so I cant give you a timeline on working on this one. If someone would like to work on this and put in a PR, we can review and merge it into the codebase, otherwise one of us will update this issue when there is an update to this. 😸 |
Don't exactly know what support for this feature entails, but if is Math Expressions, that is being worked on in #5582 |
Adding more context to this feature request, because I think it may have been misinterpreted. CloudWatch Dashboards contain widgets of various types, out of which CDK supports a few (alarm, graph, text etc). Currently CDK does not support the widget used to plot results of "CloudWatch Insight Queries". Here's an example of how one of these widgets is represented by CloudWatch on a dashboard:
I'm happy to provide more details if needed. |
Add a `QueryWidget` to generate a dashboard widget showing the results of a query from Logs Insights. This was a missing feature which is available in the console. closes aws#3681
Add a `QueryWidget` to generate a dashboard widget showing the results of a query from Logs Insights. This was a missing feature which is available in the console. closes aws#3681
Add a `QueryWidget` to generate a dashboard widget showing the results of a query from Logs Insights. This was a missing feature which is available in the console. closes aws#3681
Add a `QueryWidget` to generate a dashboard widget showing the results of a query from Logs Insights. This was a missing feature which is available in the console. closes aws#3681
Add a `QueryWidget` to generate a dashboard widget showing the results of a query from Logs Insights. This was a missing feature which is available in the console. Also make `ILogGroup` extend `cloudwatch.IQueryLogGroup` so it can be passed as a property for a `QueryWidget`. closes aws#3681
Add a `QueryWidget` to generate a dashboard widget showing the results of a query from Logs Insights. This was a missing feature which is available in the console. Also make `ILogGroup` extend `cloudwatch.IQueryLogGroup` so it can be passed as a property for a `QueryWidget`. closes aws#3681
Add a `QueryWidget` to generate a dashboard widget showing the results of a query from Logs Insights. This was a missing feature which is available in the console. Also make `ILogGroup` extend `cloudwatch.IQueryLogGroup` so it can be passed as a property for a `QueryWidget`. closes aws#3681
Add a `QueryWidget` to generate a dashboard widget showing the results of a query from Logs Insights. This was a missing feature which is available in the console. Also make `ILogGroup` extend `cloudwatch.IQueryLogGroup` so it can be passed as a property for a `QueryWidget`. closes aws#3681
Add a `LogQueryWidget` to generate a dashboard widget showing the results of a query from Logs Insights. This was a missing feature which is available in the console. closes #3681
Add a `LogQueryWidget` to generate a dashboard widget showing the results of a query from Logs Insights. This was a missing feature which is available in the console. closes aws#3681
Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.
I'm submitting a ...
What is the current behavior?
Currently, the CDK just supports 4 of the 5 existing dashboard widgets:
line
,stacked
,number
,text
.There is a
Query Results
widget that allows us to put cloudwatch insights visualizations into dashboardsIt's currently possible to hack a way to create that Widget via a call to
CfnDashboard
instead, but there should be a Class defined to handle this like there is for the other 4 widgets.Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
The text was updated successfully, but these errors were encountered: