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

add support for SRV records as host #9

Merged
merged 1 commit into from
Nov 15, 2021
Merged

Conversation

Len4i
Copy link

@Len4i Len4i commented Nov 6, 2021

Hi,
I would like to add support for SRV records as host for a target of network_exporter
I've got it working by extracting target records of SRV record and adding them as separate targets for network_exporter.

few notes:
I had to transform hierarchical Config type to inherited in order to be able to call Targets type directly. Without it this line targets := c.Targets[:0] was messing with original targets from config file during the for loop
And, this is actually my first lines in GO, so I easily imagine that code may look ugly and not "go style". Feel free to correct me.

Let me know if you are interested in this functionality

@syepes
Copy link
Owner

syepes commented Nov 15, 2021

Very nice thanks for the contribution

@syepes syepes merged commit c3b30a4 into syepes:master Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants