Chef setup questions

I’m trying to use the sensu-chef cookbook to setup a demo server and client. I’ve successfully deployed redis, rabbitmq and sensu to the demo server and sensu client (with a hand written sensu client json). Both the server and the client seem to be running happily but the client doesn’t seem to be checking in with the server. They’re both running CentOS VMs on AWS with open security groups (within a VPC). I installed the sensu-plugins plugin gem on the demo client machine and hand created a client.json (for now) for testing.

“”"

gem list sensu-plugin

*** LOCAL GEMS ***

sensu-plugin (0.1.7)

cat client.json

{

“client”: {

“name”: “sensu-test-client”,

“address”: “10.252.4.27”,

“subscriptions”: [

“test”,

“webservers”

]

}

}

“”"

On the server, I have a check_cron.json:

“”"

cat check_cron.json

{

“checks”: {

“cron_check”: {

“handlers”: [“default”],

“command”: "/etc/sensu/plugins/check-procs.rb -p crond -C 1 ",

“interval”: 60,

“subscribers”: [ “webservers” ]

}

}

}

“”"

I’m obviously missing something, perhaps something I overlooked in the docs, but I can’t seem to get the server and the client talking and nothing shows on the dashboard. I’ve tried setting the host parameter to localhost (127.0.0.1) in the client.json on the client machine as well (which is the default) and no dice. Can someone point out what I’m doing wrong and/or where the supporting docs are? I’m really hoping to replace Nagios as soon as possible, so hopefully this is something trivial that I’ve missed.

Hi Tucker,

So all of the Sensu services are on the one host, and they are all happily communicating with RabbitMQ? Perhaps you need to restart the Sensu server to reload the configs?

Sean.

···

On Sun, Sep 15, 2013 at 1:18 AM, Tucker DeWitt tucker@altiscale.com wrote:

I’m trying to use the sensu-chef cookbook to setup a demo server and client. I’ve successfully deployed redis, rabbitmq and sensu to the demo server and sensu client (with a hand written sensu client json). Both the server and the client seem to be running happily but the client doesn’t seem to be checking in with the server. They’re both running CentOS VMs on AWS with open security groups (within a VPC). I installed the sensu-plugins plugin gem on the demo client machine and hand created a client.json (for now) for testing.

“”"

gem list sensu-plugin

*** LOCAL GEMS ***

sensu-plugin (0.1.7)

cat client.json

{

“client”: {

“name”: “sensu-test-client”,

“address”: “10.252.4.27”,

“subscriptions”: [

“test”,

“webservers”

]

}

}

“”"

On the server, I have a check_cron.json:

“”"

cat check_cron.json

{

“checks”: {

“cron_check”: {

“handlers”: [“default”],

“command”: "/etc/sensu/plugins/check-procs.rb -p crond -C 1 ",

“interval”: 60,

“subscribers”: [ “webservers” ]

}

}

}

“”"

I’m obviously missing something, perhaps something I overlooked in the docs, but I can’t seem to get the server and the client talking and nothing shows on the dashboard. I’ve tried setting the host parameter to localhost (127.0.0.1) in the client.json on the client machine as well (which is the default) and no dice. Can someone point out what I’m doing wrong and/or where the supporting docs are? I’m really hoping to replace Nagios as soon as possible, so hopefully this is something trivial that I’ve missed.

I think it was an issue with too much info in the config.json on the client node. I trimmed it down to only containing info about rabbitmq and then it seemed to work (once I cleaned up the other messes I’d made). One odd thing though: The dashboard and I assume the server itself, was reflecting an old subscription (webservers, since I was following a guide) and not the one I was using at the end (test).

Someone in the IRC channel (you?) asked me a question though that I think is putting me on the right path. I missed the line about the sensu-chef cookbook being a helped cookbook and not something I should be running directly. I looked at your chef cookbook and it makes more sens now. I’m going to whip up a quick cookbook to work with what I need an continue with my testing.

Thanks for your help.

···

On Tue, Sep 17, 2013 at 9:49 AM, Sean Porter portertech@gmail.com wrote:

Hi Tucker,

So all of the Sensu services are on the one host, and they are all happily communicating with RabbitMQ? Perhaps you need to restart the Sensu server to reload the configs?

Sean.

–Tucker

On Sun, Sep 15, 2013 at 1:18 AM, Tucker DeWitt tucker@altiscale.com wrote:

I’m trying to use the sensu-chef cookbook to setup a demo server and client. I’ve successfully deployed redis, rabbitmq and sensu to the demo server and sensu client (with a hand written sensu client json). Both the server and the client seem to be running happily but the client doesn’t seem to be checking in with the server. They’re both running CentOS VMs on AWS with open security groups (within a VPC). I installed the sensu-plugins plugin gem on the demo client machine and hand created a client.json (for now) for testing.

“”"

gem list sensu-plugin

*** LOCAL GEMS ***

sensu-plugin (0.1.7)

cat client.json

{

“client”: {

“name”: “sensu-test-client”,

“address”: “10.252.4.27”,

“subscriptions”: [

“test”,

“webservers”

]

}

}

“”"

On the server, I have a check_cron.json:

“”"

cat check_cron.json

{

“checks”: {

“cron_check”: {

“handlers”: [“default”],

“command”: "/etc/sensu/plugins/check-procs.rb -p crond -C 1 ",

“interval”: 60,

“subscribers”: [ “webservers” ]

}

}

}

“”"

I’m obviously missing something, perhaps something I overlooked in the docs, but I can’t seem to get the server and the client talking and nothing shows on the dashboard. I’ve tried setting the host parameter to localhost (127.0.0.1) in the client.json on the client machine as well (which is the default) and no dice. Can someone point out what I’m doing wrong and/or where the supporting docs are? I’m really hoping to replace Nagios as soon as possible, so hopefully this is something trivial that I’ve missed.