Better way to map PROMTARGETIP to PROMTARGETNAME/Service discovery?
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?
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}
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.
@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.
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.
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 ;)
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 -dto 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?
40+ VoIP servers?
Yes, over 40 VoIP servers hosted on AWS EC2
40+ VoIP servers?
Yes, over 40 VoIP servers hosted on AWS EC2
Concurrent? Can you send me your email?
@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.
@lmangani that sounds great, looking forward to it. Are you referring to Homer 7.x or a newer version?
@changzx @PNRxA right now advanced and realtime tagging options are only available in
hepicbut a new version ofhomeris in the works where we could perhaps address this more elegantly.
that sounds great!
I want to konw does this sovled this issue? if yes, where is the latest config map, or db