Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better way to map PROMTARGETIP to PROMTARGETNAME/Service discovery? #255

Closed
PNRxA opened this issue Jun 26, 2019 · 15 comments
Closed

Better way to map PROMTARGETIP to PROMTARGETNAME/Service discovery? #255

PNRxA opened this issue Jun 26, 2019 · 15 comments
Labels
enhancement New feature or request

Comments

@PNRxA
Copy link

PNRxA commented Jun 26, 2019

Currently I run heplify-server in a docker container.

My config has the following flags set up with 40+ VoIP servers for example:

- "HEPLIFYSERVER_PROMTARGETIP=1.1.1.1,1.1.1.2,1.1.1.3,1.1.1.4,..."
- "HEPLIFYSERVER_PROMTARGETNAME=name1,name2,name3,name4,..."

We launch new VoIP servers often so every night using a cron job I run a script which updates those flags in my docker-compose file with the latest IPs and Names pulled from AWS CLI and then runs docker-compose up -d to update heplify-server with the new values.

There is no problem here as it all works fine but is this the best way to accomplish this?
Is there a better way of mapping IP addresses to names dynamically or is this typically done manually?

@negbie negbie added the enhancement New feature or request label Jun 27, 2019
@negbie
Copy link
Member

negbie commented Jun 27, 2019

Hi, yes a better way would be to create a new flag like PromTargetMap and use a map like notation
{ name1=1.1.1.1, name2=1.1.1.2}

@negbie
Copy link
Member

negbie commented Jun 27, 2019

About the dynamically mapping I guess I would do something like this: Use dns names instead of IP's and create a go routine in heplify-server whichs does the ip resolution every x hours and puts them into the PromTargetMap.

@lmangani
Copy link
Member

@negbie if this is the approach, consider letting the DNS server(s) configurable so one can avoid resolving unwanted items and/or setup a dedicated DNS server for this purpose, vs. the OS DNS which might end up resolving more spammers than others.

@negbie
Copy link
Member

negbie commented Jun 28, 2019

Good point, I will keep it in mind. I was just thinking out loud about a possible solution to this. There are more elegant ways especially when you use aws or gcp but they are more complex. I will see when I find more time to look for other possible solutions to this.

@lmangani
Copy link
Member

I guess a simple table in the db, or an optional sqlite file would also do, if we're trying to stay simple - we can brainstorm on slack if you'd like ;)

@changzx
Copy link

changzx commented Nov 1, 2019

Currently I run heplify-server in a docker container.

My config has the following flags set up with 40+ VoIP servers for example:

- "HEPLIFYSERVER_PROMTARGETIP=1.1.1.1,1.1.1.2,1.1.1.3,1.1.1.4,..."
- "HEPLIFYSERVER_PROMTARGETNAME=name1,name2,name3,name4,..."

We launch new VoIP servers often so every night using a cron job I run a script which updates those flags in my docker-compose file with the latest IPs and Names pulled from AWS CLI and then runs docker-compose up -d to update heplify-server with the new values.

There is no problem here as it all works fine but is this the best way to accomplish this?
Is there a better way of mapping IP addresses to names dynamically or is this typically done manually?

40+ VoIP servers?

@PNRxA
Copy link
Author

PNRxA commented Nov 1, 2019

40+ VoIP servers?

Yes, over 40 VoIP servers hosted on AWS EC2

@changzx
Copy link

changzx commented Nov 1, 2019

40+ VoIP servers?

Yes, over 40 VoIP servers hosted on AWS EC2

Concurrent?
Can you send me your email?

@lmangani
Copy link
Member

lmangani commented Nov 1, 2019

@changzx @PNRxA right now advanced and realtime tagging options are only available in hepic but a new version of homer is in the works where we could perhaps address this more elegantly.

@PNRxA
Copy link
Author

PNRxA commented Nov 4, 2019

@lmangani that sounds great, looking forward to it. Are you referring to Homer 7.x or a newer version?

@changzx
Copy link

changzx commented Nov 4, 2019

@changzx @PNRxA right now advanced and realtime tagging options are only available in hepic but a new version of homer is in the works where we could perhaps address this more elegantly.

that sounds great!

@Zhenyuga
Copy link

Zhenyuga commented Dec 9, 2021

I want to konw does this sovled this issue? if yes, where is the latest config map, or db

@izaacmenezes
Copy link

Good morning, do you have an update on the topic?

@lmangani
Copy link
Member

@izaacmenezes there were no community contributions or sponsorship regarding this feature

@lmangani
Copy link
Member

closing in favour of new methods/proposals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants