sipcapture / heplify-server

HEP Capture Server for HOMER
https://sipcapture.org
GNU Affero General Public License v3.0
184 stars 85 forks source link

PromTarget removes node_id tags in Prometheus metrics #479

Closed agrigorjevs closed 3 years ago

agrigorjevs commented 3 years ago

Hello,

For some reason, when adding at least one promtarget in the config, HEP ID node_id tag disappears from metrics exported to prometheus.

Before adding PromTargets in config:

Screenshot 2021-08-25 at 22 25 00

After adding at least one PromTarget (nevermind the "unknown"):

Screenshot 2021-08-25 at 22 25 19

Is this intended?

adubovikov commented 3 years ago

Are you talking about PromTargetName ? Can you show your toml ?

agrigorjevs commented 3 years ago

Yeah, so I say if we add PromTargetName and PromTargetIP, node_id disappears from metrics exported.

We use heplify-server in docker environment, so we are passing env. variables like this:

HEPLIFYSERVER_PROMTARGETIP: "193.138.189.220,173.245.32.6"
HEPLIFYSERVER_PROMTARGETNAME: "csc_telecom,airespring"
adubovikov commented 3 years ago

can you check in the log if you have something like this:

logp.Info("successfully reloaded PromTargetIP: %#v", fsTargetIP) logp.Info("successfully reloaded PromTargetName: %#v", fsTargetName)

or just make a grep "PromTarget" and paste the result here

adubovikov commented 3 years ago

and grep "prometheus tag assignment"

agrigorjevs commented 3 years ago

@adubovikov you didn't get the issue I'm facing - the target_name labels work fine. e.g. from our dev environment: 2021/08/26 14:22:26.495858 prometheus.go:44: INFO prometheus tag assignment 1: 172.27.88.125 -> kamailio - and it metrics I see target_names Screenshot 2021-08-26 at 17 29 03

The problem is that the node_id label is not present in the metrics, if PromTargetIP and PromTargetName is set. Just check both screens above and below. Below is without PromTargetIP and PromTargetName set. Screenshot 2021-08-26 at 17 36 48

My expected behaviour is that after setting PromTargetIp and PromTargetName, node_id label should still be there.

adubovikov commented 3 years ago

https://github.com/sipcapture/heplify-server/pull/480

agrigorjevs commented 3 years ago

Hi,

@adubovikov it seems that after 1.56 version release, the "heplify-server" docker image was not updated in Docker Hub, although it says it was updated, but in reality the pulled image still comes with heplify-server 1.55.

lmangani commented 3 years ago

@agrigorjevs checking this - to be certain, you are referring to the latest tag correct?

agrigorjevs commented 3 years ago

@lmangani yup, that's correct, latest tag.

lmangani commented 3 years ago

@agrigorjevs seems a cache issue - rebuilt and pushed, could you pull again and check if the new image is correct?

agrigorjevs commented 3 years ago

@lmangani @adubovikov the image is correct now, and the issue is resolved! Thank you big for such fast help! Much appreciated.

adubovikov commented 3 years ago

super. You know that you have to do here: https://github.com/sipcapture/homer/stargazers

:-)