tech:prometheus_windows_export_i386_compilation_go_lang
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:prometheus_windows_export_i386_compilation_go_lang [2025/04/04 16:34] – Jean-Baptiste | tech:prometheus_windows_export_i386_compilation_go_lang [2025/04/07 18:27] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Prometheus windows_export i386 compilation go lang | ||
| + | |||
| + | |||
| + | **Brouillon** | ||
| + | |||
| + | Nous avons besoin de récupérer le maximum de métriques sur un OS XP 32bits. | ||
| + | |||
| + | Une solution est d' | ||
| + | |||
| + | // Source : https:// | ||
| + | |||
| + | |||
| + | ** Ca ne marche pas en compilant ** | ||
| + | |||
| + | ** Go 1.10 is the last release to support Windows Vista or below ** | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | La dernière version compatible Win32 : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ## Usage | ||
| + | |||
| + | C:\Program Files\windows_exporter\ | ||
| + | |||
| + | |||
| + | ## Command line Usage | ||
| + | |||
| + | ~~~ | ||
| + | --config.file=CONFIG.FILE | ||
| + | --collectors.enabled=" | ||
| + | --collector.tcp.enabled=" | ||
| + | --collector.performancecounter.objects="" | ||
| + | --collector.netframework.enabled=" | ||
| + | --collector.process.include=" | ||
| + | --collector.scheduled_task.include=" | ||
| + | --collector.service.include=" | ||
| + | --collector.net.enabled=" | ||
| + | --collector.net.nic-include=" | ||
| + | --collector.time.enabled=" | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Usage old version wmi_exporter-0.9.0 | ||
| + | |||
| + | ~~~winbatch | ||
| + | msiexec /i wmi_exporter-0.9.0-386.msi ENABLED_COLLECTORS=cpu, | ||
| + | ~~~ | ||
| + | |||
| + | On test : http:// | ||
| + | |||
| + | |||
| + | ## Other | ||
| + | |||
| + | |||
| + | https:// | ||
| + | |||
| + | ~~~ | ||
| + | time=2025-04-03T11: | ||
| + | time=2025-04-03T11: | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | ---------- | ||
| + | |||
| + | ## Old | ||
| + | |||
| + | ## Compile sur Windows | ||
| + | |||
| + | ~~~ | ||
| + | set http_proxy=http:// | ||
| + | set https_proxy=http:// | ||
| + | |||
| + | go install github.com/ | ||
| + | set GOARCH=386 | ||
| + | go install github.com/ | ||
| + | cd $env: | ||
| + | promu build -v | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | ### Compiled on GNU+Linux WSL | ||
| + | |||
| + | ~~~ | ||
| + | sudo apt-get install gcc-multilib | ||
| + | sudo apt-get install gcc-mingw-w64 | ||
| + | |||
| + | go install github.com/ | ||
| + | |||
| + | export http_proxy=http:// | ||
| + | export https_proxy=http:// | ||
| + | |||
| + | GOOS=windows GOARCH=386 CGO_ENABLED=1 CXX=i686-w64-mingw32-g++ CC=i686-w64-mingw32-gcc | ||
| + | export GOOS GOARCH CGO_ENABLED CXX CC | ||
| + | go install github.com/ | ||
| + | cd ~/ | ||
| + | promu build -v | ||
| + | ~~~ | ||
| + | |||
| + | ~~~ | ||
| + | go: downloading github.com/ | ||
| + | go: downloading google.golang.org/ | ||
| + | go: downloading github.com/ | ||
| + | github.com/ | ||
| + | !! command failed: build -o windows_exporter.exe -ldflags -X github.com/ | ||
| + | ~~~ | ||
| + | |||
| + | Solution : remplacer '' | ||
| + | ~~~ | ||
| + | go build -o / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | ### Err windows_exporter.exe is not a valid Win32 application | ||
| + | |||
| + | Voir https:// | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | $ file windows_exporter* | ||
| + | windows_exporter.exe: | ||
| + | windows_exporter_CompiledOnOuindoze.exe: | ||
| + | ~~~ | ||
| + | |||
