Skip to content

Commit

Permalink
Add HTTPS support for Neuron
Browse files Browse the repository at this point in the history
  • Loading branch information
sam6134 committed Mar 13, 2024
1 parent 31b7d3a commit 52ad0d0
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"time"

configutil "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery"
Expand All @@ -18,6 +19,7 @@ import (
)

const (
caFile = "/etc/amazon-cloudwatch-observability-agent-cert/tls-ca.crt"
collectionInterval = 60 * time.Second
jobName = "containerInsightsNeuronMonitorScraper"
scraperMetricsPath = "/metrics"
Expand All @@ -27,10 +29,16 @@ const (
func GetNeuronScrapeConfig(hostinfo prometheusscraper.HostInfoProvider) *config.ScrapeConfig {

return &config.ScrapeConfig{
HTTPClientConfig: configutil.HTTPClientConfig{
TLSConfig: configutil.TLSConfig{
CAFile: caFile,
InsecureSkipVerify: false,
},
},
ScrapeInterval: model.Duration(collectionInterval),
ScrapeTimeout: model.Duration(collectionInterval),
JobName: jobName,
Scheme: "http",
Scheme: "https",
MetricsPath: scraperMetricsPath,
ServiceDiscoveryConfigs: discovery.Configs{
&kubernetes.SDConfig{
Expand Down

0 comments on commit 52ad0d0

Please sign in to comment.