ci: don't export e2e metrics to OpenSearch (#2794)

* ci: don't export e2e metrics to OpenSearch
* debugd: don't export metrics
This commit is contained in:
Markus Rudy 2024-01-05 10:15:53 +01:00 committed by GitHub
parent 136a69e7c8
commit c23aef344d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 61 deletions

View File

@ -90,17 +90,3 @@ runs:
helm repo update
helm install filebeat elastic/filebeat \
--wait --timeout=1200s --values values.yml
- name: Deploy Metricbeat
id: deploy-metricbeat
shell: bash
working-directory: ./metricbeat
env:
KUBECONFIG: ${{ inputs.kubeconfig }}
run: |
helm repo add elastic https://helm.elastic.co
helm repo update
helm install metricbeat-k8s elastic/metricbeat \
--wait --timeout=1200s --values values-control-plane.yml
helm install metricbeat-system elastic/metricbeat \
--wait --timeout=1200s --values values-all-nodes.yml

View File

@ -116,23 +116,6 @@ func NewStartTrigger(ctx context.Context, wg *sync.WaitGroup, provider cloudprov
return
}
logger.Infof("Getting metricbeat config template from image %s", versions.MetricbeatImage)
tmpl, err = getTemplate(ctx, logger, versions.MetricbeatImage, "/run/metricbeat/templates/metricbeat.yml", "/run/metricbeat")
if err != nil {
logger.Errorf("Getting metricbeat config template: %v", err)
return
}
metricbeatConf := metricbeatConfInput{
LogstashHost: "localhost:5044",
Port: 5066,
CollectSystemMetrics: true,
AddCloudMetadata: true,
}
if err := writeTemplate("/run/metricbeat/metricbeat.yml", tmpl, metricbeatConf); err != nil {
logger.Errorf("Writing metricbeat pipeline: %v", err)
return
}
logger.Infof("Starting log collection pod")
if err := startPod(ctx, logger); err != nil {
logger.Errorf("Starting log collection: %v", err)
@ -243,28 +226,6 @@ func startPod(ctx context.Context, logger *logger.Logger) error {
return fmt.Errorf("failed to run filebeat: %w", err)
}
// start metricbeat container
metricbeatLog := newCmdLogger(logger.Named("metricbeat"))
runMetricbeatArgs := []string{
"run",
"--rm",
"--name=metricbeat",
"--pod=logcollection",
"--privileged",
"--log-driver=none",
"--volume=/proc:/hostfs/proc:ro",
"--volume=/sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro",
"--volume=/run/metricbeat/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro",
versions.MetricbeatImage,
}
runMetricbeatCmd := exec.CommandContext(ctx, "podman", runMetricbeatArgs...)
logger.Infof("Run metricbeat command: %v", runMetricbeatCmd.String())
runMetricbeatCmd.Stdout = metricbeatLog
runMetricbeatCmd.Stderr = metricbeatLog
if err := runMetricbeatCmd.Start(); err != nil {
return fmt.Errorf("failed to run metricbeat: %w", err)
}
return nil
}
@ -280,14 +241,6 @@ type filebeatConfInput struct {
AddCloudMetadata bool
}
type metricbeatConfInput struct {
Port int
LogstashHost string
CollectEtcdMetrics bool
CollectSystemMetrics bool
AddCloudMetadata bool
}
func writeTemplate(path string, templ *template.Template, in any) error {
if err := os.MkdirAll(filepath.Dir(path), 0o777); err != nil {
return fmt.Errorf("creating template dir: %w", err)