Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. $TELEGRAF_MACHINE = 'dbd7d94c033a4137a6c63f19e06e6523'; $TELEGRAF_HOST = 'http://traefik/a31153f43637d731dcacde589fdb65c4c762a3c78e68a1757ee7e4c49af0644e'; mkdir 'C:\Program Files\Telegraf';cd 'C:\Program Files\Telegraf'; Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force; (New-Object System.Net.WebClient).DownloadFile('https://dl.influxdata.com/telegraf/releases/telegraf-1.4.4_windows_i386.zip', 'C:\Program Files\Telegraf\telegraf.zip'); Expand-Archive .\telegraf.zip; cp .\telegraf\telegraf\telegraf.exe .; Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force; (New-Object System.Net.WebClient).DownloadFile('https://raw.githubusercontent.com/mistio/mist-telegraf/master/telegraf-windows.conf', 'C:\Program Files\Telegraf\telegraf.conf'); (Get-Content .\telegraf.conf) -replace 'TELEGRAF_HOST', $TELEGRAF_HOST | Set-Content .\telegraf.conf; (Get-Content .\telegraf.conf) -replace 'TELEGRAF_MACHINE', $TELEGRAF_MACHINE | Set-Content .\telegraf.conf; C:\'Program Files'\Telegraf\telegraf.exe --service install; net start telegraf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement