Rate This Document
Findability
Accuracy
Completeness
Readability

server_config

Command Function

Encrypts the authentication credentials in the cluster collection configuration file in interactive mode.

Keep the encryption password entered during interaction secure. The password will be used in the collection phase.

Syntax

1
./kspect server_config [-h] [-o OUTPUT] [-i INPUT]

Parameter Description

Table 1 Parameters of the server_config command

Parameter

Description

-h/--help

Obtains help information.

-o/--output

Location where the server configuration file is generated. If this parameter is not specified, the server-config-xxxxxx-xxxx.ini file is generated in the current folder by default.

-i/--input

Path to the server configuration file to be edited. For details about the configuration file, see Table 2. This parameter is mandatory.

Example

  1. Edit the server configuration file.
    1
    vi server.ini
    

    Example content of the server.ini file:

    [100]
    ip = 192.168.x.x
    port = 22
    username = root
    login_method = private_key
    password =
    private_key_path = /root/.ssh/id_rsa
    private_key_password =
    bmc_ip = 192.168.x.x
    bmc_username = Administrator
    bmc_password =

    The authentication credential fields are password, private_key_path, private_key_password, and bmc_password.

    • You are not advised to save the password, private_key_password, or bmc_password field in plaintext in the configuration file. If they are saved in plaintext in the file, the corresponding server will be skipped during collection.
    • If BMC information is not collected, you do not need to enter the BMC user name or password.
    Table 2 Parameters in the configuration file

    Parameter

    Description

    [100]

    Server name.

    ip

    IP address of the server whose data is to be collected. This parameter is mandatory.

    port

    Port of the server whose data is to be collected. This parameter is mandatory.

    username

    Server OS user name. This parameter is mandatory.

    login_method

    Server login mode. This parameter is mandatory and its options are as follows:

    • password: Set the password parameter.
    • private_key: Set both private_key_path and private_key_password.

    password

    Password of the corresponding user, which can be entered on the interactive user interface. The password is encrypted only when it is entered on the interactive user interface.

    private_key_path

    Private key file path, which can be entered on the interactive user interface. The path is encrypted regardless of whether it is entered in the configuration file or on the interactive user interface.

    private_key_password

    Private key password, which can be entered on the interactive user interface. The password is encrypted only when it is entered on the interactive user interface.

    bmc_ip

    BMC IP address.

    bmc_username

    BMC user name.

    bmc_password

    BMC password, which can be entered on the interactive user interface. The password is encrypted only when it is entered on the interactive user interface.

  2. Encrypts the authentication credentials in the server.ini file in interactive mode.
    1
    ./kspect server_config -i /home/server.ini