#Harvest port management for pollers

1 messages · Page 1 of 1 (latest)

flint shell
#

Hi all,
I've got a question regarding the port management with Harvest.
We would like to assign a fix port to each poller instead of a port range. Looking in to the NABox harvest.yaml file I noticed that you solved this by defining "prometheus_port" instead of only "port". I'm not able to reproduce this in our confing. We only see the way to get this running by setup a separate exporter per port or use just one exporter with the range.

Is there an other way to use dedicated ports per poller instead of the range like in the NABox?

brisk sonnet
#

Hi @flint shell are you using nabox 3 or 4? I don't think nabox 3 uses port range. Is that correct @brittle spire ?

flint shell
#

Hi @brisk sonnet exact NABox do not use port range. Question is how we can reproduce this with the Harvest standalone version

brisk sonnet
#

Thanks! For Harvest standalone, you would do something like this. We've discussed adding support for something like prometheus_port but have not done that yet. If that's important, can you open an issue for it?

Exporters:
  prom1:
    exporter: Prometheus
    port: 12990
  prom2:
    exporter: Prometheus
    port: 12991
  prom3:
    exporter: Prometheus
    port: 12992
Pollers:
  cluster-01:
    exporters:
      - prom1
  cluster-02:
    exporters:
      - prom2
  cluster-03:
    exporters:
      - prom3
flint shell
#

Thanks for that. Im curious how Yann resolved that because in the config it self I don’t see the additional exporters.

brittle spire
#

In nabox 3 I think ports are fixed in the config. I did the same for nabox 4 actually.

#

Each poller has a promPort property I believe.

#

Now I understand your question after reading reading it. Yes NAbox adds keys in harvest config that aren’t known from harvest

brisk sonnet
#

right, so NAbox adds extra info to the harvest.yml file. Harvest ignores key/values in the config that it does not recognize. NAbox is using those extra key/values to do it's own thing. In this case, it's using that information to start each Harvest poller with a unquie promPort via the --promPort CLI argument.

We're open to adding support for prometheus_port to Harvest. It's come up before (2021 according to GitHub), but no one has requested we add support

flint shell
#

Thanks guys for the clarification 😊 When I get tomorrow to the office, I can explain why I asked

flint shell
brisk sonnet
#

hi @flint shell any thoughts on the latest idea around embedding the exporter?

flint shell
#

Hi @brisk sonnet apologize the delay, we had some “funny” issues. I will have a look tomorrow on that

brisk sonnet
#

no worries!