Skip to content

Commit

Permalink
Remove prometheus.exporter.vsphere (#35)
Browse files Browse the repository at this point in the history
Co-authored-by: Erik Baranowski <[email protected]>
  • Loading branch information
rfratto and erikbaranowski authored Mar 15, 2024
1 parent 77dde60 commit 3337557
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 298 deletions.
1 change: 0 additions & 1 deletion docs/sources/reference/compatibility/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ The following components, grouped by namespace, _export_ Targets.
- [prometheus.exporter.squid](../components/prometheus.exporter.squid)
- [prometheus.exporter.statsd](../components/prometheus.exporter.statsd)
- [prometheus.exporter.unix](../components/prometheus.exporter.unix)
- [prometheus.exporter.vsphere](../components/prometheus.exporter.vsphere)
- [prometheus.exporter.windows](../components/prometheus.exporter.windows)
{{< /collapse >}}

Expand Down
102 changes: 0 additions & 102 deletions docs/sources/reference/components/prometheus.exporter.vsphere.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/sources/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ The release notes provide information about deprecations and breaking changes in

For a complete list of changes to {{< param "PRODUCT_ROOT_NAME" >}}, with links to pull requests and related issues when available, refer to the [Changelog][].

[Changelog]: https://github.com/grafana/alloy/blob/main/CHANGELOG.md
[Changelog]: https://github.com/grafana/alloy/blob/main/CHANGELOG.md
1 change: 0 additions & 1 deletion internal/component/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ import (
_ "github.com/grafana/agent/internal/component/prometheus/exporter/squid" // Import prometheus.exporter.squid
_ "github.com/grafana/agent/internal/component/prometheus/exporter/statsd" // Import prometheus.exporter.statsd
_ "github.com/grafana/agent/internal/component/prometheus/exporter/unix" // Import prometheus.exporter.unix
_ "github.com/grafana/agent/internal/component/prometheus/exporter/vsphere" // Import prometheus.exporter.vsphere
_ "github.com/grafana/agent/internal/component/prometheus/exporter/windows" // Import prometheus.exporter.windows
_ "github.com/grafana/agent/internal/component/prometheus/operator/podmonitors" // Import prometheus.operator.podmonitors
_ "github.com/grafana/agent/internal/component/prometheus/operator/probes" // Import prometheus.operator.probes
Expand Down
65 changes: 0 additions & 65 deletions internal/component/prometheus/exporter/vsphere/vsphere.go

This file was deleted.

59 changes: 0 additions & 59 deletions internal/component/prometheus/exporter/vsphere/vsphere_test.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import (
eventhandler_v2 "github.com/grafana/agent/internal/static/integrations/v2/eventhandler"
metricsutils_v2 "github.com/grafana/agent/internal/static/integrations/v2/metricsutils"
snmp_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/snmp_exporter"
vmware_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/vmware_exporter"
"github.com/grafana/agent/internal/static/integrations/windows_exporter"
"github.com/grafana/river/scanner"
"github.com/grafana/river/token/builder"
Expand Down Expand Up @@ -239,9 +238,6 @@ func (b *IntegrationsConfigBuilder) appendV2Integrations() {
case *snmp_exporter_v2.Config:
exports = b.appendSnmpExporterV2(itg)
commonConfig = itg.Common
case *vmware_exporter_v2.Config:
exports = b.appendVmwareExporterV2(itg)
commonConfig = itg.Common
case *metricsutils_v2.ConfigShim:
commonConfig = itg.Common
switch v1_itg := itg.Orig.(type) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -762,29 +762,3 @@ prometheus.scrape "integrations_snmp" {
forward_to = [prometheus.remote_write.metrics_default.receiver]
job_name = "integrations/snmp"
}

prometheus.exporter.vsphere "integrations_vsphere" {
vsphere_url = "https://127.0.0.1:8989/sdk"
vsphere_user = "user"
vsphere_password = "pass"
}

discovery.relabel "integrations_vsphere" {
targets = prometheus.exporter.vsphere.integrations_vsphere.targets

rule {
target_label = "instance"
replacement = "vsphere"
}

rule {
target_label = "job"
replacement = "integrations/vsphere"
}
}

prometheus.scrape "integrations_vsphere" {
targets = discovery.relabel.integrations_vsphere.output
forward_to = [prometheus.remote_write.metrics_default.receiver]
job_name = "integrations/vsphere"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server:
log_level: ${SOME_ENVIRONMENT_VARIABLE:='debug'}
log_format: json

metrics:
global:
remote_write:
Expand Down Expand Up @@ -182,7 +182,7 @@ integrations:
oracledb_configs:
- connection_string: oracle://user:password@localhost:1521/orcl.localnet
postgres_configs:
- data_source_names:
- data_source_names:
- postgres://postgres:password@localhost:5432/postgres?sslmode=disable
autoscrape:
relabel_configs:
Expand Down Expand Up @@ -228,13 +228,3 @@ integrations:
statsd:
autoscrape:
metrics_instance: "default"
vsphere_configs:
- vsphere_url: https://127.0.0.1:8989/sdk
vsphere_user: user
vsphere_password: pass
request_chunk_size: 256
collect_concurrency: 8
instance: vsphere
autoscrape:
enable: true
metrics_instance: default
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
(Error) The converter does not support converting the provided eventhandler flush_interval config: this field is not configurable in flow mode
(Warning) The eventhandler cache_path is unnecessary in flow mode because the storage path is governed by the --storage.path cmd argument and is always local to the component.
(Warning) Please review your agent command line flags and ensure they are set in your Flow mode config file where necessary.
(Error) The converter does not support converting the provided app_agent_receiver traces_instance config.
(Error) The converter does not support converting the provided app_agent_receiver traces_instance config.
(Error) Support for the vsphere integration has been removed in Grafana Alloy v1.0, and conversion will not be performed.\nTo achieve similar functionality, consider creating an otelcol.receiver.vcenter component and converting generated metrics to a Prometheus pipeline using otelcol.exporter.prometheus.
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,14 @@ integrations:
logs_instance: "log_config"
send_timeout: 30
informer_resync: 30
flush_interval: 30
flush_interval: 30
vsphere_configs:
- vsphere_url: https://127.0.0.1:8989/sdk
vsphere_user: user
vsphere_password: pass
request_chunk_size: 256
collect_concurrency: 8
instance: vsphere
autoscrape:
enable: true
metrics_instance: default
5 changes: 5 additions & 0 deletions internal/converter/internal/staticconvert/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ func validateIntegrationsV2(integrationsConfig *v2.SubsystemOptions) diag.Diagno
case *eventhandler_v2.Config:
case *snmp_exporter_v2.Config:
case *vmware_exporter_v2.Config:
diags.AddWithDetail(
diag.SeverityLevelError,
"Support for the vsphere integration has been removed in Grafana Alloy v1.0, and conversion will not be performed.",
"To achieve similar functionality, consider creating an otelcol.receiver.vcenter component and converting generated metrics to a Prometheus pipeline using otelcol.exporter.prometheus.",
)
case *metricsutils_v2.ConfigShim:
switch v1_itg := itg.Orig.(type) {
case *azure_exporter.Config:
Expand Down

0 comments on commit 3337557

Please sign in to comment.