You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Telegraf is not saving from [[inputs.sqlserver]] to [[outputs.file]] when running it as Windows service but it works correctly when running it from command line. Service was ran on administrator account so it had administrator priviledges.
Relevant telegraf.conf:
[global_tags]
# dc = "us-east-1" # will tag all metrics with dc=us-east-1
# rack = "1a"
# Configuration for telegraf agent
[agent]
interval = "5s"
round_interval = true
metric_buffer_limit = 1000
flush_buffer_when_full = true
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
debug = true
quiet = false
logfile = "C:/Program Files/Telegraf/telegraf.log"
hostname = ""
###############################################################################
# OUTPUTS #
###############################################################################
[[outputs.file]]
## Files to write to, "stdout" is a specially handled file.
files = ["stdout", "C:/temp/sql/sqlperf.out"]
data_format = "json"
json_timestamp_units = "1ns"
###############################################################################
# INPUTS #
###############################################################################
[[inputs.sqlserver]]
servers = [
"Server=localhost\\servername;Port=1433;User Id=telegraf;Password=***********;app name=telegraf;log=1;",
]
System info:
Telegraf 1.5.3
Telegraf v1.7.0~0a02363c
Windows Server 2012 R2
Telegraf Running as service with --config parameter
Steps to reproduce:
Create config with [[inputs.sqlserver]] and [[outputs.file]]
Create windows service in powershell with command: $path/telegraf.exe --service install --config $path\telegraf.conf
Run service
Expected behavior:
output file is created and data is written to file
Actual behavior:
output file is created but file has always 0 bytes
Additional info:
when the same config is run from command line using $path/telegraf.exe --config $path/telegraf.conf file is created and data is written correctly.
With debug on, telegraf log when running from command line:
danielnelson
changed the title
Telegraf does not save sql data to file when running as Windows service
If file output cannot write to stdout it does not write to other files
Apr 17, 2018
Bug report
Telegraf is not saving from [[inputs.sqlserver]] to [[outputs.file]] when running it as Windows service but it works correctly when running it from command line. Service was ran on administrator account so it had administrator priviledges.
Relevant telegraf.conf:
System info:
Telegraf 1.5.3
Telegraf v1.7.0~0a02363c
Windows Server 2012 R2
Telegraf Running as service with --config parameter
Steps to reproduce:
Expected behavior:
output file is created and data is written to file
Actual behavior:
output file is created but file has always 0 bytes
Additional info:
when the same config is run from command line using $path/telegraf.exe --config $path/telegraf.conf file is created and data is written correctly.
With debug on, telegraf log when running from command line:
With debug on, telegraf log when running as service:
The text was updated successfully, but these errors were encountered: