Alloy and prometheus.exporter.mssql issues

I am having a hell of a time getting the mssql exporter within Alloy to work. My end goal is to pull metrics out of our SQL RDS instance hosted in AWS.

  • I have an EC2 running Ubuntu that has Alloy installed.
  • I have verified connectivity from that EC2 to the RDS IP over port 1433 via AWS Network Reachability Analyzer. I also am able to telnet to the RDS instance over 1433.
  • I have stripped my remotecfg down to just the MSSQL config (excluded the instance from our other remote configs that would have applied to it)
  • When I run journalctl on the host machine after restarting Alloy, there is no mention of the prometheus.exporter.mssql anywhere.

Below is the config that I see when I go to Fleet Management > Click on the Collector > Configuration. I’ve edited out the user/pw and hostname since I know those are all good values.

declare "PL_RDS_ALLOY" {
	prometheus.exporter.mssql "sql_rds_metrics" {
		connection_string = "sqlserver://<user>:<pw>@<aws endpoint ID>:1433?database=master&encrypt=disable"
		scrape_interval   = "30s"
		log_level         = "debug"
	}

	discovery.relabel "sql_rds_metrics" {
		targets = prometheus.exporter.mssql.sql_rds_metrics.targets

		rule {
			target_label = "instance"
			replacement  = constants.hostname
		}

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

		rule {
			target_label = "environment"
			replacement  = sys.env("GCLOUD_ENV_LABEL")
		}
	}

	prometheus.scrape "sql_rds_metrics" {
		targets    = discovery.relabel.sql_rds_metrics.targets
		forward_to = [prometheus.remote_write.default.receiver]
		job_name   = "integrations/mssql_exporter"
	}

	prometheus.remote_write "default" {
		endpoint {
			url = "https://prometheus-prod-56-prod-us-east-2.grafana.net/api/prom/push"

			basic_auth {
				username = "<user>"
				password = sys.env("GCLOUD_RW_API_KEY")
			}
		}
	}
}

PL_RDS_ALLOY "default" { }

I’m happy to post my results of journalctl after restarting Alloy if that’s helpful as well. I feel like I’m missing something simple here but am at a loss. ChatGPT started to lead me down a rabbit hole saying mssql exporter is not included in the basic version of Alloy and I needed to run it as a docker container… that doesn’t seem right based on the info I found on this page:

Any tips/pointers from someone that has successfully done this before? I’d appreciate any help to try and get this figured out. Thanks!