Monitoring Construct in Stack in Pipeline Stage
See original GitHub issueVersion
1.7.0
Steps and/or minimal code example to reproduce
My issue is that the monitoring construct runs within a stage and doesn’t deploy any resources.
My steps were:
- CDK App has a stack
CdkPipeline
CdkPipeline
has astage
CdkPipelineStage
CdkPipelineStage
includes allstacks
- Add monitoring stack in
CdkPipelineStage
export interface Props extends StackProps {
constructToMonitor: ConstructType;
}
export class MonitoringStack extends Stack {
constructor(parent: Construct, name: string, props: Props) {
super(parent, name, props);
const { constructToMonitor } = props;
const monitoring = new MonitoringFacade(this, 'monFacade', {
alarmFactoryDefaults: {
actionsEnabled: true,
alarmNamePrefix: 'alarm'
},
metricFactoryDefaults: {}
});
monitoring.monitorScope(constructToMonitor);
monitoring.monitorBilling();
monitoring.monitorLambdaFunction({
lambdaFunction: constructToMonitor.sqsLambdaDlq.consumerLambda
});
}
}
- Nothing gets deployed except for CDK Metadata
The same thing happens if I am adding the monitoring construct within an existent stack with other services.
Is it necessary that I pass the App
like in the example or is it also possible when I pass a construct?
Expected behavior
Find all resources within my construct and create alarms, dashboards, etc.
Actual behavior
Nothing will be deployed.
Other details
No response
Issue Analytics
- State:
- Created a year ago
- Comments:24 (10 by maintainers)
Top Results From Across the Web
Monitoring pipelines - AWS CodePipeline
EventBridge event bus events — You can monitor CodePipeline events in EventBridge, which detects changes in your pipeline, stage, or action execution status....
Read more >Use Cloud Monitoring for Dataflow pipelines
Cloud Monitoring provides powerful logging and diagnostics. Dataflow integration with Monitoring lets you access Dataflow job metrics such as Job Status, ...
Read more >the given stage construct should contain at least one stack
We receive an error "The given Stage construct ('foo/bar') should contain at least one Stack" when migrating our code to the modern pipelines....
Read more >AWS CodePipeline (CI / CD) Tutorial with CDK - YouTube
In this tutorial, I show you how to setup a CI / CD pipeline using CodePipeline, CDK and TypeScript. We set up two...
Read more >(pipelines): add a way to add steps that aren't attached to ...
We receive an error "The given Stage construct ('foo/bar') should contain at least one Stack" when migrating our code to the modern ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think when creating new MonitoringFacade, for the dashboardFactory, the sample code used
new DefaultDashboardFactory(this, 'MonitoringDashboards', {
The documentation doesn’t show that part at all.
@wernermorgenstern could explain how you integrated
cdk-monitoring-constructs
with CDK pipelines?