Comments (6)
Hmmm work for me on current master... I used the following config for testing
[agent]
interval = "1m"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 75000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
[[inputs.cpu]]
[[outputs.file]]
files = ["stdout"]
and ran telegraf --config test.conf --debug --pprof-addr localhost:6060
and get a page on
http://localhost:6060/debug/pprof/
from telegraf.
ok - I do think we should re-add this even though it is working and not rely on the fact that we are somehow getting lucky with an import.
@rebrendov I've re-opened your PR, could you look at whatever CI issues remain?
from telegraf.
Hmm, works for me as well on master (though I do not understand why, since there is no net/http/pprof
import anywhere - would very much appreciate if you'd give me a clue).
Seems like my problem was that I was running custom build and was mislead by the logs, tried that on master as well (test.conf is the same config you provided above)
# make build_tools
# ./tools/custom_builder/custom_builder --config test.conf
# ./telegraf --config test.conf --debug --pprof-addr localhost:6060
2024-03-28T09:18:12Z I! Loading config: test.conf
2024-03-28T09:18:12Z I! Starting pprof HTTP server at: http://localhost:6060/debug/pprof
2024-03-28T09:18:12Z I! Starting Telegraf 1.31.0-164f6790 (customized) brought to you by InfluxData the makers of InfluxDB
Still says that pprof HTTP server is starting, but http://localhost:6060/debug/pprof/ returns 404.
I guess I should close my PR since it works on master. Though not sure how to fix this for custom builds. I mean the change in the PR works for enabling pprof for custom builds and thats what i did to my telegraf, but it looks redundant for master build since it works without importing net/http/pprof
explicitly.
from telegraf.
Thanks for the update @rebrendov
My understanding is that if telegraf, or any of its dependencies import net/http/pprof
then the handlers are available. You may be on to something that we probably should ensure it is imported.
In your custom build, what are you doing differently? Is it just removing plugins? Or are you modifying anything outside of plugins?
from telegraf.
Yes I just remove plugins to speed up compilation.
from telegraf.
I see you already fixed the linter issue in PR, thank you.
Also fwiw I did find the dependency that was importing net/http/pprof
as you have guessed. It was "github.com/nats-io/nats-server/v2/server"
that is used by nats input plugin.
from telegraf.
Related Issues (20)
- Telegraf not restarting when OPC UA server restarts HOT 6
- Missing NetFlow Option packets HOT 7
- `response_timeout` deprecated option for Prometheus input still broken HOT 3
- Scan parser error: in [inputs.kinesis_consumer] HOT 1
- Missing template for NetFlow9? HOT 7
- opentelemetry output now throwing value type conflicts in some cases HOT 24
- x509 metrics no longer reporting invalid certificates HOT 7
- Input plugin http - Dynamique URL HOT 3
- inputs.systemd_units "Error in plugin: listing unit files failed" in v1.30.0 and v1.30.1 HOT 8
- S.M.A.R.T not all devices get auto detected and read HOT 3
- Meaning of field `expiry` is not clear HOT 2
- MySQL outputs plugin HOT 1
- [outputs.sql] support MySQL drivers? HOT 5
- inputs.sysstat setting a very long interval for sadc following a SIGHUP HOT 4
- [inputs.systemd_units] cpu usage goes through the roof! HOT 9
- chore: support new golang version 1.22.2
- Procstat Lookup reports PID as running even though the process is dead HOT 3
- [inputs.systemd_units] Error in plugin: listing loaded units failed: dbus: connection closed by user HOT 3
- [inputs.diskio] Starting with 1.30.1, telegraf spams logs with "Error gathering disk info" messages HOT 5
- [inputs.win_eventlog] not starting when using only eventlog_name HOT 2
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.