Hi,
I am deploying AWS X-Ray daemon on an EC2 Instance (AWS Linux AMI). I am doing this by following the instructions provided in https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-ec2.html which asks to have the following in UserData script:
#!/bin/bash
curl https://s3.dualstack.us-east-2.amazonaws.com/aws-xray-assets.us-east-2/xray-daemon/aws-xray-daemon-3.x.rpm -o /home/ec2-user/xray.rpm
yum install -y /home/ec2-user/xray.rpm
The above install launches the X-Ray Daemon and it listens to the default UDP bind address 127.0.0.1:2000 (Loopback address).
I require to make the daemon process listen to the public network (0.0.0.0:3000) and also want changes to the region and logging configuration. https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-configuration.html describes how this can be achieved. But I am facing the following issues:
1.) I am facing problems killing the X-Ray daemon on instance start up through the User Data script. pkill is not working for xray.
2.) I am unsure of how to start X-Ray daemon in the user data script as it is not as straight forward as executing the X-ray command to run in background mode i.e
/usr/bin/xray -c "/home/ec2-user/xray_config/daemon_config.yaml" &
will not work.
I am wondering if it would be possible to specify a configuration file during X-Ray daemon installation so that the default daemon process that kicks off after install is launched with the configuration parameters (UDP bind address etc) that I specify. Can anyone please help me with this?
Regards,
Edited by: shricloud on May 27, 2019 12:41 PM
Edited by: shricloud on May 27, 2019 12:42 PM