Add awslogs-agent support
Posted: Wed Feb 14, 2018 5:29 pm
Currently, it isn't possible to install the awslogs-agent on the OpenVPN Access Server (from AWS Marketplace). If I follow the documentation to install the agent on a Ubuntu server (https://docs.aws.amazon.com/de_de/Amazo ... tance.html) I can download the install script awslogs-agent-setup. However, when I run the script afterwards, I get the following error message:
This error is caused by this lines
The problem is the content of the file /etc/issue:
I don't think that Amazon adds "OpenVPN Access Server Appliance" as supported distribution. Is it possible to add Ubuntu at the beginning of /etc/issue?
Thank you in advance for your help in this matter.
Best regards
Sebastian Martinka
Code: Select all
root@openvpnas2:~# python ./awslogs-agent-setup.py --region eu-central-1
Launching interactive setup of CloudWatch Logs agent ...
ERROR: Failed to determine linux distribution. Exiting.
Code: Select all
def get_distro_info(self):
default_issue_file_path = "/etc/issue"
redhat_version_file_path = "/etc/redhat-release"
if os.path.isfile(redhat_version_file_path):
issue_file_path = redhat_version_file_path
elif os.path.isfile(default_issue_file_path):
issue_file_path = default_issue_file_path
else:
fail("Failed to determine linux distribution. Exiting.", PLATFORM_NOT_SUPPORTED)
# Support Amazon Linux, Ubuntu, CentOS, Debian, Raspbian and RHEL.
with open(issue_file_path, "r") as issue_file:
line = issue_file.readline()
if line.startswith("Amazon Linux AMI"):
return self.AmazonLinux
elif line.startswith("Ubuntu"):
return self.Ubuntu
elif line.startswith("Red Hat"):
return self.Rhel
elif line.startswith("CentOS"):
return self.CentOS
elif line.startswith("Raspbian"):
return self.Raspbian
elif line.startswith("Debian"):
return self.Debian
else:
fail("Failed to determine linux distribution. Exiting.", PLATFORM_NOT_SUPPORTED)
Code: Select all
root@openvpnas2:~# cat /etc/issue
OpenVPN Access Server Appliance 2.1.9 \n \l
Thank you in advance for your help in this matter.
Best regards
Sebastian Martinka