Improve startup error reporting when ran as Windows service (#4291)
This commit is contained in:
committed by
Daniel Nelson
parent
8c6ddcd7fa
commit
7ec54d4be9
@@ -141,8 +141,12 @@ The agent table configures Telegraf and the defaults used across all plugins.
|
||||
- **quiet**:
|
||||
Log only error level messages.
|
||||
|
||||
- **logtarget**:
|
||||
Log target - `file`, `stderr` or `eventlog` (Windows only).
|
||||
The empty string means to log to stderr.
|
||||
|
||||
- **logfile**:
|
||||
Log file name, the empty string means to log to stderr.
|
||||
Log file name.
|
||||
|
||||
- **logfile_rotation_interval**:
|
||||
The logfile will be rotated after the time interval specified. When set to
|
||||
|
||||
@@ -56,8 +56,13 @@ You can install multiple telegraf instances with --service-name flag:
|
||||
> C:\"Program Files"\Telegraf\telegraf.exe --service uninstall --service-name telegraf-1
|
||||
```
|
||||
|
||||
Troubleshooting common error #1067
|
||||
## Troubleshooting
|
||||
|
||||
When Telegraf runs as a Windows service, Telegraf logs messages to Windows events log before configuration file with logging settings is loaded.
|
||||
Check event log for an error reported by `telegraf` service in case of Telegraf service reports failure on its start: Event Viewer->Windows Logs->Application
|
||||
|
||||
**Troubleshooting common error #1067**
|
||||
|
||||
When installing as service in Windows, always double check to specify full path of the config file, otherwise windows service will fail to start
|
||||
|
||||
--config C:\"Program Files"\Telegraf\telegraf.conf
|
||||
--config "C:\Program Files\Telegraf\telegraf.conf"
|
||||
|
||||
Reference in New Issue
Block a user