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
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 callTargets
type directly. Without it this linetargets := 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