Amazon Linux 2 "No package sensu-go-agent available"

Hi,

I am unable to install sensu-go-agent on Amazon Linux 2. Here’s the OS related info:

NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

Commands used to install:

curl -s https://packagecloud.io/install/repositories/sensu/stable/script.rpm.sh | sudo bash
sudo yum install sensu-go-agent

Installation logs:

sudo yum install sensu-go-agent
Loaded plugins: priorities, update-motd, versionlock
amzn2-core                                                                               | 3.6 kB  00:00:00
amzn2extra-docker                                                                        | 2.9 kB  00:00:00
sensu_stable/x86_64/signature                                                            |  819 B  00:00:00
sensu_stable/x86_64/signature                                                            |  951 B  00:00:00 !!!
sensu_stable-source/signature                                                            |  819 B  00:00:00
sensu_stable-source/signature                                                            |  951 B  00:00:00 !!!
(1/5): amzn2-core/2/x86_64/group_gz                                                      | 2.7 kB  00:00:00
(2/5): amzn2-core/2/x86_64/updateinfo                                                    | 787 kB  00:00:00
(3/5): amzn2extra-docker/2/x86_64/updateinfo                                             |  14 kB  00:00:00
(4/5): amzn2extra-docker/2/x86_64/primary_db                                             | 106 kB  00:00:00
(5/5): amzn2-core/2/x86_64/primary_db                                                    |  70 MB  00:00:01
(1/2): sensu_stable/x86_64/primary                                                       |  175 B  00:00:00
(2/2): sensu_stable-source/primary                                                       |  175 B  00:00:00
No package sensu-go-agent available.
Error: Nothing to do

Any help is appreciated!

Hey @turkey_automation, :wave:

Amazon Linux 2 and Amazon Linux 2023 are not supported distros for Sensu Go, but if you’d like, I can add that as a feature request for future releases. In the meantime, if you look at the shell script, there is a note that will be helpful. I’ll include that here:

Unfortunately, your operating system distribution and version are not supported by this script.

You can override the OS detection by setting os= and dist= prior to running this script.
You can find a list of supported OSes and distributions on our website: https://packagecloud.io/docs#os_distro_version

For example, to force CentOS 6: os=el dist=6 ./script.sh

In the case of Amazon Linux 2, you should be able to run something like this:

  1. curl -s https://packagecloud.io/install/repositories/sensu/stable/script.rpm.sh?os=el&dist=7 | sudo bash
  2. sudo yum install sensu-go-agent

Let me know if that is helpful.

Best,

Justin