sematext / sematext-agent-java

Sematext Monitoring Agent
https://sematext.com/spm
Apache License 2.0
23 stars 9 forks source link

support for externally resolved hostname stored in some file #50

Closed bsmid closed 5 years ago

bsmid commented 5 years ago

This PR brings support for externally (by some other service) resolved hostname. Agent will expect to find a file /opt/spm/.resolved-hostname where first line would be taken as a hostname to report in os.host tag. In case the file doesn't exist or any issues when reading it, agent falls back to its old hostname resolving logic.