feat: add `overwrite-pid-file` and `pid-file` (#5972)

* feat: add `overwrite-pid-file` and `pid-file` 

Add documentation for `overwrite-pid-file` and `pid-file` configuration options available in v2.7.11.

* Update content/influxdb/v2/reference/config-options.md

* Update content/influxdb/v2/reference/config-options.md

* added new influxd pid flags to data file

---------

Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>
Co-authored-by: Scott Anderson <scott@influxdata.com>
pull/5940/head^2
Geoffrey Wossum 2025-04-14 11:06:13 -05:00 committed by GitHub
parent 1e9179c050
commit 62bd81d4c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 106 additions and 0 deletions

View File

@ -153,6 +153,8 @@ To configure InfluxDB, use the following configuration options when starting the
- [nats-max-payload-bytes](#nats-max-payload-bytes) <em style="opacity:.65">- (deprecated)</em>
- [nats-port](#nats-port) <em style="opacity:.65">- (deprecated)</em>
- [no-tasks](#no-tasks)
- [overwrite-pid-file](#overwrite-pid-file)
- [pid-file](#pid-file)
- [pprof-disabled](#pprof-disabled)
- [query-concurrency](#query-concurrency)
- [query-initial-memory-bytes](#query-initial-memory-bytes)
@ -1333,6 +1335,104 @@ no-tasks = true
---
### overwrite-pid-file
Overwrite the PID file specified by [pid-file](#pid-file) if it exists, instead of exiting with an error.
**Default:** `false`
| influxd flag | Environment variable | Configuration key |
| :--------------------- | :--------------------------- | :------------------- |
| `--overwrite-pid-file` | `INFLUXD_OVERWRITE_PID_FILE` | `overwrite-pid-file` |
###### influxd flag
<!--pytest.mark.skip-->
```sh
influxd --overwrite-pid-file
```
###### Environment variable
```sh
export INFLUXD_OVERWRITE_PID_FILE=true
```
###### Configuration file
{{< code-tabs-wrapper >}}
{{% code-tabs %}}
[YAML](#)
[TOML](#)
[JSON](#)
{{% /code-tabs %}}
{{% code-tab-content %}}
```yml
overwrite-pid-file: true
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```toml
overwrite-pid-file = true
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```json
{
"overwrite-pid-file": true
}
```
{{% /code-tab-content %}}
{{< /code-tabs-wrapper >}}
---
### pid-file
Write the PID file to the specified path and remove it when InfluxDB stops.
**Default:** ``
| influxd flag | Environment variable | Configuration key |
|------------- | :------------------- | :---------------- |
| `--pid-file` | `INFLUXD_PID_FILE` | `pid-file` |
###### influxd flag
<!--pytest.mark.skip-->
```sh
influxd --pid-file /path/to/pid-file
```
###### Environment variable
```sh
export INFLUXD_PID_FILE=/path/to/pid-file
```
###### Configuration file
{{< code-tabs-wrapper >}}
{{% code-tabs %}}
[YAML](#)
[TOML](#)
[JSON](#)
{{% /code-tabs %}}
{{% code-tab-content %}}
```yml
pid-file: /path/to/pid-file
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```toml
pid-file = "/path/to/pid-file"
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```json
{
"pid-file": "/path/to/pid-file"
}
```
{{% /code-tab-content %}}
{{< /code-tabs-wrapper >}}
---
### pprof-disabled
Disable the `/debug/pprof` HTTP endpoint.
This endpoint provides runtime profiling data and can be helpful when debugging.

View File

@ -77,6 +77,12 @@
- flag: "--no-tasks"
added: 2.0
- flag: "--overwrite-pid-file"
added: 2.7
- flag: "--pid-file"
added: 2.7
- flag: "--pprof-disabled"
added: 2.0