not able to delivery to custom http hook and files
wangwei10061 opened this issue · 1 comments
my config is as below:
apiVersion: v1
kind: ConfigMap
metadata:
name: event-exporter-cfg
namespace: monitoring
data:
config.yaml: |
logLevel: debug
logFormat: json
route:
routes:
- match:
- receiver: "alerts"
receivers:
- name: "alerts"
webhook:
endpoint: "http://127.0.0.1:5000"
headers:
X-API-KEY: "123"
User-Agent: kube-event-exporter 1.0
layout: # Optional
route:
routes:
- match:
- receiver: "dump"
receivers:
- name: "dump"
stdout: { }
route:
routes:
- match:
- receiver: "file"
receivers:
- name: "file"
file:
path: "/tmp/dump"
layout: # Optional
I can find logs like {"level":"debug","msg":"Killing container with id docker://python3-ssh:Need to kill Pod","namespace":"default","reason":"Killing","involvedObject":"evassh-4405773","time":"2021-08-09T10:00:37Z","caller":"/app/pkg/kube/watcher.go:64","message":"Received event"} {"level":"debug","sink":"file","event":"Killing container with id docker://python3-ssh:Need to kill Pod","time":"2021-08-09T10:00:37Z","caller":"/app/pkg/exporter/channel_registry.go:56","message":"sending event to sink"}
using kubectl logs -f event-exporter-7457ffff67-h7dpr -n monitoring
, but no msg deliveried to custom http hook and files, can anyone help?
I assume exporter runs in a pod, and your flask server in another, so the 127.0.0.1 is not the correct IP.