Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus-event-exporter #5105

Open
ravindraprasad85 opened this issue Dec 30, 2024 · 0 comments
Open

prometheus-event-exporter #5105

ravindraprasad85 opened this issue Dec 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ravindraprasad85
Copy link

ravindraprasad85 commented Dec 30, 2024

Describe the bug a clear and concise description of what the bug is.

Can you update/add prometheus-event-exporter helm chart which fetch the kubernetes metrics along with all the labels like cluster, reason, createdAt etc. i have used bitnami event exporter as well but that is also not having metrics with required labels

What's your helm version?

version.BuildInfo{Version:"v3.15.1", GitCommit:"e211f2aa62992bd72586b395de50979e31231829", GitTreeState:"clean", GoVersion:"go1.22.3"}

What's your kubectl version?

WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version. Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.2", GitCommit:"7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647", GitTreeState:"clean", BuildDate:"2023-05-17T14:20:07Z", GoVersion:"go1.20.4", Compiler:"gc", Platform:"darwin/amd64"} Kustomize Version: v5.0.1 Unable to connect to the server: tls: failed to verify certificate: x509: certificate signed by unknown authority

Which chart?

kubernetes-event-exporter

What's the chart version?

3.3.0

What happened?

Can you update/add prometheus-event-exporter helm chart which fetch the kubernetes metrics along with all the labels like cluster, reason, createdAt etc. i have used bitnami event exporter as well but that is also not having metrics with required labels

What you expected to happen?

labels should have in all the event exporter metyrics

How to reproduce it?

NA

Enter the changed values of values.yaml?

config:
logLevel: debug
#logFormat: pretty
logFormat: json
clusterName: $CLUSTERNAME
metricsNamePrefix: kubernetes_
#metricsNamePrefix: event_exporter_

logFormat: |

{

"timestamp": "{{ .Timestamp }}",

"cluster": "{{ env 'CLUSTERNAME' }}",

"message": "{{ .Message }}",

"reason": "{{ .Reason }}",

"type": "{{ .Type }}",

"count": "{{ .Count }}",

"kind": "{{ .InvolvedObject.Kind }}",

"name": "{{ .InvolvedObject.Name }}",

"namespace": "{{ .Namespace }}",

"component": "{{ .Source.Component }}",

"host": "{{ .Source.Host }}",

"labels": "{{ toJson .InvolvedObject.Labels }}"

}

receivers:
- name: "dump"
file:
path: "/dev/stdout"
# ## Example enabled below to test
layout:
message: "{{ .Message }}"
reason: "{{ .Reason }}"
type: "{{ .Type }}"
count: "{{ .Count }}"
kind: "{{ .InvolvedObject.Kind }}"
name: "{{ .InvolvedObject.Name }}"
namespace: "{{ .Namespace }}"
component: "{{ .Source.Component }}"
host: "{{ .Source.Host }}"
labels: "{{ toJson .InvolvedObject.Labels }}"
#createdAt: "{{ .GetTimestampMs }}"
createdAt: "{{ .GetTimestampISO8601 }}"
cluster: $CLUSTERNAME
#timestamp: "{{ .Timestamp }}"
node_name: "{{ .InvolvedObject.FieldPath }}"
first_timestamp: "{{ .FirstTimestamp }}"
last_timestamp: "{{ .LastTimestamp }}"
#event_uuid: "{{ .Metadata.UID }}"
# ##
# #layout: {}

- name: "prometheus"
  file:
    path: "/dev/stdout"
    enabled: true 
    port: 2112
#     ## Example enabled below to test
    layout:
      message: "{{ .Message }}"
      reason: "{{ .Reason }}"
      type: "{{ .Type }}"
      count: "{{ .Count }}"
      kind: "{{ .InvolvedObject.Kind }}"
      name: "{{ .InvolvedObject.Name }}"
      namespace: "{{ .Namespace }}"
      component: "{{ .Source.Component }}"
      host: "{{ .Source.Host }}"
      labels: "{{ toJson .InvolvedObject.Labels }}"
      #createdAt: "{{ .GetTimestampMs }}"
      createdAt: "{{ .GetTimestampISO8601 }}"
      cluster: $CLUSTERNAME
      #timestamp: "{{ .Timestamp }}"
      node_name: "{{ .InvolvedObject.FieldPath }}"
      first_timestamp: "{{ .FirstTimestamp }}"
      last_timestamp: "{{ .LastTimestamp }}"
      #event_uuid: "{{ .Metadata.UID }}"

#Added below to test custom ccid alert
- name: "ccid-opensearch"
  opensearch:
    hosts:
      #- https://vpc-production
      - $OSHOSTS
    #index: "neustar-prod-kube-events-poc"
    index: "$INDEX"
    # Ca be used optionally for time based indices, accepts Go time formatting directives
    #indexFormat: "neustar-prod-kube-events-poc-{2006-01-02}"
    indexFormat: "$INDEXFORMAT"
    #username: "neustaradmin"
    username: $USERNAME
    #password: "xxxxxxx"
    password: $PASSWORD
    # If set to true, it allows updating the same document in ES (might be useful handling count)
    useEventID: true
    # Type should be only used for clusters Version 6 and lower.
    # type: kube-event
    # If set to true, all dots in labels and annotation keys are replaced by underscores. Defaults false
    deDot: false
    layout:
      message: "{{ .Message }}"
      reason: "{{ .Reason }}"
      type: "{{ .Type }}"
      count: "{{ .Count }}"
      kind: "{{ .InvolvedObject.Kind }}"
      name: "{{ .InvolvedObject.Name }}"
      namespace: "{{ .Namespace }}"
      component: "{{ .Source.Component }}"
      host: "{{ .Source.Host }}"
      labels: "{{ toJson .InvolvedObject.Labels }}"
      #createdAt: "{{ .GetTimestampMs }}"
      createdAt: "{{ .GetTimestampISO8601 }}"
      cluster: $CLUSTERNAME
      #timestamp: "{{ .Timestamp }}"
      node_name: "{{ .InvolvedObject.FieldPath }}"
      first_timestamp: "{{ .FirstTimestamp }}"
      last_timestamp: "{{ .LastTimestamp }}"
      #event_uuid: "{{ .Metadata.UID }}"
    # tls: # optional, advanced options for tls
    #   insecureSkipVerify: true # optional, if set to true, the tls cert won't be verified
    #   serverName: # optional, the domain, the certificate was issued for, in case it doesn't match the hostname used for the connection
    #   caFile: # optional, path to the CA file of the trusted authority the cert was signed with

route:
routes:
- match:
- receiver: "dump"
- receiver: "opensearch"
- receiver: "prometheus"

Enter the command that you execute and failing/misfunctioning.

its not execution error but no metrics labels are present

Anything else we need to know?

i have tried all the event exporter which is available over the internet but its not working , pls help me to get this resolved

@ravindraprasad85 ravindraprasad85 added the bug Something isn't working label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant