What is the best practice to separate uat and prod checks?


#1

Hi,

What is the best way to separate check messages from uat and prod system? I want to keep the client side as simple as possible and hence I would like to use the same set of json and plugin files.

I want the filtering to happen on the sensu server such that uat notification will be sent to different destinations.

Any suggestion is welcome

Cheers, Tony


#2

Tony,

It sounds like you want to ensure that your two different sets of
checks are similar, but notify different groups?
You could do this with duplicate handler definitions and have the
checks emit to those different handlers? (one set of handlers for uat,
one for prod?)

···

On Tue, Mar 10, 2015 at 11:14 PM, Anthony Kong <anthony.hw.kong@gmail.com> wrote:

Hi,

What is the best way to separate check messages from uat and prod system? I
want to keep the client side as simple as possible and hence I would like to
use the same set of json and plugin files.

I want the filtering to happen on the sensu server such that uat
notification will be sent to different destinations.

Any suggestion is welcome

Cheers, Tony


#3

But then does it mean I have to make the changes on the client side?

e.g. one set of json use handler 'default-uat' and another set of json use
handler 'default-prod'?

I would like to centralise the control on the sensu server

Cheers

···

On Thu, Mar 12, 2015 at 1:08 AM, Kyle Anderson <kyle@xkyle.com> wrote:

Tony,

It sounds like you want to ensure that your two different sets of
checks are similar, but notify different groups?
You could do this with duplicate handler definitions and have the
checks emit to those different handlers? (one set of handlers for uat,
one for prod?)

On Tue, Mar 10, 2015 at 11:14 PM, Anthony Kong > <anthony.hw.kong@gmail.com> wrote:
> Hi,
>
> What is the best way to separate check messages from uat and prod
system? I
> want to keep the client side as simple as possible and hence I would
like to
> use the same set of json and plugin files.
>
> I want the filtering to happen on the sensu server such that uat
> notification will be sent to different destinations.
>
> Any suggestion is welcome
>
> Cheers, Tony


#4

Hmm, yea in that case you will have to duplicate your check name and
definitions on the server, but you can use the same subscription
groups. You can use the same plugins.
Or just adjust or use your handlers in a multi-distribution way? For
example the stock email handler can take a comma separated list of
destinations?

···

On Wed, Mar 11, 2015 at 4:17 PM, Anthony Kong <anthony.hw.kong@gmail.com> wrote:

But then does it mean I have to make the changes on the client side?

e.g. one set of json use handler 'default-uat' and another set of json use
handler 'default-prod'?

I would like to centralise the control on the sensu server

Cheers

On Thu, Mar 12, 2015 at 1:08 AM, Kyle Anderson <kyle@xkyle.com> wrote:

Tony,

It sounds like you want to ensure that your two different sets of
checks are similar, but notify different groups?
You could do this with duplicate handler definitions and have the
checks emit to those different handlers? (one set of handlers for uat,
one for prod?)

On Tue, Mar 10, 2015 at 11:14 PM, Anthony Kong >> <anthony.hw.kong@gmail.com> wrote:
> Hi,
>
> What is the best way to separate check messages from uat and prod
> system? I
> want to keep the client side as simple as possible and hence I would
> like to
> use the same set of json and plugin files.
>
> I want the filtering to happen on the sensu server such that uat
> notification will be sent to different destinations.
>
> Any suggestion is welcome
>
> Cheers, Tony


#5

It is possible for you to provide some url/pointer to such example? I have tried to google keywords like ‘subscription group’ or ‘multi-distribution’ but I got a lot of noise in the search result.

···

On Thu, Mar 12, 2015 at 2:29 PM, Kyle Anderson kyle@xkyle.com wrote:

Hmm, yea in that case you will have to duplicate your check name and

definitions on the server, but you can use the same subscription

groups. You can use the same plugins.

Or just adjust or use your handlers in a multi-distribution way? For

example the stock email handler can take a comma separated list of

destinations?

On Wed, Mar 11, 2015 at 4:17 PM, Anthony Kong anthony.hw.kong@gmail.com wrote:

But then does it mean I have to make the changes on the client side?

e.g. one set of json use handler ‘default-uat’ and another set of json use

handler ‘default-prod’?

I would like to centralise the control on the sensu server

Cheers

On Thu, Mar 12, 2015 at 1:08 AM, Kyle Anderson kyle@xkyle.com wrote:

Tony,

It sounds like you want to ensure that your two different sets of

checks are similar, but notify different groups?

You could do this with duplicate handler definitions and have the

checks emit to those different handlers? (one set of handlers for uat,

one for prod?)

On Tue, Mar 10, 2015 at 11:14 PM, Anthony Kong

anthony.hw.kong@gmail.com wrote:

Hi,

What is the best way to separate check messages from uat and prod

system? I

want to keep the client side as simple as possible and hence I would

like to

use the same set of json and plugin files.

I want the filtering to happen on the sensu server such that uat

notification will be sent to different destinations.

Any suggestion is welcome

Cheers, Tony

Tony Kong

blog: www.ahwkong.com

linkedin: www.linkedin.com/in/anthonykong

Don’t EVER make the mistake that you can design something better than what you get from ruthless massively parallel trial-and-error with a feedback cycle. That’s giving your intelligence much too much credit.

  • Linus Torvalds

#6

Yes the docs are not super clear I guess, here is the first mention of
subscriptions:
http://sensuapp.org/docs/0.16/adding_a_check#subscribe-the-client-to-the-check

With safe-mode off, you can have all your configuration on the
server-side, and the clients just need to declare their subscriptions
(webserver, etc).

Then on the server you can declare whatever you want, including
multiple handlers, or not, or whatever.
Or you could do check-http-uat => subcribers: ['uat-webservers'], etc.

I also super-highly recommend using a configuration management tool to
help do this for you in a programmatic way.

···

On Wed, Mar 11, 2015 at 10:14 PM, Anthony Kong <anthony.hw.kong@gmail.com> wrote:

It is possible for you to provide some url/pointer to such example? I have
tried to google keywords like 'subscription group' or 'multi-distribution'
but I got a lot of noise in the search result.

Tony Kong
blog: www.ahwkong.com
linkedin: www.linkedin.com/in/anthonykong

Don’t EVER make the mistake that you can design something better than what
you get from ruthless massively parallel trial-and-error with a feedback
cycle. That’s giving your intelligence much too much credit.

- Linus Torvalds

On Thu, Mar 12, 2015 at 2:29 PM, Kyle Anderson <kyle@xkyle.com> wrote:

Hmm, yea in that case you will have to duplicate your check name and
definitions on the server, but you can use the same subscription
groups. You can use the same plugins.
Or just adjust or use your handlers in a multi-distribution way? For
example the stock email handler can take a comma separated list of
destinations?

On Wed, Mar 11, 2015 at 4:17 PM, Anthony Kong <anthony.hw.kong@gmail.com> >> wrote:
>
> But then does it mean I have to make the changes on the client side?
>
> e.g. one set of json use handler 'default-uat' and another set of json
> use
> handler 'default-prod'?
>
> I would like to centralise the control on the sensu server
>
> Cheers
>
>
> On Thu, Mar 12, 2015 at 1:08 AM, Kyle Anderson <kyle@xkyle.com> wrote:
>>
>> Tony,
>>
>> It sounds like you want to ensure that your two different sets of
>> checks are similar, but notify different groups?
>> You could do this with duplicate handler definitions and have the
>> checks emit to those different handlers? (one set of handlers for uat,
>> one for prod?)
>>
>> On Tue, Mar 10, 2015 at 11:14 PM, Anthony Kong >> >> <anthony.hw.kong@gmail.com> wrote:
>> > Hi,
>> >
>> > What is the best way to separate check messages from uat and prod
>> > system? I
>> > want to keep the client side as simple as possible and hence I would
>> > like to
>> > use the same set of json and plugin files.
>> >
>> > I want the filtering to happen on the sensu server such that uat
>> > notification will be sent to different destinations.
>> >
>> > Any suggestion is welcome
>> >
>> > Cheers, Tony
>
>