kuskoman/logstash-exporter

Question: How to specify multiple URL´s for logstash.url in HELM Chart

frankhetterich opened this issue · 6 comments

I have a question regarding the monitoring of multiple Logstash instances (non K8s) from one exporter:

How can i specify multiple URL´s in values.logstash.url ?

regards

Hello @frankhetterich
the multi-instance monitoring is currently a feature of the unstable release-candidate version: https://github.com/kuskoman/logstash-exporter/releases/tag/v2.0.0-pre1, based on master version (I can create v2.0.0-pre2 version if you need latest state of the master branch, with fixes done by @satk0 and myself)
in case of the pre-release version you can either use urls:


or completly custom yaml config:
config: |
logstash:
urls:
- "http://logstash:9600"

@frankhetterich I actually just created for you the v2.0.0-pre2 with the latest master changes
basically it is pre-release because i am planning to still do changes to code structure, to fit golang standards better, I am currently not planning to do breaking changes regarding configuration files, but at this moment i cannot promise that
edit: ohm i have to fix arm image, i will create this tag in a moment

Hi @kuskoman,

I seem to have had the same issue as frank. Now, I tried to use multiple URLs with the following configs, which did not seem to work:

logstash:
  urls:
  - "http://logstash1.svc.cluster.local:9600"
  - "http://logstash2.svc.cluster.local:9600"

And tried with customConfig:

customConfig:
  enabled: true
  config: |
    logstash:
        - urls: "http://logstash1.svc.cluster.local:9600"
        - urls: "http://logstash2.svc.cluster.local:9600"
    server:
      host: "0.0.0.0"
      port: 9198 
    logging:
      level: "debug"

These configs both gave my the error "failed to get exporter config: yaml: line 3: block sequence entries are not allowed in this context" or went back to the defaultLogstashURL "http://localhost:9600".

The following config however did work, with the v2.0.0-pre2 release:

customConfig:
  enabled: true
  config: |
    logstash:
      servers:
        - url: "http://logstash1.svc.cluster.local:9600"
        - url: "http://logstash2.svc.cluster.local:9600"
    server:
      host: "0.0.0.0"
      port: 9198 
    logging:
      level: "debug"

I don't know if this is a known issue, or designed this way, but I just wanted to let you known and maybe help someone else that is having this problem.

must be a problem in yaml formatting, i will take a look on it in a minute
edit: just to clarify, problem in helm chart, nit on your side

Hello @MatthyB, seems like i fixed it (indent error) in #245.
I don't want to create another pre-release yet, do you mind using version from a commit instead of a tag?

Hi @kuskoman,
Thanks for the quick response, using the version from a commit is fine!