Is it possible to do a Sensu check for a server without having a Sensu client running on that server?

289 Views Asked by At

I'd like to configure checks in Sensu that don't go through a Sensu client.

I have an API that I can make calls to and get data for the servers I want to check.

However, all the research I've done only talks specifically about checks that are run with a Sensu client. I'm wondering if it's possible to still do a check but just call the API to get the results.

1

There are 1 best solutions below

0
Sufiyan Ghori On

You can use sensu standalone checks to send data to sensu server using sensu port.

for instance,

echo '{
  "client": {
    "name": "localhost",
    "address": "127.0.0.1"
  },
  "handlers": ["default"],
  "name": "check_name",
  "output": "error message",
  "status": 2
}' | nc -w1 sensu-server.example.com 3030

You can read more about how standone checks works here, https://www.antonlindstrom.com/2014/11/23/standalone-checks-with-sensu.html