Coder Social home page Coder Social logo

event-exporter's Introduction

Event-exporter

Export Kubernetes' events to Elasticsearch/Kafka/HTTP Endpoint.

Inspired by https://github.com/GoogleCloudPlatform/k8s-stackdriver/tree/master/event-exporter .

Build and run

$ cat Makefile

How to config

Event exporter options:

Common options:

    -prometheus-endpoint string
        Endpoint on which to expose Prometheus http handler (default ":80")
    -resync-period duration
        Reflector resync period (default 1m0s)
    -sink string
        Sink name, now suported are Elasticsearch/Kafka/HTTP endpoint.
    -sink-opts string
        Parameters for selected output sinks
    -flush-delay duration
        Delay after receiving the first event in batch before sending the request to output sink(default 5s).
    -max-buffer-size int
        Maximum number of events in the request to output sink (default 1000).
    -max-concurrency int
        Maximum number of concurrent requests to output sink (default 1).

Elasticsearch

Options for Elasticsearch

Usage of Elasticsearch:
  -flush-delay duration
      Delay after receiving the first event in batch before sending the request to Stackdriver, if batchdoesn't get sent before (default 5s)
  -max-buffer-size int
      Maximum number of events in the request to Stackdriver (default 100)
  -max-concurrency int
      Maximum number of concurrent requests to Stackdriver (default 10)

Deploy on kubernetes

apiVersion: v1
kind: Service
metadata:
  name: event-exporter
  namespace: kube-system
spec:
  ports:
  - port: 80
    targetPort: 80
  selector:
    run: event-exporter
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    run: event-exporter
  name: event-exporter
  namespace: kube-system
spec:
  replicas: 1
  selector:
    matchLabels:
      run: event-exporter
  template:
    metadata:
      labels:
        run: event-exporter
    spec:
      containers:
      - image: liubin/event-exporter
        ports:
        - containerPort: 80 
        imagePullPolicy: Always
        name: event-exporter
        command: ["/event-exporter"]
        args: ["-v", "4"]
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      terminationGracePeriodSeconds: 30

event-exporter's People

Contributors

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