sstarcher / docker-sensu

Dockerized Sensu - Client, Server, Api
MIT License
103 stars 72 forks source link

Checks are not being registered #24

Closed tomwadeson closed 8 years ago

tomwadeson commented 8 years ago

docker-compose.yml contents:

api:
  image: sstarcher/sensu
  command: api
  links:
    - rabbitmq
    - redis

server:
  image: sstarcher/sensu
  command: server
  volumes:
   - './checks:/etc/sensu/check.d/'
  links:
    - rabbitmq
    - redis
    - api

client:
  image: sstarcher/sensu
  command: client
  environment:
    CLIENT_NAME: qa-poker
    CLIENT_ADDRESS: '127.0.0.1'
    CLIENT_SUBSCRIPTIONS: test
    RUNTIME_INSTALL: http
  links:
    - rabbitmq

uchiwa:
  image: sstarcher/uchiwa
  links:
    - api:sensu
  ports:
    - '80:3000'

rabbitmq:
  image: rabbitmq:3.5-management

redis:
  image: redis

I can confirm that my check makes it into the server's /etc/sensu/check.d directory and is picked up:

server_1    | {"timestamp":"2016-05-25T13:51:05.507991+0000","level":"warn","message":"config file applied changes","file":"/etc/sensu/check.d/check-sensu-website.json","changes":{"checks":{"sensu-website":[null,{"command":"check-http.rb -u https://sensuapp.org","subscribers":["test"],"interval":10}]}}}

But it's invisible to the API:

root@d3177012135b:/# curl -s http://api:4567/clients

[{"socket":{"bind":"127.0.0.0","port":3030},"name":"qa-poker","address":"127.0.0.1","subscriptions":["test"],"keepalive":{"handler":"default"},"version":"0.23.2","timestamp":1464184889}]

root@d3177012135b:/# curl -s http://api:4567/checks
[]root@d3177012135b:/#
sstarcher commented 8 years ago

@tomwadeson The sensu api must also have the sensu checks mounted into it's volume. Sensu API does not pull the checks from the server they must be duplicated if the server and api are run separately.