Promtail windows configuration script, binary and config file
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.6 KiB

  1. # install glpi and windows exporter
  2. New-Item -Path "c:\\" -Name "collectors" -ItemType "directory"
  3. $exporter_url = "https://sovran.dev/akshay/promtail-windows/raw/branch/master/windows_exporter-0.24.0-amd64.msi"
  4. $exporter_dir= "c:\collectors\windows_exporter.msi"
  5. Invoke-WebRequest -Uri $exporter_url -OutFile $exporter_dir
  6. msiexec /i windows_exporter.msi ENABLED_COLLECTORS="service,system,textfile,cpu,cs,logial_disk,net,os,logon,memory,process"
  7. $glpi_url = "https://sovran.dev/akshay/promtail-windows/raw/branch/master/GLPI-Agent-1.5-x64.msi"
  8. $glpi_dir= "c:\collectors\glpi_agent.msi"
  9. $glpi_config_url = "https://sovran.dev/akshay/promtail-windows/raw/branch/master/agent.cfg"
  10. $glpi_config_dir= "c:\Program Files\GLPI-Agent\etc\agent.cfg"
  11. Invoke-WebRequest -Uri $glpi_url -OutFile $glpi_dir
  12. Invoke-WebRequest -Uri $glpi_config_curl -OutFile $glpi_config_dir
  13. msiexec /i glpi_agent.msi
  14. # Install promtail for event logs
  15. New-Item -Path "c:\\" -Name "promtail" -ItemType "directory"
  16. $exec_url = "https://sovran.dev/akshay/promtail-windows/raw/branch/master/promtail-windows-amd64.exe.zip"
  17. $config_url = "https://sovran.dev/akshay/promtail-windows/raw/branch/master/promtail-config.yaml"
  18. $exec_dir= "c:\promtail\promtail-windows-amd64.exe.zip"
  19. $config_dir= "c:\promtail\promtail-config.yaml"
  20. Invoke-WebRequest -Uri $exec_url -OutFile $exec_dir
  21. Invoke-WebRequest -Uri $config_url -OutFile $config_dir
  22. Expand-Archive -LiteralPath $exec_dir -DestinationPath "c:\\promtail"
  23. C:\promtail\promtail-windows-amd64.exe --config.file="C:\promtail\promtail-config.yaml" --config.expand-env=true