Telegraf on Windows
-
Hi all,
Does anyone have Telegraf running successfully on Windows? I installed v1.22.0 today for my Protop 319 installation on Windows 10, but it isn't playing nicely - I'm not getting any server stats in my dashboard.
-
Download and unpack to c:\program files\telegraf
-
Set outputs.influxdb in telegraf.conf:
urls = ["http://dashboard.protop.com.au/data-z6418"] -
Set logfile in telegraf.conf:
logfile = "c:/temp/telegraf.log" -
Install Telegraf as a service and start the Telegraf service. Telegraf.log now contains the following, in addition to the usual database creation error:
2022-03-29T04:11:00Z I! Starting Telegraf 1.22.0
2022-03-29T04:11:00Z I! Loaded inputs: cpu disk diskio kernel mem processes swap system
2022-03-29T04:11:00Z I! Loaded aggregators:
2022-03-29T04:11:00Z I! Loaded processors:
2022-03-29T04:11:00Z I! Loaded outputs: influxdb
2022-03-29T04:11:00Z I! Tags enabled: host=NWILLIAMSON01
2022-03-29T04:11:00Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"NWILLIAMSON01", Flush Interval:10s
2022-03-29T04:11:00Z W! [inputs.processes] Current platform is not supported- Run the test: telegraf.exe --test --config "C:\Program Files\Telegraf\Telegraf.conf"
I get this on the screen:
system,host=NWILLIAMSON01 load1=0,load15=0,load5=0,n_cpus=8i 1648527210000000000
system,host=NWILLIAMSON01 uptime=77784i 1648527210000000000
system,host=NWILLIAMSON01 uptime_format="21:36" 1648527210000000000
mem,host=NWILLIAMSON01 available=17890078720i,available_percent=52.51187941814987,total=34068631552i,used=16178552832i,used_percent=47.48812058185013 1648527210000000000
diskio,host=NWILLIAMSON01,name=C: io_time=0i,iops_in_progress=0i,merged_reads=0i,merged_writes=0i,read_bytes=13601218048i,read_time=92i,reads=403038i,weighted_io_time=0i,write_bytes=57326195200i,write_time=247i,writes=4991371i 1648527210000000000
disk,device=C:,fstype=NTFS,host=NWILLIAMSON01,mode=rw,path=\C: free=740135219200i,inodes_free=0i,inodes_total=0i,inodes_used=0i,total=1021206048768i,used=281070829568i,used_percent=27.523419970640457 1648527210000000000
swap,host=NWILLIAMSON01 free=51582259200i,total=68428369920i,used=16846110720i,used_percent=24.61860590818528 1648527210000000000
swap,host=NWILLIAMSON01 in=0i,out=0i 1648527210000000000
cpu,cpu=cpu0,host=NWILLIAMSON01 usage_guest=0,usage_guest_nice=0,usage_idle=96.96969696969697,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=0,usage_user=3.0303030303030303 1648527210000000000
cpu,cpu=cpu1,host=NWILLIAMSON01 usage_guest=0,usage_guest_nice=0,usage_idle=96.96969696969697,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=3.0303030303030303,usage_user=0 1648527210000000000
cpu,cpu=cpu2,host=NWILLIAMSON01 usage_guest=0,usage_guest_nice=0,usage_idle=63.63636363636363,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=33.333333333333336,usage_user=3.0303030303030303 1648527210000000000
cpu,cpu=cpu3,host=NWILLIAMSON01 usage_guest=0,usage_guest_nice=0,usage_idle=90.9090909090909,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=6.0606060606060606,usage_user=3.0303030303030303 1648527210000000000
cpu,cpu=cpu4,host=NWILLIAMSON01 usage_guest=0,usage_guest_nice=0,usage_idle=96.96969696969697,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=3.0303030303030303,usage_user=0 1648527210000000000
cpu,cpu=cpu5,host=NWILLIAMSON01 usage_guest=0,usage_guest_nice=0,usage_idle=84.84848484848484,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=15.151515151515152,usage_user=0 1648527210000000000
cpu,cpu=cpu6,host=NWILLIAMSON01 usage_guest=0,usage_guest_nice=0,usage_idle=87.87878787878788,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=12.121212121212121,usage_user=0 1648527210000000000
cpu,cpu=cpu7,host=NWILLIAMSON01 usage_guest=0,usage_guest_nice=0,usage_idle=96.96969696969697,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=3.0303030303030303,usage_user=0 1648527210000000000
cpu,cpu=cpu-total,host=NWILLIAMSON01 usage_guest=0,usage_guest_nice=0,usage_idle=89.39393939393939,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=9.469696969696969,usage_user=1.1363636363636365 1648527210000000000...and this in telegraf.log:
2022-03-29T04:13:29Z I! Starting Telegraf 1.22.0
2022-03-29T04:13:29Z I! Loaded inputs: cpu disk diskio kernel mem processes swap system
2022-03-29T04:13:29Z I! Loaded aggregators:
2022-03-29T04:13:29Z I! Loaded processors:
2022-03-29T04:13:29Z W! Outputs are not used in testing mode!
2022-03-29T04:13:29Z I! Tags enabled: host=NWILLIAMSON01
2022-03-29T04:13:29Z W! [inputs.processes] Current platform is not supportedGoogling, I see some posts about the "not supported" error in various forums and I see people commenting that Telegraf is only experimental on Windows, although the vendor's website says they do support Telegraf - but no other products - on Windows.
TIA
Nick -
-
Hmm... looking here (https://github.com/influxdata/telegraf/issues/10162) it sounds like the config file for Windows might include entries that are Linux-specific, and so when Telegraf says "not supported" it is really only complaining about the "inputs.processes" section which should not be there.
In fact, if I comment that section then I don't get the "not supported" error. However, I'm still not getting any stats in my server dashboard. Could someone post a telegraf.conf file from a working Windows setup, so that I can make my file has everything it needs?
-
@nickw Hi Nick. I do have it running successfully now on Windows 10. I added this troubleshooting tip to White Star's Telegraf KB entry.
Common Issue 3: Windows server data not showing up in the portal
- Edit your telegraf.conf and uncomment all of the sections that include references to "win_" . For Telegraf v1.22.0 these lines are found between line 6967 and 7113. Do not uncomment all of them, some are comments and some are options so only remove the # at the start of the line.
We have had success by uncommenting these lines:
6968, 6988, 6996-7113
- Restart the service and your server data should start to appear on the portal.
-
@mlb3820 Thanks Mark. That's fixed it.