Question regarding sensu architecture

Hi,

Would be great if somebody could clear my doubts about sensu architecture and as to how one can achieve what i have described below.

Lets say i have 2 volumes attached to a vm and when running the check-disk.rb script on it, it lists all the correct volumes along with the data (war,crit,ok based on the check).

Now what sensu creates in redis is a single key:value pair for the check with client-name:check-name in my case would be, (server1:check-disk)

With this if i want to get the execution history of say just vol1 out of the many listed in the script, it will not be available to get that unless i have a check-script for each volume on the server.

It may so happen that during the configuration of the infrastructure one may not know how many volumes or for that matter number of interfaces are connected to a particular sever, and if i want to be notified for each volume or interface how can i achieve that in sensu.

To continue on the same, is it possible to have something of the sort in sensu shown below (I walked through the code to understand a couple of things but couldn’t myself answer all of the questions) so that one could use to API to achieve something like this, /Datacenter1/production/webservers/webserver1 to get all the active events for that server.

Not sure if this is already in sensu or is it something which can be achieved by writing something customized like pluggable handlers/plugins etc in sensu or may be totally not supported as a part of the sensu architecture (which i don’t think is the case.)

Datacenter1

  • production (logical hierarchy)

  • webservers (logical hierarchy in sensu)

  • webserver1 (physical name / sensu-client)

  • some check1

  • some check2

  • webserver2

  • dbserver

  • dbserver1

  • some check1

  • some check2

  • dbserver2

  • some check1

  • some check2

Thanks,

Akshay

Sensu doesn't know anything about this and should not.
You should use a configuration management tool such as Puppet or Chef
to configure sensu on the fly with the configuration of your checks.

But the hierarchy will not be embedded in the sensu api or check data,
you will have to craft tools around that to say "get production
alerts". (or just search "production" in uchiwa)
I find this easier to do with either sensu's subscriptions or use
arbitrary key-value pairs in the json.
http://sensuapp.org/docs/latest/clients#example-sensu-client-data
http://sensuapp.org/docs/latest/checks#custom-check-definition-key-values

···

On Wed, Apr 1, 2015 at 4:27 PM, Akshay Kapoor <akshay.anilkapoor@gmail.com> wrote:

Hi,

Would be great if somebody could clear my doubts about sensu architecture
and as to how one can achieve what i have described below.

Lets say i have 2 volumes attached to a vm and when running the
check-disk.rb script on it, it lists all the correct volumes along with the
data (war,crit,ok based on the check).

Now what sensu creates in redis is a single key:value pair for the check
with <client-name:check-name> in my case would be, (server1:check-disk)

With this if i want to get the execution history of say just vol1 out of the
many listed in the script, it will not be available to get that unless i
have a check-script for each volume on the server.

It may so happen that during the configuration of the infrastructure one may
not know how many volumes or for that matter number of interfaces are
connected to a particular sever, and if i want to be notified for each
volume or interface how can i achieve that in sensu.

To continue on the same, is it possible to have something of the sort in
sensu shown below (I walked through the code to understand a couple of
things but couldn't myself answer all of the questions) so that one could
use to API to achieve something like this,
/Datacenter1/production/webservers/webserver1 to get all the active events
for that server.

Not sure if this is already in sensu or is it something which can be
achieved by writing something customized like pluggable handlers/plugins etc
in sensu or may be totally not supported as a part of the sensu architecture
(which i don't think is the case.)

Datacenter1
    - production (logical hierarchy)
       - webservers (logical hierarchy in sensu)
           - webserver1 (physical name / sensu-client)
               - some check1
               - some check2
           - webserver2
     - dbserver
           - dbserver1
               - some check1
               - some check2
           - dbserver2
               - some check1
               - some check2

Thanks,
Akshay