Continuation of https://review.opendev.org/c/starlingx/docs/+/819157 based on PV inputs. Minor change to command format port/host enumeration. Story: 2009018 Task: 43991 Signed-off-by: Ron Stone <ronald.stone@windriver.com> Change-Id: I26c2332321d03c2498a1cec3c398890933806e5d
14 KiB
Configure collectd to Store Host Performance Data
You can use collectd to receive and store performance data from multiple hosts.
The collectd network plugin configuration is disabled by default. Use
the network_servers
service-parameter to enable and
configure it for use on one or more hosts and ports.
Note
If you are planning to use a remote InfluxDB instance as a receiver, the default port is 25826. Overriding this port must be done on the host where an InfluxDB instance is running.
If a port is not defined using the service parameter, the default port from InfluxDB will be automatically set but will not be visible in the service parameter list. Therefore, skipping port definition is discouraged.
Add collectd configuration parameters
List the currently configured service parameters:
~(keystone_admin)]$ system service-parameter-list +-------------+------------+---------+-----------------+-------+-------------+----------+ | uuid | service | section | name | value | personality | resource | +-------------+------------+---------+-----------------+-------+-------------+----------+ | 17d024d1... | horizon | auth | lockout_retries | 3 | None | None | | bf3cefdb... | horizon | auth | lockout_seconds | 300 | None | None | | d574763b... | radosgw | config | fs_size_mb | 25 | None | None | | 03dd07ba... | http | config | http_port | 8080 | None | None | | 1bbdb378... | http | config | https_port | 8443 | None | None | | 8dc30732... | kubernetes | config | pod_max_pids | 10000 | None | None | | 3346bec7... | radosgw | config | service_enabled | false | None | None | +-------------+------------+---------+-----------------+-------+-------------+----------+
Note that collectd is not listed in the
section
column.Add the platform collectd
network_servers
service parameter using the following command format:system service-parameter-add platform collectd network_servers=<host1>:<port1>,<host2>:<port2>,...,<hostN>:<portN>
where:
host
-
A host to receive and store data on. IPv6 addresses are also supported. For example:
network_servers=[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]:8080,[ff18::efc0:4a42]:25826
port
-
A port on
<host>
to send data to. The port must be an integer between 1 and 65535.
Multiple host/port combinations can be specified as a comma-separated list. For example:
~(keystone_admin)]$ system service-parameter-add platform collectd network_servers=controller:25826,192.168.1.123:25826 +-------------+--------------------------------------+ | Property | Value | +-------------+--------------------------------------+ | uuid | 69553a96-1f73-4e7c-8fd0-1235c0aa1771 | | service | platform | | section | collectd | | name | network_servers | | value | controller:25826,192.168.1.123:25826 | | personality | None | | resource | None | +-------------+--------------------------------------+
To persist the new parameter, run the following command:
~(keystone_admin)]$ system service-parameter-apply platform
List the currently configured service parameters again and confirm your change:
~(keystone_admin)]$ system service-parameter-list +-------------+------------+----------+-----------------+--------------------------+-------------+----------+ | uuid | service | section | name | value | personality | resource | +-------------+------------+----------+-----------------+--------------------------+-------------+----------+ | 17d024d1... | horizon | auth | lockout_retries | 3 | None | None | | bf3cefdb... | horizon | auth | lockout_seconds | 300 | None | None | | 69553a96... | platform | collectd | network_servers | influxdb-host:25826,192. | None | None | | | | | | 168.1.123:25826 | | | | | | | | | | | | d574763b... | radosgw | config | fs_size_mb | 25 | None | None | | 03dd07ba... | http | config | http_port | 8080 | None | None | | 1bbdb378... | http | config | https_port | 8443 | None | None | | 8dc30732... | kubernetes | config | pod_max_pids | 10000 | None | None | | 3346bec7... | radosgw | config | service_enabled | false | None | None | +-------------+------------+----------+-----------------+--------------------------+-------------+----------+
(AIO-SX only) Lock and unlock the controller to have your changes take effect:
~(keystone_admin)]$ system host-lock controller-0 ~(keystone_admin)]$ system host-unlock controller-0
(AIO-DX or Standard systems) Lock and unlock controller-1.
~(keystone_admin)]$ system host-lock controller-1 ~(keystone_admin)]$ system host-unlock controller-1
This step can take up to 10 minutes.
Make controller-1 active.
~(keystone_admin)]$ system host-swact controller-0
Log in to controller-1.
Lock and unlock controller-0.
~(keystone_admin)]$ system host-lock controller-1 ~(keystone_admin)]$ system host-unlock controller-1
This step can take up to 10 minutes.
Set controller-0 as the active controller.
Swact to controller-0.
~(keystone_admin)]$ system host-swact controller-1
This step can take up to 10 minutes.
Edit collectd configuration parameters
Use the system service-parameter-modify
command to change
an existing collectd configuration.
Change the parameter.
This example replaces port 25826 on host 192.168.1.123 with port 25000 on host 192.168.1.200.
~(keystone_admin)]$ system service-parameter-modify platform collectd network_servers=192.168.1.200:25000,influxdb-host:25826 +-------------+-----------------------------------------+ | Property | Value | +-------------+-----------------------------------------+ | uuid | 69553a96-1f73-4e7c-8fd0-1235c0aa1771 | | service | platform | | section | collectd | | name | network_servers | | value | 192.168.1.200:25000,influxdb-host:25826 | | personality | None | | resource | None | +-------------+-----------------------------------------+
Persist the new parameter:
~(keystone_admin)]$ system service-parameter-apply platform
(AIO-SX only) Lock and unlock the controller to have your changes take effect:
~(keystone_admin)]$ system host-lock controller-0 ~(keystone_admin)]$ system host-unlock controller-0
(AIO-DX or Standard systems) Lock and unlock controller-1.
~(keystone_admin)]$ system host-lock controller-1 ~(keystone_admin)]$ system host-unlock controller-1
This step can take up to 10 minutes.
Make controller-1 active.
~(keystone_admin)]$ system host-swact controller-0
Log in to controller-1.
Lock and unlock controller-0.
~(keystone_admin)]$ system host-lock controller-1 ~(keystone_admin)]$ system host-unlock controller-1
This step can take up to 10 minutes.
Set controller-0 as the active controller.
Swact to controller-0.
~(keystone_admin)]$ system host-swact controller-1
This step can take up to 10 minutes.
This step can take up to 10 minutes.
Remove collectd configuration parameters
Use the system service-parameter-delete
command to remove
an existing collectd configuration.
List the currently configured service parameters and locate the appropriate :
~(keystone_admin)]$ system service-parameter-list +--------------------------------------+------------+----------+-----------------+--------------------------+-------------+----------+ | uuid | service | section | name | value | personality | resource | +--------------------------------------+------------+----------+-----------------+--------------------------+-------------+----------+ | 17d024d1-55d3-4bc9-a490-2eda6e19e6d1 | horizon | auth | lockout_retries | 3 | None | None | | bf3cefdb-3b27-4dd0-aa77-47f362a23db2 | horizon | auth | lockout_seconds | 300 | None | None | | 69553a96-1f73-4e7c-8fd0-1235c0aa1771 | platform | collectd | network_servers | influxdb-host:25826,192. | None | None | | | | | | 168.1.123:25826 | | | | | | | | | | | | d574763b-e90b-4cca-a577-03269f1fc473 | radosgw | config | fs_size_mb | 25 | None | None | | 03dd07ba-fd7e-4ec1-8113-42ea9d6bcb96 | http | config | http_port | 8080 | None | None | | 1bbdb378-a1d6-4eb0-b210-73d573954b8d | http | config | https_port | 8443 | None | None | | 8dc30732-b617-4ddd-aa97-69edd25e4075 | kubernetes | config | pod_max_pids | 10000 | None | None | | 3346bec7-3b57-4f21-a571-24d39f27dd0b | radosgw | config | service_enabled | false | None | None | +--------------------------------------+------------+----------+-----------------+--------------------------+-------------+----------+
In this example, the for collectd is
69553a96-1f73-4e7c-8fd0-1235c0aa1771
.Remove the parameter:
~(keystone_admin)]$ system service-parameter-delete 69553a96-1f73-4e7c-8fd0-1235c0aa1771
List the currently configured service parameters:
~(keystone_admin)]$ system service-parameter-list +-------------+------------+---------+-----------------+-------+-------------+----------+ | uuid | service | section | name | value | personality | resource | +-------------+------------+---------+-----------------+-------+-------------+----------+ | 17d024d1... | horizon | auth | lockout_retries | 3 | None | None | | bf3cefdb... | horizon | auth | lockout_seconds | 300 | None | None | | d574763b... | radosgw | config | fs_size_mb | 25 | None | None | | 03dd07ba... | http | config | http_port | 8080 | None | None | | 1bbdb378... | http | config | https_port | 8443 | None | None | | 8dc30732... | kubernetes | config | pod_max_pids | 10000 | None | None | | 3346bec7... | radosgw | config | service_enabled | false | None | None | +-------------+------------+---------+-----------------+-------+-------------+----------+
Note that collectd is no longer listed in the
section
column.(AIO-SX only) Lock and unlock the controller to have your changes take effect:
~(keystone_admin)]$ system host-lock controller-0 ~(keystone_admin)]$ system host-unlock controller-0
(AIO-DX or Standard systems) Lock and unlock controller-1.
~(keystone_admin)]$ system host-lock controller-1 ~(keystone_admin)]$ system host-unlock controller-1
This step can take up to 10 minutes.
Make controller-1 active.
~(keystone_admin)]$ system host-swact controller-0
Log in to controller-1.
Lock and unlock controller-0.
~(keystone_admin)]$ system host-lock controller-1 ~(keystone_admin)]$ system host-unlock controller-1
This step can take up to 10 minutes.
Set controller-0 as the active controller.
Swact to controller-0.
~(keystone_admin)]$ system host-swact controller-1
This step can take up to 10 minutes.