-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wire up vsphere exporter for static to integrations v2 converter
Signed-off-by: erikbaranowski <[email protected]>
- Loading branch information
1 parent
9bd17da
commit 6094ba1
Showing
6 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
converter/internal/staticconvert/internal/build/vmware_exporter.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package build | ||
|
||
import ( | ||
"github.com/grafana/agent/component/discovery" | ||
"github.com/grafana/agent/component/prometheus/exporter/vsphere" | ||
vmware_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/vmware_exporter" | ||
"github.com/grafana/river/rivertypes" | ||
) | ||
|
||
func (b *IntegrationsConfigBuilder) appendVmwareExporterV2(config *vmware_exporter_v2.Config) discovery.Exports { | ||
args := toVmwareExporter(config) | ||
return b.appendExporterBlock(args, config.Name(), nil, "vsphere") | ||
} | ||
|
||
func toVmwareExporter(config *vmware_exporter_v2.Config) *vsphere.Arguments { | ||
return &vsphere.Arguments{ | ||
ChunkSize: config.ChunkSize, | ||
CollectConcurrency: config.CollectConcurrency, | ||
VSphereURL: config.VSphereURL, | ||
VSphereUser: config.VSphereUser, | ||
VSpherePass: rivertypes.Secret(config.VSpherePass), | ||
ObjectDiscoveryInterval: config.ObjectDiscoveryInterval, | ||
EnableExporterMetrics: config.EnableExporterMetrics, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters