feat: Adds 'config' to 'debug/vars' http endpoint#26624
feat: Adds 'config' to 'debug/vars' http endpoint#26624devanbenz merged 5 commits intomaster-1.xfrom
Conversation
devanbenz
commented
Jul 24, 2025
- Adds new field to debug/vars which includes various configuration information about a data node\ Example output:
* Adds new field to debug/vars which includes various configuration information about a data node\
Example output:
```
"config": {
"aggressive-points-per-block": 10000,
"cache-max-memory-size": 1073741824,
"cache-snapshot-memory-size": 26214400,
"cache-snapshot-write-cold-duration": "10m0s",
"compact-full-write-cold-duration": "4h0m0s",
"compact-throughput": 50331648,
"compact-throughput-burst": 50331648,
"dir": "/home/foo/.influxdb/data",
"max-concurrent-compactions": 0,
"max-index-log-file-size": 1048576,
"max-series-per-database": 1000000,
"max-values-per-tag": 100000,
"series-file-max-concurrent-compactions": 0,
"series-id-set-cache-size": 100,
"strict-error-handling": false,
"wal-dir": "/home/foo/.influxdb/wal",
"wal-fsync-delay": "0s"
},
```
davidby-influx
left a comment
There was a problem hiding this comment.
Probably should handle all the possible errors from the fmt. package functions, both in the new code and existing code
services/httpd/handler.go
Outdated
| } | ||
|
|
||
| if !first { | ||
| fmt.Fprintln(w, ",") |
There was a problem hiding this comment.
Fprintln can return an error.
services/httpd/handler.go
Outdated
| fmt.Fprintln(w, ",") | ||
| } | ||
| first = false | ||
| fmt.Fprintf(w, "\"config\": %s", data) |
There was a problem hiding this comment.
Fprintf can return an error
|
Or, if we believe that an |
It should be able to error as we catch other errors throughout the method. I've added error handling for the code I changed, do you think I should go through and add error handling to the other writers? |
davidby-influx
left a comment
There was a problem hiding this comment.
One non-blocking question
| case toml.Duration: | ||
| m[col] = time.Duration(v).String() | ||
| default: | ||
| m[col] = v |
There was a problem hiding this comment.
There are no other interesting types that need conversion?
There was a problem hiding this comment.
The only other two that I saw were toml.FileMode and toml.Group which were just a uint64 each. I didn't see them used in the configuration options that I'm exposing either.
|
@devanbenz - Is there a placeholder for backporting this to 1.12? |
(cherry picked from commit c28b917)