NVIDIA UFM Cyber-AI Documentation v2.4.0
NVIDIA UFM Cyber-AI Documentation v2.4.0

CLI Tools

In addition to the REST API used for Cyber AI management, Cyber AI software provides several command-line tools (CLI) for managing the Cyber AI system.

The CLI tools are installed on the Cyber AI host and can communicate with the Cyber AI containers.

This tool is helpful for testing that cyberai is running and the suitable containers were loaded:

Tests

  • Checks ufm-cyberai service is running

  • Checks Cyber AI images are loaded
    "cyberai_worker" "cyberai_web" "cyberai_plm" "mellanox/ufm-telemetry"

  • Check containers are running
    cyberai-web" "cyberai-plm" "ufm-telemetry"

  • Checks that REST services are running

Usage

Copy
Copied!
            

ufm-cai-sanity


This script manages Cyber AI analytics jobs. Commands:

Command

Usage

dump

Dump status of a job if provided, otherwise dump status for all jobs (in json format)

list

List all job names

run

Runs given job

enable

Enables given job (Requires restart to take effect)

disable

Disables given job (Requires restart to take effect)

reset-stats

Resets all previous status (run times)

Usage

Copy
Copied!
            

ufm-cai-jobs [-h] | [-c (dump|list|run|enable|disable|reset-stats) [-j <job-name>]]


This script configures and shows the UFM connection info.

Usage

Copy
Copied!
            

ufm-cai-ufm-params (update|show) <option>

Update

Updates UFM configuration.

Option

Description

-i|--ip

UFM server IP

-p|--port

UFM REST API connection port

-U|--username

UFM username

-P|--password

UFM password

-s|--site

UFM site name

-t|--protocol

UFM Rest API connection protocol

Show

Shows current UFM configuration (except password).

This script checks the Cyber AI status, prints it or sends an email. The script runs once a day, using the Linux cron-job.

Usage

Copy
Copied!
            

usage: ufm-cai-status [-h] [-m] [-p {none,plain,simple,html,json}] optional arguments: -h, --help            show this help message and exit -m, --mail            Send an email with the status report -p {none,plain,simple,html,json}, --print-report {none,plain,simple,html,json}                        Specify how to print the status report to console


Configuration

The configuration file is located in: /opt/ufm/cyber-ai/conf/status_report_config.yaml

It should be configured properly in order for Cyber AI to run:

cyber-ai1.png


Cron Job

Copy
Copied!
            

# crontab -l 30 7 * * * /usr/local/bin/ufm-cyberai_status -m


This script collects data and logs from Cyber AI and saves it into a zipped file to be used for debugging and troubleshooting.

Usage

Copy
Copied!
            

ufm-cai-sysdump <options>

Options

Option

Description

-v|--verbose

explain what is being done

-n|--network

collect network counters files

-c|--cables

collect cable counters files

-z|--archived

collect archived counter files when associated with [-n] or [-c]

-g|--aggregated

collect aggregated files

-d|--database

collect database file(s)

-t|--topology

collect topology files

-m|--model

collect model files

-l|--log

collect log files

-f|--conf

collect configuration files

-a|--all

collect all above

Output

Output file is in tgz format:

Copy
Copied!
            

cyberai-sysdump-<date and time>.tgz

This script generates a csv file for each type of alerts in Cyber-AI according to the given interval and saves it to the specified output directory.

Usage

Copy
Copied!
            

ufm-cai-weekly-alerts-report [-h] [-i IP] [-t TIME] [-o OUT_DIR]

Options

Option

Long option

Description

-i

--ip

Cyber-AI IP address

-t

--time

Interval to get the data for. (1|2|3...)(h|d|w|m)

-o

--out-dir

output directory to save the data to

© Copyright 2023, NVIDIA. Last updated on Sep 5, 2023.