Comments (16)
Hi,
Can you reproduce this case and give me answer, why telegraf service does-not stop their service correctly?
I do not have access to Windows Server or Exchange, so I will not be able to reproduce on a similar system. I do have access to Windows 11 and I do not see any difference in reboot time between before the service was installed, while the service was installed, and again after uninstalling the service.
My suggestion to you is to do the following:
- Does this reproduce on the CLI? Namely, run telegraf for few collection cycles and then hit Ctrl-C. Does it close relatively quickly?
- Start removing plugins from your config and see if you can narrow it down if one particular one is causing the issue. Start with your single output, switch to say
[[outputs.file]]
and see if that helps. Then start removing the perf counters one by one.
from telegraf.
Hi!
If I starting telegraf using CLI or PowerShell, it work as expected.
I can terminate telegraf process using Ctrl + C
and it terminating successfully.
Following your recommendations, I replaced output plugin to [[outputs.file]]
(instead of [[outputs.prometheus_client]]
) and then stay only one processor-object from [[inputs.win_perf_counters.object]]
.
Telegraf config file now looks like this:
[global_tags]
[agent]
interval = "15s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "15s"
flush_jitter = "0s"
precision = ""
debug = true
quiet = false
logfile = "/Program Files/Telegraf/telegraf-metrics.log"
logfile_rotation_max_size = "1MB"
logfile_rotation_max_archives = 5
hostname = ""
omit_hostname = false
[[outputs.file]]
files = ["C:/Program Files/Telegraf/telegraf-metrics_outputs.file.txt"]
data_format = "influx"
[[inputs.win_perf_counters]]
[[inputs.win_perf_counters.object]]
ObjectName = "Processor"
Instances = ["*"]
Counters = [
"% Idle Time"
]
Measurement = "win_cpu"
Then I started telegraf service and send to server reboot command (delayed for 30 seconds).
- As you can see at screenshot, command to start telegraf service was invoked at
05:28:19
.
Then telegraf service writed at it own log-file, that it started at05:28:21
. - At
05:28:44
command to restart operating system (with 30 seconds delay) was invoked. - At
05:29:16
telegraf service writed at it own log-file, that it stopped successfully. - At
05:29:19
and at05:30:03
I asked operating system about telegraf service status, using command get-service, and get information, that telegraf service still continue running.
Also you can see on server console window, that it still waiting stopping services during reboot process.
Below I write steps, which you can use to reproduce my case.
Step 1
[DateTime]::UtcNow.ToString('u')
Get-Service -name telegraf-metrics | Stop-Service -PassThru -Verbose
Step 2
Change telegraf-config
Step 3
[DateTime]::UtcNow.ToString('u')
Get-Service -name telegraf-metrics | Start-Service -PassThru -Verbose
Step 4
[DateTime]::UtcNow.ToString('u')
Invoke-Expression -Command "shutdown /r /t 30"
Step 5
[DateTime]::UtcNow.ToString('u')
Get-Service -name telegraf-metrics
Attachments:
from telegraf.
Hi!
I did some research.
I consistently rolled back the telegraf version to an earlier one and It was experimentally determined that starting from version v1.18.1 the problem is reproducible stably.
On version 1.18.0, the telegraf service is terminated correctly by the operating system and the operating system reboot process occurs without freezing.
When the server is rebooted with telegraf service on version 1.18.0, Event 7036 appears in the operating system event log with information about the successful stop of the telegraf service βThe Telegraf for Metrics service entered the stopped state.β
from telegraf.
Related Issues (20)
- [aggregators.quantile]: Add unit-tests for tracking metrics HOT 1
- [aggregators.starlark]: Add unit-tests for tracking metrics HOT 1
- [aggregators.valuecounter]: Add unit-tests for tracking metrics HOT 1
- Rate limit multiple batch sends HOT 1
- Generic handling to ignore errors on startup HOT 2
- [processors.enum] Handle boolean and numeric values HOT 2
- Introduce Buffer Strategy agent config options HOT 4
- subscription management for clean sessions HOT 1
- The panicRecover func cannot capture the panics during plugin executions. HOT 3
- Inputs.prometheus fails to start with `content_length_limit` HOT 1
- [inputs.gnmi] Got empty metric-name for response HOT 4
- feat(outputs.websocket): support secrets in headers
- CSV serializer should allow to configure the order of the generated columns HOT 2
- outputs.http doesn't support json_transformation HOT 2
- Allow regex input for the processor plugin `converter` HOT 1
- test (internal): Failure when run in MST timezone
- test(inputs.procstat): Test fail when PID 543 in use
- JSON Parser Version 2 Plugin rounds a timestamp with the format timestamp_format=unix_ms HOT 1
- fieldinclude not working as expected HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegraf.