Overview
UFM Light is a C++ UFM plugin designed to create a reduced UFM model and deliver a high-performance REST API. While it builds a model similar to the legacy UFM, there are notable differences:
-
The model in UFM Light is streamlined to meet the specific requirements of the UFM Light REST API functionality.
-
UFM Light builds its model more quickly.
UFM Light offers the same REST API as the legacy UFM, but with enhanced performance.
Deployment
Prerequisites
-
UFM is running
-
Fast-API plugin is running
UFM Light builds its model from the Redis inventory and requires the Fast-API plugin as the inventory provider. Writing to Redis must be enabled in UFM.
Installation
-
Get UFM Light image:
docker pull mellanox/ufm-plugin-ufm-light
-
Load UFM Light plugin:
sudo /opt/ufm/scripts/manage_ufm_plugins.sh add -p ufm-light -t <version>
-
Configure the UFM Light plugin if needed (see "Configuration" section).
Note: it is recommended to configure parameter --http.threads to “4” for 16-Core systems, “16” for 64-Core systems.
Configuration
UFM Light runs with its default configuration. To update the configuration, edit:
sudo vim /opt/ufm/files/conf/plugins/ufm-light/ufm-light.cfg
If ufm-light.cfg is updated, the UFM Light plugin must be stopped and started again manually to apply the changes:
sudo /opt/ufm/scripts/manage_ufm_plugins.sh stop -p ufm-light
sudo /opt/ufm/scripts/manage_ufm_plugins.sh start -p ufm-light
Configuration Options:
--model.srcmode arg (=redis:invnt) base source of model: redis:invnt, redis:full, grpc
--model.period arg (=30) set farbric request period in seconds
--redis.address arg (=localhost) set Redis address
--redis.port arg (=6379) set Redis port
--grpc.address arg (=localhost) set gRPC address
--grpc.port arg (=2510) set gRPC port
--telemetry.address arg (=localhost) set Telemetry address
--telemetry.port arg (=9001) set Telemetry port
--telemetry.url arg (=/csv/cset/converted_enterprise) set Telemetry url
--http.address arg (=127.0.0.1) set http address
--http.port arg (=8950) set http port
--http.threads arg (=1) set number of http server threads, min 1
--logging.level arg (=INFO) set logging level: CRITICAL, ERROR, WARNING, INFO, DEBUG, TRACE
--logging.log_dir arg (=/log) set logging directory
--logging.file.max_size_MB arg (=10) set MAX log file size limit in MBs, min 1
--logging.file.backups arg (=10) set number of log file backups
For normal operation, keep the parameter model.srcmode = redis:invnt at its default value. Other values (redis:full, grpc) can be set, but the model will not be fully built. This feature is not part of the current release. Parameters grpc.address and grpc.port will have no effect.
Note: it is recommended to configure parameter --http.threads to “4” for 16-Core systems, “16” for 64-Core systems.
Supported REST API
Telemetry API:
-
GET monitoring/session/0/data
Access methods:
-
-
Direct access:
curl http://127.0.0.1:8950/monitoring/session/0/data
-
Over plugins API:
curl -k https://<lab_ip>/ufmRest/plugin/ufm-light/monitoring/session/0/data -u <user>:<password>
-
Troubleshooting
If the response to GET monitoring/session/0/data contains an empty dictionary, ensure that the Fast-API plugin is running.
UFM Light logs are located in:
/opt/ufm/files/log/plugins/ufm-light/
The default log level is INFO. To change the log level to DEBUG, edit:
sudo vim /opt/ufm/files/conf/plugins/ufm-light/ufm-light.cfg
logging.level = DEBUG
After config update, ufm-light plugin must be stopped and started again manually in order to obtain config changes.
Last updated: