Page 1 of 1

Add awslogs-agent support

Posted: Wed Feb 14, 2018 5:29 pm
by Mortinke
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 ( ... tance.html) I can download the install script awslogs-agent-setup. However, when I run the script afterwards, I get the following error message:

Code: Select all

root@openvpnas2:~# python ./ --region eu-central-1
Launching interactive setup of CloudWatch Logs agent ...
ERROR: Failed to determine linux distribution. Exiting.
This error is caused by this lines

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
            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
                fail("Failed to determine linux distribution. Exiting.", PLATFORM_NOT_SUPPORTED)
The problem is the content of the file /etc/issue:

Code: Select all

root@openvpnas2:~# cat /etc/issue
OpenVPN Access Server Appliance 2.1.9 \n \l
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