Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Monitoring all logstash replicas in K8s #27

Open
ArjonBu opened this issue Jun 21, 2022 · 1 comment
Open

Monitoring all logstash replicas in K8s #27

ArjonBu opened this issue Jun 21, 2022 · 1 comment

Comments

@ArjonBu
Copy link

ArjonBu commented Jun 21, 2022

Hello,

Is it possible with the exporter to monitor all replicas of Logstash running in K8s?
On Prometheus metrics I cannot see more than one node.

Thanks in advance

@LHozzan
Copy link

LHozzan commented Jun 22, 2022

Hi @ArjonBu .

By default this exporter watching just one instance. But in K8s you can "attach" it as a sidecar to Logstash pods. Deployment looking something like this:

...
spec:
  containers:
  - name: logstash
  (... setup for logstash ...)
  - name: exporter
    image: <PathToYourDockerContainerWithName>:<VersionForYourDockerContainer>
    args:
      - --web.listen-address=:9310 # by default is used port 9304, but feel free adapt this setting
    ports:
     - containerPort: 9310
       name: metrics
       protocol: TCP
    resources:
      requests:
        cpu: "100m"
        memory: "16M"
      limits:
        cpu: "200m"
        memory: "32M"
...

Please, take this just a example! You need also update K8s service object and servicemonitor object for Prometheus.

Hope that helps.

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

No branches or pull requests

2 participants