GithubHelp home page GithubHelp logo

doytsujin / docker-sensu-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sstarcher/docker-sensu

0.0 2.0 0.0 85 KB

Dockerized Sensu - Client, Server, Api

License: MIT License

Shell 100.00%

docker-sensu-2's Introduction

Dockerized Sensu

This git repo provides Sensu in a Docker container.

Project: [https://github.com/sstarcher/docker-sensu] (https://github.com/sstarcher/docker-sensu)

Docker image: [https://registry.hub.docker.com/u/sstarcher/sensu/] (https://registry.hub.docker.com/u/sstarcher/sensu/)

Docker Registryย 

This is a base container for Sensu Core. It contains sensu-api, sensu-client, sensu-server, but does not contain any plugins.

Default configuration is to use redis as the transport. This allows us to not need rabbitmq.

This container can be configured to use runtime system information for checks and metrics from it's host.

Note

Installed plugins for now can change without warning. If you need a specific plugin installed either build a container based off of this one our use RUNTIME_INSTALL to ensure your plugins are installed.

Configuration

The client by default only loads files from /etc/sensu/conf.d.

The API by default loads files from:

  • /etc/sensu/conf.d
  • /etc/sensu/check.d

The server by default loads files from:

  • /etc/sensu/conf.d
  • /etc/sensu/check.d
  • /etc/sensu/handlers

These defaults could be configured via environment variables:

ENV CONFIG_DIR /etc/sensu/conf.d
ENV CHECK_DIR /etc/sensu/check.d
ENV HANDLERS_DIR /etc/sensu/handlers

If you want sensu-client to use runtime system information for checks and metrics from container's host system (not from sensu container itself) you should:

  1. Define volumes to access host's filesystem from sensu container :
/dev:/host_dev/:ro
/proc:/host_proc/:ro
/sys:/host_sys/:ro
  1. Redefine environment variables :
HOST_DEV_DIR: /host_dev
HOST_PROC_DIR: /host_proc
HOST_SYS_DIR: /host_sys

All Sensu plugins will be automatically configured to use these paths instead of default ones.

Dependencies:

  • Server
    • rabbitmq - If transport is redis this is not used
    • redis
    • api
  • Api
    • rabbitmq - If transport is redis this is not used
    • redis
  • Client
    • transport - rabbitmq or redis
RABBITMQ_PORT 5672
RABBITMQ_HOST rabbitmq
RABBITMQ_USER guest
RABBITMQ_PASSWORD guest
RABBITMQ_VHOST /
RABBITMQ_SSL_SUPPORT false
RABBITMQ_SSL_CERT ""
RABBITMQ_SSL_KEY ""

REDIS_HOST redis
REDIS_PORT 6379
REDIS_PASSWORD ""
REDIS_DB 0
REDIS_AUTO_RECONNECT true
REDIS_RECONNECT_ON_ERROR false

Client specific settings.

CLIENT_NAME *no default*
CLIENT_ADDRESS *no default*
CLIENT_SUBSCRIPTIONS all, default
CLIENT_KEEPALIVE_HANDLER default

Settings required for Server and API. Defaults to no username or password.

API_PORT 4567
API_BIND 0.0.0.0
API_HOST api
API_USER *no default*
API_PASSWORD *no default*

You can use docker-compose.yaml to run everything locally.

Multiple plugins will be installed in parallel. However, if fetching and compiling too many dependencies at the same time cause issues, set PARALLEL_INSTALLATION to 0.

If you want to keep the installed build tools and the apt cache, set UNINSTALL_BUILD_TOOLS to 0.

GEM_SOURCES can be used to add additional gem sources (such as https://ruby.taobao.org/ for China).

Runtime Installation

Due to build time errors and increased start time this is not recommend outside of testing.

RUNTIME_INSTALL will allow you to install additional plugins from github during runtime. The install format is USERNAME/repo@TAG. The default USERNAME is sensu-plugins and the default TAG is master. In place of a TAG a full git sha may be used.

Examples:

docker-sensu-2's People

Contributors

absolutejam avatar ajmath avatar alexjpaz avatar brendangibat avatar corfr avatar cwjohnston avatar drmurx avatar enkaskal avatar erikmack avatar erikmsw avatar gavinb-hpe avatar jmccarty3 avatar jpoizat avatar pm73 avatar sstarcher avatar xt99 avatar z0rc avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.