System Administration
...
Install an Ocient System
Installation Reference

Checking System After Configuration

The postcheck command helps capture critical node health states and metrics after the

 configuration process.

You can run the command as shown in this example. The flags included after the precheck command are optional. See Flags for Command Execution for descriptions.

Shell


The command invokes a script from the command line on operating systems supported by Ocient. The script sends output to standard output (STDOUT) and standard error (STDERR) with the option to send a text file or a JSON file. To specify the file option, use this flag: --logfile-location <directory> where <directory> is the directory where the postcheck command creates the log file.

Before you begin, ensure that all steps in the Ocient System Bootstrapping process are complete.

Prerequisites

The script requires Java® and the Ocient JDBC JAR to run. In most cases, you should use this script on client servers rather than database nodes.

To get the post-check script onto a client, perform the scp operation on the wheel onto the server and run python3 -m pip install --no-index <path_to_wheel>/postcheck*.whl, and replace <path_to_wheel> with the path to the directory of the wheel file on your server.

Flags for Command Execution

Use the postcheck command to run the script that checks the system configuration after you configure Ocient. You can execute the command using these flags.

Flag Name

Required

Values

Default

Description

Example

--dsn

Yes

Many

Not applicable

Data source name (DSN). The script prompts for your credentials.

--dsn ocient://host:port/path connects you to the specified cluster where host is the host name, port is the port number, and path is the path on the host for the connection.

--logfile-location

No

Non-empty string

/var/opt/ocient/log

Name of directory that contains the log file created from the execution of the script.

--logfile-location /user/query/logs generates a log file in the /user/query/logs directory. If this directory does not exist, the command issues a warning.

--print-level

No

verbose or silent

verbose

Denotes the level of detail in the output. See the “Outputs” section.

--print-level verbose provides a detailed report with information about the checks that Ocient performs. --print-level silent provides the overall status from the check of the system.

--timeout

No

Any integer

3

Denotes the default timeout (in seconds) for running any command-line command in the script. In most cases, the default is enough, so you do not need to specify this setting.

--timeout 4 runs checks with a timeout of 4 seconds for each command.

--jar-path

No

Non-empty string

/opt/ocient/current/ocient-jdbc4.jar

Denotes the path to the Ocient JDBC JAR. The default value is the usual location of the JAR file on an Ocient system. This path must be accurate for the postcheck command to run correctly.

--jar-path /opt/ocient/test_dir/jdbc.jar uses the JAR at /opt/ocient/test_dir/jdbc.jar to run JDBC commands for the postcheck command.

--json

No

Not applicable

False

If you specify the --json flag, the command prints output in JSON format to STDOUT. If you do not specify this flag, the command prints human-readable output to STDOUT.

--json prints output in JSON format to STDOUT.

Command Output

The command has two types of output, silent or verbose, which you can specify by using the --print-level flag at the command line.

Silent

The silent value for the --print-level flag only produces a status code. The code is 0 for success, 1 for error, and 2 for warning.

Verbose

The verbose value for the --print-level flag prints either human-readable output by default or output in JSON format (if you specify the --json flag). The output contains all status details.

This example shows human-readable output.

Text


This example shows output in JSON format.

JSON


Related Links