How To Set up Sensu on CentOS 7

How To Set up Sensu on CentOS 7


Linux Articles / All 93 Views comments

How to Install Sensu on CentOS 7

On this tutorial, we will probably be putting in Sensu on a CentOS 7 VPS. We will even present you methods to set it up, that means you can begin utilizing it instantly.

Sensu is a complete multi-cloud monitoring answer for in depth monitoring of companies’ IT infrastructure. Sensu consists of a backend, whereby all knowledge will probably be gathered and checked, and an agent, which can act because the shopper host that sends checks/requests to the backend for processing.

Installing Sensu on CentOS 7

A few of Sensu’s key options are the next:

  • Automated workflow monitoring
  • Quick incident response and alert notifications
  • Help for accumulating and storing industry-standard metrics
  • A built-in command line device (sensuctl)
  • Up-to-date API and trendy dashboard interface included by default

When you comply with this information on easy methods to set up Sensu on CentOS 7 appropriately, the set up course of gained’t take greater than 10-15 minutes. let’s get began.

Desk of Contents


For this tutorial, we advocate utilizing a public dealing with server with a newly put in CentOS 7 Server.

It's best to be sure that the server has met the next minimal hardware specs for each the Sensu backend and agent:

Backend Minimal Hardware Necessities:

  • 64-bit CPU with Four cores
  • Four GB of RAM
  • Four GB of free disk area

Backend Beneficial Hardware Necessities:

  • 64-bit CPU with eight cores
  • eight GB of RAM
  • SSD or NVMe storage

Agent Minimal Hardware Necessities:

  • 386, amd64, or ARM CPU (armv5 minimal)
  • 128 MB RAM

Agent Beneficial Hardware Necessities:

  • Four-core amd64 or ARMv8 CPU
  • 512MB RAM

Because the Sensu backend is predicted to course of a number of collection of checks from a number of brokers at a time, a CPU with extra cores can be useful, as Sensu is developed to course of checks in parallel. Storage with quick learn and write velocity is appropriate to enhance the method time of hundreds of checks. NVMe storage is the prompt storage disk sort, as it's evidently capable of present virtually 10x quicker learn and write speeds than typical SSDs.

Step 1: Putting in Updates and Dependencies

Hook up with your publicly out there server by way of SSH utilizing the next instructions in your most popular terminal:

ssh [username]@[server_ip_address]

Exchange “[username] ” with the account identify of a root-enabled consumer (or the basis consumer itself), and exchange “[server_ip_address]” with the general public IP handle of your server.

Earlier than continuing with the set up, we should replace the packages to their current secure variations, if there are any:

yum replace -y

We additionally recommend putting in EPEL and the essential dependencies of CentOS 7 to keep away from having a lacking dependencies/libraries dilemma throughout set up:

yum set up epel-release -y
yum groupinstall -y "Improvement Instruments"

Sensu Go: The Way forward for Sensu

As of writing, the newest secure model of Sensu is Sensu Go v5.5. Please observe that the Sensu builders have determined to finish help on December 31, 2019 for the unique variations of Sensu (Core and Enterprise) to concentrate on this newer model, which offers portability, ease-of-deployment, and a extra pleasant strategy to totally different environments. To study extra about these necessary modifications, you might verify their official announcement here.

Step 2: Putting in And Setting Up The Sensu Backend

To proceed with the set up, we might want to add the official repository from Sensu Go to our CentOS 7 set up.

curl -s up/repositories/sensu/secure/ | sudo bash

After efficiently including the repository, we will now transfer ahead by putting in the official backend package deal:

yum set up sensu-go-backend -y

As soon as put in, we might want to copy the pattern YML configuration file to the default backend configuration path.

cp /usr/share/doc/ /and so forth/sensu/backend.yml

We will now initialize the backend service by typing:

systemctl begin sensu-backend

We will affirm that the backend service is operating utilizing this command:

systemctl standing sensu-backend

● sensu-backend.service - The Sensu Backend service.
Loaded: loaded (/usr/lib/systemd/system/sensu-backend.service; disabled; vendor preset: disabled)
Lively: lively (operating) since Thu 2019-04-12 17:54:22 CDT; 2s in the past
Primary PID: 1823 (sensu-backend)
CGroup: /system.slice/sensu-backend.service
└─1823 /usr/sbin/sensu-backend begin -c /and so forth/sensu/backend.yml>/code>

Let’s ensure that the service will routinely begin at boot.

systemctl allow sensu-backend

Step three: Putting in And Setting Up The Sensu Agent

For ease-of-explanation on this tutorial, we can be utilizing just one server for backend and agent – and sure, it's attainable to watch the server itself.

Since we have already got the official Sensu repository put in by now, we will use this one-line command to put in the agent.

yum set up sensu-go-agent -y

As soon as put in, copy the instance agent configuration file to the default agent configuration path.

cp /usr/share/doc/ /and so forth/sensu/agent.yml

We will now begin the agent service by typing:

systemctl begin sensu-agent

Confirm that the agent service is operating utilizing:

systemctl standing sensu-agent

● sensu-agent.service - The Sensu Agent course of.
Loaded: loaded (/usr/lib/systemd/system/sensu-agent.service; disabled; vendor preset: disabled)
Lively: lively (operating) since Thu 2019-04-11 20:01:35 CDT; 7s in the past
Fundamental PID: 16926 (sensu-agent)
CGroup: /system.slice/sensu-agent.service
└─16926 /usr/sbin/sensu-agent begin

Allow automated begin by operating:

systemctl allow sensu-agent

Putting in and Setting Up sensuctl

One of many key modifications for Sensu Go is the introduction of Sensuctl CLI – a strong command line software used to handle Sensu with out the necessity of dashboard.

To put in, provide the next command in your terminal:

yum set up sensu-go-cli -y

After a profitable set up, we first have to provoke the essential preliminary configuration:

sensuctl configure

It's going to immediate us with some questions. Observe that the default username and password for Sensu backend is admin and [email protected]!, respectively.

? Sensu Backend URL:
? Username: admin
? Password: [email protected]!
? Namespace: default
? Most popular output format: tabular

It's extremely really helpful to vary the default password for the Sensu back-end. You might achieve this by typing:

sensuctl consumer change-password --interactive

? Present Password: *********
? New Password: **************
? Affirm Password: **************
Up to date

Confirm that sensuctl is working by checking the monitored entities and occasion listing:

sensuctl entity listing
sensuctl occasion listing

Accessing Sensu Go Dashboard

You might now entry your Sensu dashboard by logging-in to http://[Server Public IP]:3000

Previous variations of Sensu Go depend on the third-party dashboard like Uchiwa. With this main launch from the Sensu group, they now have included their very own trendy dashboard interface. After logging in, you must see virtually the identical dashboard particulars.

That’s it! – you now have the newest model of the Sensu monitoring server in your CentOS 7 server.

Install Sensu on CentOS 7Of course, you don’t should set up Sensu on CentOS 7 if in case you have a Managed CentOS VPS with us. In that case, you possibly can merely ask our help workforce to put in Sensu on CentOS 7 for you. They're out there 24/7, and they are going to be in a position that will help you with the set up.

PS. For those who loved studying this weblog submit on tips on how to set up Sensu on CentOS 7, be happy to share it on social networks through the use of the shortcuts under, or just depart a remark within the feedback part. Thanks.