@cryptotaxi247 / netdata-1 / commits / 46d21b53c

improve netdatacli docs (#18518)

Ilya Mashchenko committed Sep 10, 2024 at 23:02 UTC 46d21b53c37112cc1f897579a0790327322a602c
1 file changed +17 -29
src/cli/README.md
+17 -29
@@ -1,37 +1,25 @@
1 # Netdata Agent CLI
2
3 -The `netdatacli` executable provides a simple way to control the Netdata agent's operation.
3 +The `netdatacli` executable offers a straightforward way to manage the Netdata Agent's operations.
4
5 -You can see the commands `netdatacli` supports by executing it with `netdatacli` and entering `help` in
6 -standard input. All commands are given as standard input to `netdatacli`.
5 +It is located in the same directory as the `netdata` binary.
6
8 -The commands that a running netdata agent can execute are the following:
7 +Available commands:
8
10 -```sh
11 -The commands are (arguments are in brackets):
12 -help
13 - Show this help menu.
14 -reload-health
15 - Reload health configuration.
16 -reload-labels
17 - Reload all labels.
18 -save-database
19 - Save internal DB to disk for database mode save.
20 -reopen-logs
21 - Close and reopen log files.
22 -shutdown-agent
23 - Cleanup and exit the netdata agent.
24 -fatal-agent
25 - Log the state and halt the netdata agent.
26 -reload-claiming-state
27 - Reload agent claiming state from disk.
28 -ping
29 - Return with 'pong' if agent is alive.
30 -aclk-state [json]
31 - Returns current state of ACLK and Cloud connection. (optionally in json)
32 -dumpconfig
33 - Returns the current netdata.conf on stdout.
34 -```
9 +| Command | Description |
10 +|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
11 +| `help` | Display usage information and exit. |
12 +| `reload-health` | Reloads the Netdata health configuration, updating alerts based on changes made to configuration files. |
13 +| `reload-labels` | Reloads [host labels](/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts.md#custom-labels) from netdata.conf. |
14 +| `reopen-logs` | Close and reopen log files. |
15 +| `shutdown-agent` | Gracefully shut down the Netdata Agent. |
16 +| `fatal-agent` | Log the current state and forcefully halt the Netdata Agent. |
17 +| `reload-claiming-state` | Reload the Agent's claiming state from disk. |
18 +| `ping` | Checks the Agent's status. If the Agent is alive, it exits with status code 0 and prints 'pong' to standard output. Exits with status code 255 otherwise. |
19 +| `aclk-state [json]` | Return the current state of ACLK and Cloud connection. Optionally in JSON. |
20 +| `dumpconfig` | Display the current netdata.conf configuration. |
21 +| `remove-stale-node <node_id \| machine_guid \| hostname \| ALL_NODES>` | Unregisters a stale child Node, removing it from the parent Node's UI and Netdata Cloud. This is useful for ephemeral Nodes that may stop streaming and remain visible as stale. |
22 +| `version` | Display the Netdata Agent version. |
23
24 See also the Netdata daemon [command line options](/src/daemon/README.md#command-line-options).
25