sstarcher / docker-sensu

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

Mounting check.d folder as volume deletes all check files on host #29

Closed ismarslomic closed 8 years ago

ismarslomic commented 8 years ago

Sensu Client compose-file looks like this:

version: '2'
services:
  client:
    command: client
    container_name: docker-sensu-client-prod
    image: sstarcher/sensu
    environment:
      CLIENT_NAME: testclient
      CLIENT_SUBSCRIPTIONS: os
      CLIENT_ADDRESS: 127.0.0.1
      RUNTIME_INSTALL: docker memory-checks
      REDIS_HOST: 192.168.99.100
      REDIS_PORT: 6379
      #REDIS_PASSWORD: ""
      #REDIS_DB: 0
      REDIS_AUTO_RECONNECT: "true"
      REDIS_RECONNECT_ON_ERROR: "true"
    volumes:
      - ./resources/check.d:/etc/sensu/check.d/
    ports:
      - '3030:3030'

Same place as the compose-file is placed I have folder named resources which contains check.d folder where all check files are placed. After running docker-compose up -d all files within ./resource/check.d are deleted.

sstarcher commented 8 years ago

That would be because of this line - https://github.com/sstarcher/docker-sensu/blob/master/bin/start#L26

We by default remove all checks from the client and assume they are coming from the server.

Are you attempting to use standalone checks?

ismarslomic commented 8 years ago

Oh, I see. No, Im running pub/sub so I don´t need to upload checks for clients as they are retrieved from server. Closing the issue.