About AWS SES handler

Hi there.

I’m trying to use SES as a handler for my checks. I’ve a SNS handler working normally now, and I want to add a SES one.

Thing is it’s not working and sensu doesn’t even see it.

  • check

/sensu/conf.d/check_ntp.json

{

"checks": {

    "check_ntp": {

        "handlers": [ "sns" , "mailer-ses" ],

        "command": "/etc/sensu/plugins/check_ntp_time -H [pool.ntp.org](http://pool.ntp.org) -w 30 -c 60",

        "interval": 60,

        "occurrences": 5,

        "refresh": 1800,

        "flapping": true,

        "subscribers": [ "server-01" ]

    }

}

}

  • handler

/sensu/conf.d/handler_ses.json

{

"handlers": {

    "mailer-ses": {

        "type": "pipe",

        "command": "/etc/sensu/handlers/ses.rb",

    }

}

}

/sensu/conf.d/mailer-ses.json

{

“mailer-ses”: {

“mail_from”: “sensu@domain”,

“mail_to”: “mi_account@domain”,

“aws_access_key”: “my_aws_access_key”,

“aws_secret_key”: “my_aws_secret_key”

}

}

(The values replaced are the correct ones, as seen in my SES AWS console).

  • and the .rb

/sensu/handlers/mailer-ses.rb

In /var/log/sensu/sensu-server.log it’s not mentioned that this check has a mailer-ses handler, just a sns handler.

Is anything wrong with this configuration?

Thanks!!

···


Mariano Gabriel González

Hi there.
I'm trying to use SES as a handler for my checks. I've a SNS handler working normally now, and I want to add a SES one.

Thing is it's not working and sensu doesn't even see it.

My first guess would be that sensu does not have permissions to read the json file with sns handler defined

···

On 12/04/2013 11:05 PM, Mariano Gonz�lez wrote:

- check

/sensu/conf.d/check_ntp.json

{
    "checks": {
    "check_ntp": {
        "handlers": [ "sns" , "mailer-ses" ],
        "command": "/etc/sensu/plugins/check_ntp_time -H pool.ntp.org <http://pool.ntp.org> -w 30 -c 60",
            "interval": 60,
        "occurrences": 5,
        "refresh": 1800,
        "flapping": true,
        "subscribers": [ "server-01" ]
    }
}

- handler

/sensu/conf.d/handler_ses.json

{
"handlers": {
    "mailer-ses": {
        "type": "pipe",
        "command": "/etc/sensu/handlers/ses.rb",
    }
}

/sensu/conf.d/mailer-ses.json

{
  "mailer-ses": {
    "mail_from": "sensu@domain",
    "mail_to": "mi_account@domain",
    "aws_access_key": "my_aws_access_key",
    "aws_secret_key": "my_aws_secret_key"
  }
}

(The values replaced are the correct ones, as seen in my SES AWS console).

- and the .rb

/sensu/handlers/mailer-ses.rb

In /var/log/sensu/sensu-server.log it's not mentioned that this check has a mailer-ses handler, just a sns handler.

Is anything wrong with this configuration?
Thanks!!

--
Mariano Gabriel Gonz�lez

Hi. This message came as a spam in my inbox. I’m not sure if it’s correct, but please send it again as I cannot read it. Thanks!!

···

El jueves, 5 de diciembre de 2013 15:43:13 UTC-3, Alexander Piavlo escribió:

On 12/04/2013 11:05 PM, Mariano Gonz�lez wrote:

Hi there.
I’m trying to use SES as a handler for my checks. I’ve a SNS handler
working normally now, and I want to add a SES one.

Thing is it’s not working and sensu doesn’t even see it.
My first guess would be that sensu does not have permissions to read the
json file with sns handler defined

  • check

/sensu/conf.d/check_ntp.json

{
“checks”: {
“check_ntp”: {
“handlers”: [ “sns” , “mailer-ses” ],
“command”: "/etc/sensu/plugins/check_ntp_time -H pool.ntp.org

<http://pool.ntp.org> -w 30 -c 60",
“interval”: 60,
“occurrences”: 5,
“refresh”: 1800,
“flapping”: true,
“subscribers”: [ “server-01” ]
}
}
}

  • handler

/sensu/conf.d/handler_ses.json

{
“handlers”: {
“mailer-ses”: {
“type”: “pipe”,
“command”: “/etc/sensu/handlers/ses.rb”,
}
}
}

/sensu/conf.d/mailer-ses.json

{
“mailer-ses”: {
“mail_from”: “sensu@domain”,
“mail_to”: “mi_account@domain”,
“aws_access_key”: “my_aws_access_key”,
“aws_secret_key”: “my_aws_secret_key”
}
}

(The values replaced are the correct ones, as seen in my SES AWS console).

  • and the .rb

/sensu/handlers/mailer-ses.rb

In /var/log/sensu/sensu-server.log it’s not mentioned that this check
has a mailer-ses handler, just a sns handler.

Is anything wrong with this configuration?
Thanks!!


Mariano Gabriel Gonz�lez

Sorry, I’ve missed your answer. I’ve checked and all .json and .rb files have 755 permissions.

···

El miércoles, 4 de diciembre de 2013 18:05:06 UTC-3, Mariano González escribió:

Hi there.

I’m trying to use SES as a handler for my checks. I’ve a SNS handler working normally now, and I want to add a SES one.

Thing is it’s not working and sensu doesn’t even see it.

  • check

/sensu/conf.d/check_ntp.json

{

"checks": {
    "check_ntp": {
        "handlers": [ "sns" , "mailer-ses" ],
        "command": "/etc/sensu/plugins/check_ntp_time -H [pool.ntp.org](http://pool.ntp.org) -w 30 -c 60",
        "interval": 60,
        "occurrences": 5,
        "refresh": 1800,
        "flapping": true,
        "subscribers": [ "server-01" ]
    }
}

}

  • handler

/sensu/conf.d/handler_ses.json

{

"handlers": {
    "mailer-ses": {
        "type": "pipe",
        "command": "/etc/sensu/handlers/ses.rb",
    }
}

}

/sensu/conf.d/mailer-ses.json

{

“mailer-ses”: {

“mail_from”: “sensu@domain”,

“mail_to”: “mi_account@domain”,

“aws_access_key”: “my_aws_access_key”,

“aws_secret_key”: “my_aws_secret_key”

}

}

(The values replaced are the correct ones, as seen in my SES AWS console).

  • and the .rb

/sensu/handlers/mailer-ses.rb

In /var/log/sensu/sensu-server.log it’s not mentioned that this check has a mailer-ses handler, just a sns handler.

Is anything wrong with this configuration?

Thanks!!


Mariano Gabriel González