Comments (5)
It should work, it should just not be able to read the additional labels ore metadata of them since they are not available in default view role. I need to reproduce it, I might have overlooked it before because when I run it from my IDE, it always runs with the administrator role.
from kubernetes-event-exporter.
That was my understanding as well. Alas, it doesn't work, at least not with the roles in the deploy
directory.
from kubernetes-event-exporter.
I tested it with installing Tekton to my Minikube. It gets dumped, I'm not really sure what is going on.
Here are the test logs:
2020-06-22T15:02:05Z DBG app/pkg/exporter/channel_registry.go:56 > sending event to sink event="pod status \"Ready\":\"False\"; message: \"containers with unready status: [step-test-me]\"" sink=dump
2020-06-22T15:02:08Z DBG app/pkg/kube/watcher.go:63 > Received event msg="Successfully pulled image \"alpine\"" namespace=default object=&ObjectReference{Kind:Pod,Namespace:default,Name:test-plz-pod-7xzr2,UID:9c585164-c06e-4490-b3e6-46b46b474d85,APIVersion:v1,ResourceVersion:10467,FieldPath:spec.containers{step-test-me},} reason=Pulled
2020-06-22T15:02:08Z DBG app/pkg/exporter/channel_registry.go:56 > sending event to sink event="Successfully pulled image \"alpine\"" sink=dump
2020-06-22T15:02:08Z DBG app/pkg/kube/watcher.go:63 > Received event msg="Created container step-test-me" namespace=default object=&ObjectReference{Kind:Pod,Namespace:default,Name:test-plz-pod-7xzr2,UID:9c585164-c06e-4490-b3e6-46b46b474d85,APIVersion:v1,ResourceVersion:10467,FieldPath:spec.containers{step-test-me},} reason=Created
2020-06-22T15:02:08Z DBG app/pkg/exporter/channel_registry.go:56 > sending event to sink event="Created container step-test-me" sink=dump
2020-06-22T15:02:08Z DBG app/pkg/kube/watcher.go:63 > Received event msg="Started container step-test-me" namespace=default object=&ObjectReference{Kind:Pod,Namespace:default,Name:test-plz-pod-7xzr2,UID:9c585164-c06e-4490-b3e6-46b46b474d85,APIVersion:v1,ResourceVersion:10467,FieldPath:spec.containers{step-test-me},} reason=Started
2020-06-22T15:02:08Z DBG app/pkg/exporter/channel_registry.go:56 > sending event to sink event="Started container step-test-me" sink=dump
2020-06-22T15:02:08Z DBG app/pkg/kube/watcher.go:63 > Received event msg="Not all Steps in the Task have finished executing" namespace=default object=&ObjectReference{Kind:TaskRun,Namespace:default,Name:test-plz,UID:99df443b-dc85-415f-83a5-fa5ab45a23b0,APIVersion:tekton.dev/v1beta1,ResourceVersion:10485,FieldPath:,} reason=Running
2020-06-22T15:02:08Z DBG app/pkg/exporter/channel_registry.go:56 > sending event to sink event="Not all Steps in the Task have finished executing" sink=dump
2020-06-22T15:02:08Z DBG app/pkg/kube/watcher.go:63 > Received event msg="Not all Steps in the Task have finished executing" namespace=default object=&ObjectReference{Kind:TaskRun,Namespace:default,Name:test-plz,UID:99df443b-dc85-415f-83a5-fa5ab45a23b0,APIVersion:tekton.dev/v1beta1,ResourceVersion:10485,FieldPath:,} reason=Running
2020-06-22T15:02:08Z DBG app/pkg/exporter/channel_registry.go:56 > sending event to sink event="Not all Steps in the Task have finished executing" sink=dump
2020-06-22T15:02:09Z DBG app/pkg/kube/watcher.go:63 > Received event msg="All Steps have completed executing" namespace=default object=&ObjectReference{Kind:TaskRun,Namespace:default,Name:test-plz,UID:99df443b-dc85-415f-83a5-fa5ab45a23b0,APIVersion:tekton.dev/v1beta1,ResourceVersion:10497,FieldPath:,} reason=Succeeded
2020-06-22T15:02:09Z DBG app/pkg/exporter/channel_registry.go:56 > sending event to sink event="All Steps have completed executing" sink=dump
I also logged the involved object's name, I don't think it's a rights issue. Which type of Kubernetes cluster you run?
from kubernetes-event-exporter.
I can also confirm logging to stdout also worked in Minikube with that role:
{
"metadata": {
"name": "test-plz.161ae67430de99d3",
"namespace": "default",
"selfLink": "/api/v1/namespaces/default/events/test-plz.161ae67430de99d3",
"uid": "227a8fdc-2966-4173-a796-30ca967fd864",
"resourceVersion": "12242",
"creationTimestamp": "2020-06-22T15:13:24Z",
"managedFields": [
{
"manager": "controller",
"operation": "Update",
"apiVersion": "v1",
"time": "2020-06-22T15:13:24Z"
}
]
},
"reason": "Succeeded",
"message": "All Steps have completed executing",
"source": {
"component": "taskrun-controller"
},
"firstTimestamp": "2020-06-22T15:13:24Z",
"lastTimestamp": "2020-06-22T15:13:24Z",
"count": 1,
"type": "Normal",
"eventTime": null,
"reportingComponent": "",
"reportingInstance": "",
"involvedObject": {
"kind": "TaskRun",
"namespace": "default",
"name": "test-plz",
"uid": "e27d9b52-b1f5-4e43-b91c-51fedf1c9544",
"apiVersion": "tekton.dev/v1beta1",
"resourceVersion": "12239",
"labels": {
"app.kubernetes.io/managed-by": "tekton-pipelines"
}
}
}
With this config:
apiVersion: v1
kind: ConfigMap
metadata:
name: event-exporter-cfg
namespace: monitoring
data:
config.yaml: |
logLevel: error
logFormat: json
route:
routes:
- match:
- receiver: "dump"
receivers:
- name: "dump"
file:
path: "/dev/stdout"
from kubernetes-event-exporter.
i have a similar issue with the default config from deploy directory
except the change in the elastic search url
apiVersion: v1
kind: ConfigMap
metadata:
name: event-exporter-cfg
namespace: {{ .Release.Namespace }}
data:
config.yaml: |
logLevel: debug
route:
match:
- receiver: dump
receivers:
- name: "dump"
elasticsearch:
hosts:
- http://elasticsearch-master.elasticsearch.svc:9200
index: kube-events-ns
with a custom pod running in another namespace , the corresponding events for those pods are not pushed to ES
below is the repo i used without any changes (except for the elasticsearch URL)
https://github.com/opsgenie/kubernetes-event-exporter/tree/deployment-and-readme-fix/deploy
from kubernetes-event-exporter.
Related Issues (20)
- Add ClusterName to Events - PR Coming Soon
- Only log out to the sink HOT 1
- Template errors should have higher level ?
- Opensearch sink HOT 1
- Support itemizing config using CRDs
- Grouping results by logging query are not displayed.
- ES: only write ops with an op_type of create are allowed in data streams HOT 5
- Webhook retry?
- Export to local error
- Feature: add XML payload to Webhooks/HTTP
- LogLevel on elasticsearch HOT 1
- Integer data type in Layout?
- Slack receiver token from env variable HOT 1
- why kubernetes-event-exporter stop collect
- Kubernetes events not getting exported to ES HOT 5
- Wrong GetTimestampMs value of FailedScheduling event HOT 1
- Layout for Elastic Common Schema
- Can we export the event to mongoDB?
- Addition of Prometheus Metrics to Enhance Observability
- Future of this project HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubernetes-event-exporter.