62 Commits
Author SHA1 Message Date
Mustafa Akin f6a8e09c0d Type support added for Elasticsearch 6 and lower. Fixes #77 2020-08-22 17:38:58 +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
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
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
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
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 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 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
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 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
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
Mustafa Akın 6eb781cfd6 Merge pull request #39 from ameyajoshi99/feature/annotations-filter
Feature/annotations filter
2020-05-02 01:24:59 +03:00
Brian Terry 8c0bc19a25 Add receiver 2020-04-22 13:39:42 -04:00
Brian Terry 16fb7846c3 Revert "Add Opscenter to receiver"
This reverts commit 5104e4c878.
2020-04-22 13:38:04 -04:00
Brian Terry 5104e4c878 Add Opscenter to receiver 2020-04-22 12:47:00 -04:00
Brian Terry f30e730a25 Add testing 2020-04-22 12:42:06 -04:00
Brian Terry d722fe1c67 Add testing 2020-04-21 15:14:17 -04:00
Brian Terry b87d2c392d Add testing 2020-04-21 15:14:10 -04:00
Brian Terry 6bcef23d1a Update Priority to int64 2020-04-21 10:40:21 -04:00
Brian Terry c9162036fb Add OpsCenter Sink 2020-04-21 10:29:11 -04:00
Ameya Joshi 122836c1d0 go fmt 2020-04-20 16:20:00 +05:30
Ameya Joshi 6108bad882 Adding Annotations in Rules 2020-04-20 16:13:52 +05:30
youyongsong 5dca26ee8c feature: support leader election
leader election function is disabled by default, and could be enabled by adding the
following section in `config.yaml`:

```yaml
leaderElection:
  enabled: true
  leaderElectionID: kubernetes-event-exporter  // this field can be omited, default value is kubernetes-event-exporter
```
2020-04-14 19:35:23 +08:00
Martin Heck 39498c9f54 Merge branch 'master' into elasticsearch-tls-config
# Conflicts:
#	pkg/sinks/elasticsearch.go
2020-04-10 18:12:55 +02:00
Mustafa Akın 1526f77225 Merge branch 'master' into index-format 2020-04-10 16:06:30 +03:00
Dmitriy Kononov d3bb915de0 adding ssl verification mode option 2020-04-01 22:46:40 +06:00
Martin Heck 44a52da165 Add support for TLS configuration of elasticsearch sink 2020-03-26 12:23:54 +01:00
Mustafa Akın 0f470b5af2 Merge pull request #20 from shikloshi/pubsub-sink
Adding gcloud pubsub sink
2020-02-07 13:34:58 +11:00
Mustafa Akin 8c7101d463 Fixed the inner field serialization bug, added test for array serialization 2020-02-07 11:54:59 +11:00
shikloshi 09627aed0b adding config to pubsub sink object 2020-02-03 09:54:10 +02:00
shikloshi 651a8a9b0b Updating documentation with pubsub 2020-02-03 09:51:41 +02:00