Install alloy on kubernetes for window and linux

Hi,

I have kubernetes cluster with successful installed grafana, Prometheus, loki. I have successfully installed on linux node alloy but unable to window node.

Kindly help me to troubleshoot this issue.

Thanks

Hi @biswajitsahu357,

Can you share the steps that you are using for installation?

Hi, Please find the below steps , Which I did,

helm install --values lokis.yaml loki grafana/loki -n monitoring --create-namespace
helm install --values prom.yaml prometheus prometheus-community/kube-prometheus-stack -n monitoring --create-namespace
helm install --values alloy-linux.yaml alloy-linux grafana/alloy -n monitoring --create-namespace
helm install --values alloy-win.yaml alloy-windows grafana/alloy -n monitoring --create-namespace

I can see linux alloy is running as expected but windows is not, I am sharing the values.yaml for windows alloy, kindly help me to troubleshoot

alloy:
  configMap:
    content: |-
      prometheus.exporter.windows "default" {
        enabled_collectors = ["cpu", "logical_disk", "net", "os", "service", "system", "memory", "container", "textfile", "cpu_info", "process", "scheduled_task", "tcp"]
      }

      prometheus.scrape "example" {
        targets    = prometheus.exporter.windows.default.targets
        forward_to = [prometheus.remote_write.demo.receiver]
      }

      prometheus.remote_write "demo" {
        endpoint {
          url = "http://prometheus-kube-prometheus-prometheus.monitoring:9090/api/v1/write"
        }
      }

      loki.source.windowsevent "application"  {
          eventlog_name = "Application"
          use_incoming_timestamp = true
          forward_to = [loki.process.endpoint.receiver]
      }

      loki.source.windowsevent "System"  {
          eventlog_name = "System"
          use_incoming_timestamp = true
          forward_to = [loki.process.endpoint.receiver]
      }

      loki.process "endpoint" {
        forward_to = [loki.write.endpoint.receiver]
        stage.json {
            expressions = {
                message = "",
                Overwritten = "",
                source = "",
                computer = "",
                eventRecordID = "",
                channel = "",
                component_id = "",
                execution_processId = "",
                execution_processName = "",
            }
        }

        stage.structured_metadata {
            values = {
                "eventRecordID" = "",
                "channel" = "",
                "component_id" = "",
                "execution_processId" = "",
                "execution_processName" = "",
            }
        }

        stage.eventlogmessage {
            source = "message"
            overwrite_existing = true
        }

        stage.labels {
            values = {
                "service_name" = "source",
            }
      }

      stage.output {
          source = "message"
      }

      }

      loki.write "endpoint" {
          endpoint {
              url ="http://loki-gateway.monitoring.svc.cluster.local/loki/api/v1/push"
          }
      }

      livedebugging{}
image:
  repository: grafana/alloy
  tag: windowsservercore-ltsc2022

controller:
  nodeSelector:
    kubernetes.io/os: windows

Sorry for inconvience, Please check the link, where I take the reference, alloy-scenarios/windows/config.alloy at main · grafana/alloy-scenarios · GitHub