Skip to content

bjfish25/event-exporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Changes from fork

  • Added support for AWS v4 signing of elasticsearch
    • see github.com/sha1sum/aws_signing_client

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)

Proxy

Used with environment variables http_proxy/no_proxy

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

About

Export k8s' events

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.8%
  • Makefile 1.9%
  • Dockerfile 1.3%