Conversation
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.
Thanks for the recipe, some work required, left comments inline. Please address and re-submit.
cd ./sample-apps/prometheus | ||
docker build . -t prometheus-sample-app:latest | ||
``` | ||
2. Push this image to a registry such as Amazon ECR or DockerHub. |
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.
Let's focus on one, say, ECR and provide the commands. You can reuse, for example, https://aws-observability.github.io/aws-o11y-recipes/recipes/fargate-eks-metrics-go-adot-ampamg/#build-container-image
|
||
### Deploying the Terraform module to configure Amazon Managed service for Prometheus workspace, recording rules & alert manager | ||
|
||
Now, we will provision a Amazon Managed service for Prometheus workspace and will define an alerting rule that causes the Alert Manager to send a notification if a certain condition (defined in expr) holds true for a specified time period (for). Code in the Terraform language is stored in plain text files with the .tf file extension. There is also a JSON-based variant of the language that is named with the .tf.json file extension. |
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.
service -> Service
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.
Turn code fragments such expr and for into code using expr
and for
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.
changed
} | ||
``` | ||
|
||
Once the file is created, execute the below commands to provision the resource using terraform: |
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.
Turn above file into a proper resource (supporting file as per https://github.com/aws-observability/aws-o11y-recipes/#writing-recipes) and make sure to clean it up. It looks like there's an extra EOF
in there?
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.
have created a file main.tf as per the direction
terraform apply | ||
``` | ||
|
||
Once the above steps are complete, verify the setup end-to-end by using awscurl and query the endpoint. Look for the metric “metric:recording_rule”, and, if you successfully find the metric, then you’ve successfully created a recording rule: |
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.
If you are using awscurl
here you need to add it to the pre-reqs section as well.
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.
added the pre-req
awscurl https://aps-workspaces.us-east-1.amazonaws.com/workspaces/$WORKSPACE_ID/alertmanager/api/v2/alerts --service="aps" -H "Content-Type: application/json" | ||
``` | ||
|
||
## Clean up |
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.
Remove this section, it's a dupe (see below)
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.
Cleared the section
OK, thanks for addressing the issues @Saaish but there are still some things to be done before we can merge it:
|
Thanks for the feedback @mhausenblas . I incorporated the changes and did a local preview. Things looked good. Please do the needful |
@Saaish thanks and there are still a number of things not addressed. From the flags (not a list, not code, see my previous comment) to the region env variable in |
No description provided.