How can I make elastic APM work with AWS xray? - amazon-web-services

I am planning to deploy ELK to monitor my application running in AWS. My apps are using AWS xray for trace data. I am reading the doc about elastic APM to see how to ingest AWS xray to elasticsearch but I can't find any solution.
I have read the agent doc https://www.elastic.co/guide/en/apm/agent/nodejs/3.x/intro.html but xray is not listed as supported framework. Does this mean I need to build a xray agent and send the trace data to APM server? Or is there an easier way to do that?

Related

Best way to send e-mail programmatically from docker container (Spring Boot app) hosted Amazon AWS ECS Cluster?

I was wondering if anyone could advise the "best" (I know that's subjective, but meaning "best" as in least amount of work/steps) to trigger sending an E-mail from Amazon AWS. The Message body with contain dynamic variables/data from my App (Spring boot) so I will have to wire that in somehow, and it should be triggered from within my Application whenever it finishes processing some data, since my app reads .CSV data.
I cannot use JavaMail/Jakarta to send e-mail from within app as all Containers I have have blocked ports
Preferably using some type of AWS service since I'm already hosting this app on AWS ECS cluster
I would like to do it programmatically:
AWS provides Amazon Simple Email Service (SES) which is:
is an email platform that provides an easy, cost-effective way for you to send and receive email using your own email addresses and domains.
To use that, you would add SES permissions to your ECS tasks role. This way, you don't need to hard-code any AWS credentials into your application, as they will be automatically obtained by AWS SDK when interacting with SES.
AWS also provides AWS SDK for java. Using the SDK you can send emails using SES as shown in the example Send an email using the AWS SDK for Java.
If you want to send an email from a Spring Boot app, then use the Simple Email Service Java V2 API. There is an AWS Java V2 tutorial that shows how to build a Spring BOOT app that uses various AWS Services to analyze photos located in an Amazon S3 bucket. This app uses the SES Java V2 API to send a report that contains the details of the Amazon Rekognition service that analyzes the photos.

Mulesoft - Export Log To AWS CloudWatch

I am planning to export logging from MuleSoft CloudHub to AWS CloudWatch.
I saw there is one AWS CloudWatch Connector in GitHub:
https://github.com/mulesoft-labs/mule-amazon-cloudwatch-connector/tree/master/mule-cloudwatch-connector
Is there any examples on how to implement this?
And which AWS CloudWatch features is supported in this connector?
I found other export logs method with examples, but not for AWS CloudWatch:
https://help.mulesoft.com/s/question/0D52T00004mXUALSA4/export-log-to-external-system
Thanks.
You could try to create a Mule application that reads logs from CloudHub using CloudHub's API and pushes them to CloudWatch. The readme for the connector doesn't seem to mention an operation to put logs into CloudWatch, but if CloudWatch has a REST API for it -every AWS product has it- you could use it in your application.
This KB article shows how to get the logs from CloudHub: https://help.mulesoft.com/s/article/How-to-get-whole-Application-logs-from-Cloudhub-through-API

Is there way to see kahaDB logs in AWS using amazonMQ?

We are in the process of migrating from activeMQ to amazonMQ on AWS. ActiveMQ and AmazonMQ internally uses kahaDB as there data store.
Earlier we were able to see kahaDB logs files while using activeMQ on data center is there a similar way of seeing the kahadb logs file on AWS while using amazonMQ?
Tried enabling cloudwatch logs but it contains general and audit logs of amazonMQ.
I checked with AWS technical team, they don't allow to access the kahaDB logs.

AWS offerings for monitoring EC2 Tomcat Web Application

I have a java web application running on Tomcat deployed on an EC2 instance. Is there any way I can monitor/set alarms for when the web application goes down or stops responding? Essentially what I would like to do is to check if a HTTP request to the web app responds with status 200. If it does not respond with 200 (for a few times) then it should raise an alarm and send an e-mail to some ops people.
I know there are third party options like Nagois / uptimerobot that I could use but I wanted to know if there are any AWS offerings for this? Is it possible to set up such automated monitoring using AWS Cloud Watch? I could not find a way to do this based on what I read up about Cloud Watch. If this isn't the sort of thing Cloud Watch can handle, then is there another AWS service suited for this?
I think Port Monitoring Feature is available under AWS Beanstalk.
You can consider checking this http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.healthstatus.html
Ashutosh,
Ec2 is an IAAS service from AWS and you will not have an AWS offering to monitor your Tomcat server. However, you have custom-built solutions, which I think you are not looking for here.
However, if you are using an Application Load balancer or Beanstalk you get options to trigger alarms.
Yes , you can achieve it through a cloudwatch . collect your logs with a cloudwatch agent and upload it on cloudwatch logstream. below is the reference url for configuring cloudwatch agent.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html
After that with "create matrix filter" you can set up an email trigger as per your requirements.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/MonitoringPolicyE
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Counting404Responses.htmlxamples.html

How to create a spring web application using Amazon

Am new to Amazon Cloud service, I have to create a web application using Springs, Maven and Amazon DynamoDB. For that I have to create in Amazon Elastic Bean Services only or normally we can create a Maven spring project and include amazon dynamodb dependencies and deploy to Amazon EC2 cloud service. Now I really stuck with it? .. How to create a web app with Amazon enabled services?
Try to use jcabi-dynamo, a simple object layer on top of Amazon SDK. For your Maven project I'd recommend to use jcabi-dynamodb-maven-plugin, which will help you to automate integration testing of your DynamoDB-empowered application.