Why does prometheus automatically set port 80 and 443 in the URL, when you set Scheme?

9 views
Skip to first unread message

Donato Bagarozza

unread,
May 29, 2020, 3:54:40 AM5/29/20
to Prometheus Users
Hello everybody,

it is possible with prometheus, that prometheus does not automatically set port 80 and 443, when we set the Scheme?
We need it without the port. :)

or is it possible to replace it with relabel_config?

thanks :)


Brian Brazil

unread,
May 29, 2020, 4:09:18 AM5/29/20
to Donato Bagarozza, Prometheus Users
On Fri, 29 May 2020 at 08:54, Donato Bagarozza <donato.ba...@gmail.com> wrote:
Hello everybody,

it is possible with prometheus, that prometheus does not automatically set port 80 and 443, when we set the Scheme?
We need it without the port. :)
 
We have to choose some port number.
 
or is it possible to replace it with relabel_config?


Brian
 

thanks :)


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/72a822f6-286e-432b-8a5d-f5e0158f50dd%40googlegroups.com.


--

Donato Bagarozza

unread,
May 29, 2020, 5:11:47 AM5/29/20
to Prometheus Users
thanks :).

I tried it with relabel_config, but i can`t delete the port.

Donato Bagarozza

unread,
May 29, 2020, 6:58:38 AM5/29/20
to Prometheus Users

i want to remove the https port from url, but I can't get it removed. Thats my problem :)

prometheus.PNG



Christian Hoffmann

unread,
Jun 1, 2020, 3:50:10 AM6/1/20
to Donato Bagarozza, Prometheus Users
Hi,

On 5/29/20 11:11 AM, Donato Bagarozza wrote:
> I tried it with relabel_config, but i can`t delete the port.
It should be possible to do. What have you tried exactly?

You should be able to match on "([^:]+):\d+" and use ${1} to reference
the part without the port.

Just to confirm: You want to remove the port from the instance label of
your ingested series, right?

Kind regards,
Christian
Reply all
Reply to author
Forward
0 new messages