Search code examples
redissensu

Sensu check results history


I need history of "output" attribute for one check, but exploring Redis i understand that Sensu stores complete results of check only for last check execution? And history of status codes, but it is not important for me now.

I have come with solution to create handler for check, which will add check results to Redis with timestamp as a key. And later have a script which extracts data from Redis.

Is there any simpler way to do this?

Thanks for help :)


Solution

  • Without using handlers, you could take a look at the output, return values, and get more information about the results, from the logs: /var/log/sensu/sensu-server.log. If you want to make something sophisticated, I think you need to use the API: https://sensuapp.org/docs/latest/api-results.

    The API /results/:client/:check (GET) returns "output": "WARNING Found 0 matching processes\n",