Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-60275

Windows exporter service fails to collect textfile metrics due to missing textfile directory

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • 3
    • Moderate
    • None
    • None
    • None
    • WINC - Sprint 276
    • 1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

          Windows exporter service fails to collect textfile metrics due to missing textfile directory. The service is configured to use the textfile collector but the expected directory "C:\k\textfile_inputs" does not exist, causing the collector to fail with error "The system cannot find the file specified."

      Version-Release number of selected component (if applicable):

          windows_exporter - version from service binary path: C:\k\windows_exporter.exe
      Service configured with collectors: cpu,cs,logical_disk,net,os,service,system,textfile,container,memory,cpu_info

      How reproducible:

          Always - occurs every time the windows_exporter service attempts to collect textfile metrics

      Steps to Reproduce:

      1. Deploy Windows node with WMCO
      2. Verify windows_exporter service is running
      3. Check Windows Event Logs for windows_exporter events
      4. Observe textfile collector failure in Event ID 101     

      Actual results:

          PS C:\Users\Administrator> Get-EventLog -LogName Application -Source windows_exporter  -Newest 1 | Format-List *
      
      EventID            : 101MachineName        : winlogquery-p2ff6Data               : {}Index              : 3777Category           : (0)CategoryNumber     : 0EntryType          : WarningMessage            : The description for Event ID '101' in Source 'windows_exporter' cannot be found.  The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have                         permission to access them.  The following information is part of the event:'source=collect.go:212 msg="collector textfile failed after 15.9088ms, resulting in 0 metrics" err="error reading textfile directory                     \"C:\\\\k\\\\textfile_inputs\": error reading directory: CreateFile C:\\k\\textfile_inputs: The system cannot find the file specified."'Source             : windows_exporterReplacementStrings : {source=collect.go:212 msg="collector textfile failed after 15.9088ms, resulting in 0 metrics" err="error reading textfile directory \"C:\\\\k\\\\textfile_inputs\": error reading directory: CreateFile                     C:\\k\\textfile_inputs: The system cannot find the file specified."}InstanceId         : 101TimeGenerated      : 8/8/2025 6:20:25 PMTimeWritten        : 8/8/2025 6:20:25 PMUserName           :Site               :Container          :
      

      Expected results:

          windows_exporter should not report the error reading textfile directory \"C:\\\\k\\\\textfile_inputs\" 

      Additional info:

          PS C:\Users\Administrator> sc.exe qc windows_exporter
      [SC] QueryServiceConfig SUCCESSSERVICE_NAME: windows_exporter
              TYPE               : 10  WIN32_OWN_PROCESS
              START_TYPE         : 3   DEMAND_START
              ERROR_CONTROL      : 0   IGNORE
              BINARY_PATH_NAME   : C:\k\windows_exporter.exe --collectors.enabled cpu,cs,logical_disk,net,os,service,system,textfile,container,memory,cpu_info --web.config.file C:\k\tls\windows-exporter-webconfig.yaml
              LOAD_ORDER_GROUP   :
              TAG                : 0
              DISPLAY_NAME       : windows_exporter
              DEPENDENCIES       :
              SERVICE_START_NAME : LocalSystem
      

      The textfile collector is documented to require a directory for reading .prom files:
      https://github.com/prometheus-community/windows_exporter/blob/c2df4d751473442f66fc13324e27199b0879ccfb/docs/collector.textfile.md

      Issue appears to be that WMCO does not create the expected textfile_inputs directory during Windows node configuration, but enables the textfile collector which expects this directory to exist.

              jvaldes@redhat.com J V
              jvaldes@redhat.com J V
              None
              None
              Aharon Rasouli Aharon Rasouli
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: