Giter Site home page Giter Site logo

openshift-eventforwarder's Introduction

General idea

We at @SchweizerischeBundesbahnen need to host all the OpenShift events outside our OSE-cluster as it would flood our etcd datastore if we keep the events of all projects for more than one day. So this tools just attaches to the kubernetes API and logs all the events to console where they are grabbed and sent to our central logging environment.

Syslog forwarding

The standard mode for this applicaiton is to write to standard out. If you wish to send to Syslog instead, you can define SYSLOG_SERVER as an environment variable, and we will forward the logs the the syslog server instead of sending the events to the console/standard out. If you wish to send to both a syslog server as well as standard out, you can define the DEBUG environment variable and it will send to both standard out and the defined syslog server.

Installation

# Create a project & a service-account
oc project logging
oc create serviceaccount ose-eventforwarder

# Add a new role to your cluster-policy:
oc create -f deploy/clusterPolicy-forward.yaml

# Add the role to the service-account
oc adm policy add-cluster-role-to-user ose:eventforwarder system:serviceaccount:logging:ose-eventforwarder

# Deploy the new pod
oc create configmap forward-config \
    --from-literal=syslog.server=\<syslogserver\>:\<syslogport\> \
    --from-literal=syslog.tag=\<syslog tag\>
oc create -f deploy/deploymentConfig.yaml

Just create a 'oc new-app' from building the dockerfile or get it from here Dockerhub.

Parameters

Param Description Example
OPENSHIFT_API_URL Your OpenShift API Url https://master01.ch:8443
OPENSHIFT_TOKEN The token of the service-account
SYSLOG_SERVER The address and port of the target syslog server syslogserver.corp.net:514
SYSLOG_PROTO Select tcp or udp for protocol. Defaults to udp if not defined tcp
SYSLOG_TAG Tag to send to syslog identifying the source. Defaults to OSE if not defined OSE_CORP
DEBUG Set to send to both standardout and syslog server. Defaults to FALSE FALSE or TRUE
IGNORE_SSL Enable or disable SSL/TLS for the master api Defaults to FALSE

openshift-eventforwarder's People

Contributors

c0desurfer avatar retocode avatar xphyr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.