Sensu core 1.7 installation error

#1

Hi All,
Can you please help me with the below.
While installing sensu core 1.7 on CentOS7.10 box using yum command i am getting the below error.

Loaded plugins: fastestmirror, langpacks

File contains no section headers.
file: file:///etc/yum.repos.d/sensu.repo, line: 1
“echo '[sensu] \n”

i have created the below sensu repo as mentioned in the document.

echo ‘[sensu]
name=sensu
baseurl=https://sensu.global.ssl.fastly.net/yum/$releasever/$basearch/
gpgkey=https://repositories.sensuapp.org/yum/pubkey.gpg
gpgcheck=1
enabled=1’ | sudo tee /etc/yum.repos.d/sensu.repo

can you please help me with this issue.

#2

Hi @Mehra1984, welcome and thanks for posting about the issure you’re seeing installing Sensu via the repo command from the docs.

From the error, it looks like the echo command made it into your repo definition. Can you cat it out and confirm this is the case?

#3

Hi aaronsachs,

Still getting the same error after replacing echo with cat

[root@sensu-box ~]# yum install sensu
Loaded plugins: fastestmirror, langpacks

File contains no section headers.
file: file:///etc/yum.repos.d/sensu.repo, line: 1
“cat '[sensu] \n”

#4

Hi assronsachs,

Its working now, did some mistake while executing the command.
thanks for helping me on this :slightly_smiling_face: