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

exporter 404 and ruler sinks alert manager #44

Open
Shuimo03 opened this issue Feb 7, 2023 · 4 comments
Open

exporter 404 and ruler sinks alert manager #44

Shuimo03 opened this issue Feb 7, 2023 · 4 comments
Assignees

Comments

@Shuimo03
Copy link

Shuimo03 commented Feb 7, 2023

When I created the ruler about alertmanager sinks, I intentionally filled in some wrong information, but the ruler-alertmanager-pod logs still show rule cache succeeded,Here is my ruler.yaml

apiVersion: events.kubesphere.io/v1alpha1
kind: Ruler
metadata:
  name: kube-events-alertmanager-ruler
  namespace: kubesphere-logging-system
spec:
  image: kubesphere/kube-events-ruler:0.5.0
  replicas: 1
  resources: {} #985
  ruleNamespaceSelector: {} #1012
  ruleSelector: {}
  sinks:
    alertmanagers: 
      - namespace: monitoring
        name: alertmanager-main
        port: 9093
        targetPort: 9093

And my exporter component prompts a 404 when using the k8s service, but the url doesn't.

apiVersion: events.kubesphere.io/v1alpha1
kind: Exporter
metadata:
  name: kube-events-exporter
  namespace: kubesphere-logging-system
spec:
  image: kubesphere/kube-events-exporter:0.5.0
  resources: {}
  sinks:
    stdout: {}
    webhooks:
          name: kube-events-alertmanager-ruler
         namespace: kubesphere-logging-system
          path: events/meteics
          port: 8443

K8S is minikube, version is v1.25.3
CNI: cilium

@junotx
Copy link
Collaborator

junotx commented Feb 10, 2023

@Shuimo03
If you fill invalid configuration into Ruler, you may find the error from the operator log.
If you configure the ruler service as a webhook sink in Exporter, you should set the path to /events instead of your events/meteics

@Shuimo03
Copy link
Author

@junotx Thanks, I have found a solution to this 404, because the path and port in exporter.yaml are not custom, but fixed in the code: cmd/ruler/main.go 71 line, but not declared

@Shuimo03
Copy link
Author

I have new question currently encountering is how does the ruler component send the rules to the alert manager? And how to verify if it is successful?

@junotx
Copy link
Collaborator

junotx commented Feb 16, 2023

I have new question currently encountering is how does the ruler component send the rules to the alert manager? And how to verify if it is successful?

The ruler sent alerts rather than rules to the alertmanager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants