108 Commits
Author SHA1 Message Date
Mustafa Akın bad127009b Release version 0.9 v0.9 2020-08-22 18:36:13 +03:00
Mustafa Akin 1d2f3cc0ef Big Query Readme 2020-08-22 18:26:06 +03:00
Mustafa Akin f6a8e09c0d Type support added for Elasticsearch 6 and lower. Fixes #77 2020-08-22 17:38:58 +03:00
Mustafa Akin fb763662cf Go mod vendor for bigquery libs 2020-08-22 17:24:25 +03:00
Mustafa Akın 1139c6f5c6 Merge pull request #69 from vsbus/victor/bq-try3
BigQuerySink
2020-08-22 17:21:47 +03:00
Mustafa Akın fad531f01e Merge pull request #79 from ivilimon/patch-1
Fix label matching bug
2020-08-22 15:48:20 +03:00
Mustafa Akın 2997c0ce02 Merge pull request #72 from sshishov/ss/fix_webhook_response_check
Fix comparison and use proper error message in webhook response
2020-08-22 15:45:39 +03:00
Mustafa Akın 81d2220f05 Merge pull request #71 from Showmax/fix_opsgenie_priority
Fix setting alert priority in OpsGenie sink
2020-08-22 15:45:07 +03:00
Ivana Vilimonovic 28bf293b9f add test for label regex 2020-08-14 18:31:31 -04:00
ivana f1c7400493 Fix label matching bug
Use the configured label value as the regex pattern. Currently it is trying to match the value from the config using the object's label as the pattern, which is incorrect. See also the Annotations matching below which is doing it correctly.
2020-08-14 18:07:40 -04:00
Sergei Shishov b3f99e354c Fix comparison and use proper error message 2020-07-28 13:05:39 +04:00
Jiri Brunclik 471d52de78 Fix setting alert priority in OpsGenie sink 2020-07-24 13:58:58 +02:00
Viktor Barinov 480bbc57a5 go-mod-sum 2020-07-21 16:48:35 -07:00
Ubuntu 9f08e0d6ad big Query Sink 2020-07-21 16:44:09 -07:00
Ubuntu 519e4c2d78 mg 2020-07-09 02:03:18 +00:00
Ubuntu 5769a36640 init-draft 2020-07-09 01:29:40 +00:00
Mustafa Akın 8a6aaabc41 Add stdout example #59 2020-07-03 15:55:08 +03:00
Mustafa Akın e868790b7c Merge pull request #60 from mrueg/filename
Fix typos in filename
2020-07-03 15:52:34 +03:00
Manuel Rüger 6468760f2d pkg/sinks/receiver.go: Fix typo in filename 2020-07-02 15:09:54 +02:00
Manuel Rüger bd348fbdb4 pkg/exporter/receivers.go: Fix typo in filename 2020-07-02 15:08:39 +02:00
Fahri YARDIMCI f5e174c284 Merge pull request #58 from opsgenie/multiple-fixes-for-issues
Multiple fixes for issues
v0.8
2020-06-22 18:32:42 +03:00
Mustafa Akin 077bb6654c Namespace support to work without cluster scope, fixes #42 2020-06-22 18:28:11 +03:00
Mustafa Akin fee89514e8 better default config to log to stdout, debug log added for involved object capturing 2020-06-22 18:17:18 +03:00
Mustafa Akin 336fa39c4c Go mod vendor fixes #19 2020-06-22 17:37:29 +03:00
Mustafa Akin d262b1f7c7 Treat all 2xx succesful in webhook, fixes #57 2020-06-22 17:36:56 +03:00
Mustafa Akin c4a5dd0857 Merge branch 'master' of github.com:opsgenie/kubernetes-event-exporter into multiple-fixes-for-issues 2020-06-22 17:35:36 +03:00
Mustafa Akin 1a24caeeeb Log format support, fixes #52 2020-06-22 17:31:01 +03:00
Mustafa Akin 0499da9706 Go mod vendor fixes #54 2020-06-22 17:10:52 +03:00
Mustafa Akin 1ff1f121db Test for issue #51 2020-06-22 17:04:25 +03:00
Mustafa Akin 823662b2a9 Fixes #48, Elasticsearch is not taking layout although documented to do so 2020-06-22 16:55:17 +03:00
Mustafa Akın ae8bfb579d Merge pull request #53 from jaydp17/webhook-return-err
return err in webhook sink
2020-06-22 16:44:54 +03:00
Mustafa Akın 112e224047 Merge pull request #49 from lesh366/master
New ms teams support
2020-06-22 16:44:32 +03:00
Mustafa Akın 9d8c746d1b Merge pull request #45 from youyongsong/patch/support-rotate-in-file-sink
Add file rolling function in file sink.
2020-06-22 16:44:01 +03:00
Mustafa Akın d48d8a95f1 Merge pull request #44 from youyongsong/patch/exit-after-leader-lost
fix leader election bug introduced by #37.
2020-06-22 16:43:34 +03:00
Mustafa Akın b0edf7ca99 Merge pull request #50 from njegosrailic/webhook_status_code
Handle HTTP Status code 201 in the webhook sink
2020-06-22 16:43:14 +03:00
Jaydeep Solanki 18bdae4d23 return err in webhook sink 2020-06-01 16:40:09 +05:30
Njegos RailicandHeinz N. Gies 80f904e39f Update pkg/sinks/webhook.go
Co-authored-by: Heinz N. Gies <heinz@licenser.net>
2020-05-29 13:09:43 +02:00
Njegos Railic 8aae6e0d9a Handle HTTP Status code 201 in the webhook sink 2020-05-29 12:32:21 +02:00
lesh366 72eb5b6087 readme for ms teams 2020-05-27 12:47:24 +03:00
elads 00bd85193c Merge branch 'master' of https://github.com/lesh366/kubernetes-event-exporter-1 2020-05-27 05:30:35 -04:00
elads 6036993217 update vendor modules 2020-05-27 05:30:23 -04:00
lesh366 62b1c4cae2 format alligment 2020-05-27 12:18:09 +03:00
elads bbdecb204e new microsoft teams support 2020-05-27 05:15:33 -04:00
youyongsong 15f2feb28f Add file rolling function in file sink.
I known File Sink is currently mostly used in local development, but we also tend to use it in our production environment with fluentd, because this combination is very stable and reliable.

Currently File Sink lacks the file rolling function, which is very important for the production environment. So I want to add file rolling function to File Sink through this pr without breaking changes.

file rolling is disabled by default, and can be enabled by adding the following arguments:

```yaml
- receivers:
  file:
    path: ./test.log
    maxsize: 20    // if ./test.log is larger than 20MB, it will be renamed to ./test-<datetime>.log as a backup file,
    and create a new file named test.log to receive events. It defaults to 100 megabytes.
    maxage: 20     // if backup files ./test-<datetime>.log are created 20 days ago, they will be deleted. The default
    is not to remove old log files based on age.
    maxbackups: 3  // if backup files are more than 3, older backup files will be removed.
```

the rolling function is powered by [lumberjack](https://github.com/natefinch/lumberjack). Becasue `lumberjack.Logger` implmented `io.WriteCloser` interface, so it is easy to replace `file *os.file` with `writer &lumberjack.Logger`.

run kubernetes-event-exporter with following config:
```yaml
logLevel: debug
route:
  match:
    - receiver: "file"
receivers:
  - name: "file"
    file:
      path: "./event.log"
      maxsize: 1
      maxbackups: 4
```
run following script to generate events and output `./event*.log` status:
```shell
while true
do
  kubectl run nginx --image nginx || kubectl delete deployment nginx
  ls -lh event*.log
  sleep 2
done
```
the result is:
```
deployment.apps "nginx" deleted
-rw-r--r-- 1 ysyou staff  1.0M Mar  4 18:03 event-2020-03-04T10-03-30.271.log
-rw-r--r-- 1 ysyou staff  1.0M Mar  4 18:15 event-2020-03-04T10-15-52.496.log
-rw-r--r-- 1 ysyou staff  1.0M Mar  4 18:28 event-2020-03-04T10-28-27.334.log
-rw-r--r-- 1 ysyou staff  1.0M Mar  4 18:41 event-2020-03-04T10-41-11.316.log
-rw-r--r-- 1 ysyou staff 1023K Mar  4 18:54 event.log
deployment.apps/nginx created
-rw-r--r-- 1 ysyou staff 1.0M Mar  4 18:15 event-2020-03-04T10-15-52.496.log
-rw-r--r-- 1 ysyou staff 1.0M Mar  4 18:28 event-2020-03-04T10-28-27.334.log
-rw-r--r-- 1 ysyou staff 1.0M Mar  4 18:41 event-2020-03-04T10-41-11.316.log
-rw-r--r-- 1 ysyou staff 1.0M Mar  4 18:54 event-2020-03-04T10-54-11.451.log
-rw-r--r-- 1 ysyou staff 2.0K Mar  4 18:54 event.log
```
when `event.log` reaches 1M, it is renamed to `event-2020-03-04T10-54-11.451.log`, because backup files are more than 4, the oldest one `event-2020-03-04T10-03-30.271.log` is deleted.
2020-05-06 16:07:36 +08:00
youyongsong 2d8f6bc324 fix leader election bug introduced by #37.
I just found a bug in #37. When the leader is lost(mainly due to apiserver timeout), the program will stop watch events but will not exit,it will always hung there.
I modified this part of the logic in this pr. After the leader is lost, the program will exit the same as it received exit signal. Then a new pod will be scheduled to participate in the election.
Sorry for introducing this bug in # 37, hope this pr will fix it.
2020-05-06 15:11:51 +08:00
Mustafa Akin d6b6842ceb Updated Dockerfile for 1.14 and the deployment YAML 2020-05-02 02:03:37 +03:00
Mustafa Akın 8c06aa38c4 Bump Go version 2020-05-02 01:55:10 +03:00
Mustafa Akın f669926f8d Vendor changes v0.7 2020-05-02 01:50:36 +03:00
Mustafa Akın 2d407677a8 Merge pull request #36 from mheck136/elasticsearch-tls-config
Update README to match elasticsearch TLS settings
2020-05-02 01:27:24 +03:00
Mustafa Akın b3695e478d Merge pull request #37 from youyongsong/feature/support-leader-election
feature: support leader election
2020-05-02 01:25:27 +03:00