I want to get logs from ec2 machines using some agent. I don't want to use cloudwatch for this. Is there any solution for this?
Related
Is there a way to host Moqui on AWS? I was trying to host Moqui using a EC2 instance but couldn't figure out a way to connect them.
The Run and Deploy document on moqui.org has a section for a simple recommended deployment using ElasticBeanstalk and RDS:
https://www.moqui.org/m/docs/framework/Run+and+Deploy#AWSElasticBeanstalkandRDS
With more details about how you want to set things up on AWS the answer to how might vary from this.
For clustered setups things get more involved to get the right settings for Hazelcast AWS discovery and it is best to use an external ElasticSearch server like an AWS ElasticSearch instance and configure Moqui using environment variables to use the Java REST Client mode instead of the Embedded Node mode. Settings for the moqui-hazelcast and moqui-elasticsearch components can be seen in the MoquiConf.xml file in each component.
I have created a windows instance and got .rdp file. How can i get the access logs i.e WHO and WHEN the instance is logged into with this .rdp file. Also, how much time was it used. Need help with the approaches of how to achieve this.
that possible completely to get each events log using Cloudwatch log Agent and system manager service which work on SSM Agents but this will work for Instances have Outbound Access to send logs to Cloudwatch. and the best part is AWS have amazing documentation for the same to setup a Cloudwatch for Windows Instances . Please have a look on this Windows logs with Cloudwatch
I have myself setup it for Windows server as per the need we can be flexible. let me know if you stuck while following this document.
This is one of the best approach .
I am migrating my spring cloud eureka application to AWS ECS and currently having some trouble doing so.
I have an ECS cluster on AWS in which two EC2 services was created
Eureka-server
Eureka-client
each service has a Task running on it.
QUESTION:
how do i establish a "docker network" amongst these two services such that i can register my eureka-client to the eureka-server's registry? Having them in the same cluster doesn't seem to do the trick.
locally i am able to establish a "docker network" to achieve this task. is it possible to have a "docker network" on AWS?
The problem here lies on the way how ECS clusters work. If you go to your dashboard and check out your task definition, you'll see an ip address which AWS assigns to the resource automatically.
In Eureka's case, you need to somehow obtain this ip address while deploying your eureka client apps and use it to register to your eureka-server. But of course your task definitions gets destroyed and recreated again somehow so you easily lose it.
I've done this before and there are couple of ways to achieve this. Here is one of the ways:
For the EC2 instances that you intend to spread ECS tasks as eureka-server or registry, you need to assign Elastic IP Addresses so you always know where to connect to in terms of a host ip address.
You also need to tag them properly so you can refer them in the next step.
Then switching back to ECS, when deploying your eureka-server tasks, inside your task definition configuration, there's an argument as placement_constraint
This will allow you to add a tag to your tasks so you can place those in the instances you assigned elastic ip addresses in the previous steps.
Now if this is all good and you deployed everything, you should be able to refer your eureka-client apps to that ip and have them registered.
I know this looks dirty and kind of complicated but the thing is Netflix OSS project for Eureka has missing parts which I believe is their proprietary implementation for their internal use and they don't want to share.
Another and probably a cooler way of doing this is using a Route53 domain or alias record for your instances so instead of using an elastic ip, you can also refer them using a DNS.
We want to collect metrics from machines running AWS lambda in AWS. How can I get access to these machines and get DD agent installed on them.
Lambda is serverless. Datadog agent is for the host. While running lambda you have absolutely no control over the host as you are not managing it.
Hence, You can monitor application running on lambda using datadog integration of lambda for the different application.
You may follow below link for AWS Integration of datadog.
Ref: https://docs.datadoghq.com/integrations/amazon_lambda/
I have an existing Windows EC2 instance and I'd like to enable custom metrics to Cloudwatch and forward logs to Cloudwatch Logs. I understand that I need to install EC2Config agent to do this. Since this is an already provisioned instance I'm unable to use an IAM role for passing credentials. Will I be able to use an IAM User with the correct policy to do this i.e can I hardcode the access key and secret key in EC2config somewhere?
Also for enabling Cloudwatch Custom Metrics + Logs is it simply a tick box that enables it?
Will EC2Config have any undesired impact on the OS, I can see many options around password changes and formatting EBS volumes - I assume if i leave those options alone it enable itself, since I'm only interested in forwarding logs to cloudwatch.
Thanks
You asked several questions, i will try to address them.
You cannot assign an IAM role to an instance after it has been created.
I would try to install the AWS cli tools and use aws configure to check if the EC2Config agent can use it
The agent sends the logs to CloudWatch. As it is an Agent running it does consume system resources but it should be minimal.