Need detailed documentation or whitepaper about the lua database commands in the nas probe
search cancel

Need detailed documentation or whitepaper about the lua database commands in the nas probe

book

Article ID: 227768

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM) Unified Infrastructure Management for Mainframe CA Unified Infrastructure Management SaaS (Nimsoft / UIM)

Issue/Introduction

I don't find technical documentation or whitepaper about database commands we can use in a lua script executed by the "nas" probe,  like  :

-- tab,rc,err = database.query(select...)":
-- tab: result table address
-- rc:  query retcode
-- rr: query error text (if any)

I need detailed information, like "return codes" , functionality ...

Resolution

Please refer to the attached KB Article:

Accessing the Nimsoft Database cm_computer_system from Lua Script
https://knowledge.broadcom.com/external/article/10040

Other helpful references:

UIM-Community/Lua-codebase
https://github.com/UIM-Community/Lua-codebase

Lua.org
https://www.lua.org/docs.html

LUA Reference Manual
https://www.lua.org/manual/5.1/manual.html

LUA Database Access
https://www.tutorialspoint.com/lua/lua_database_access.htm

LUA error handling
https://www.tutorialspoint.com/lua/lua_error_handling.htm

LuaSQL
https://github.com/lunarmodules/luasql

Get the address of a LUA object
https://stackoverflow.com/questions/12787308/get-the-address-of-a-lua-object?rq=1

LUA Community
https://www.lua.org/community.html

UIM Community
LUA script - capture database query errors
https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=731333

NSA
You can download the latest nsa package (Nimsoft Scripting Agent) for UIM 24.3 from here:
http://support.nimsoft.com/Files/Archive/00186/nsa-20.60.zip

NSA Release Notes
http://support.nimsoft.com/unsecure/archive.aspx?id=186

Additional Information

Nimsoft Script Agent

The Nimsoft Script Agent (nsa) is a Lua-based scripting platform. The nsa is meant to be used as a tool for system integration, reporting, on-site enhancements allowing for direct integration with NMS, ADO, SNMP and basic system and network functions. It requires no run-time environment (not even NMS), and contains all the functionality within a single binary.
The user may encrypt sensitive data (like NMS or database login passwords) and incorporate this into the script(s).
The package is installed by dropping it onto the target Robot(s) in the Infrastructure Manager, and installs to the SDK directory under the Nimsoft root directory.

Installation notes

Drop the package onto your Nimsoft Robot, and look for the files in the SDK directory.