anchore / anchore-charts

Helm charts for Anchore tools and services
http://charts.anchore.io
Apache License 2.0
47 stars 72 forks source link

Metrics of the Analyzer #87

Open juanjolmm opened 3 years ago

juanjolmm commented 3 years ago

Hello, I have just installed the Anchore Helm chart and I am very interested in having access to the metrics. I see that we can have access to the metrics of each component by accessing the /metrics path. In my case, I have deployed Anchore using an ALB ingress, everything is working fine, but I need a service for the analyzer, that does not exist. If I am not wrong the only way I have to access the analyzer metrics is to create an extra service. Am I missing something?

Thank you very much in advance.

ngalanis930 commented 3 years ago

Indeed there is no service for the analyzer defined in the chart. However, adding the prometheus metrics annotations on the deployment worked fine for me.

ArjonBu commented 3 years ago
apiVersion: v1
kind: Service
metadata:
  name: anchore-engine-analyzer
  labels:
    app: anchore-engine
    component: analyzer
spec:
  type: ClusterIP
  ports:
    - name: analyzer-api
      port: 8084
      targetPort: 8084
      protocol: TCP
  selector:
    app: anchore-engine
    component: analyzer
hbermu commented 2 years ago

Thanks for the Service yaml @ArjonBu! I have more than 1 analyzer, so this solution can't fix my problem at all. Thank you very much.

ArjonBu commented 2 years ago

@hbermu Yes, it does. I am afraid you might not know how kubernetes services work.