GuardAPI GIM Functions

Use these CLI commands to list, update, assign, remove and cancel GIM Functions.

gim_list_registered_clients

Lists all the registered clients.

Parameter Value type Description
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_list_registered_clients

gim_list_client_params

Lists all the (module) parameters assigned to a specific client.

Parameter Value type Description
clientIP string Required - Client IP Address
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_list_client_params clientIP=192.168.12.210

gim_update_client_params

Updates a single module parameters in a specific client.

Parameter Value type Description
clientIP string Required. IP of target client
paramName string Required. Parameter Name
paramValue string Required. Parameter Value
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_update_client_params clientIP=192.168.1.100 paramName=STAP_TAP_IP paramValue=192.168.1.100

gim_list_client_modules

Lists all the modules assigned to a specific client and their state

Parameter Value type Description
clientIP string Required - Client IP Address
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_list_client_modules clientIP=192.168.2.210

gim_load_package

Loads all the modules within 'filename'.

Note: This command will load a file which resides on local file system, therefore the procedure (cmd='fileserver') of loading a file to the CM/Guardium appliance must precede this command.
Parameter Value type Description
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_load_package  filename=*.gim   
Note: The wildcard * can be used within filename.

gim_assign_bundle_or_module_to_client_by_version

Assigns a bundle/module to a client.

Parameter Value type Description
clientIP string Required - Client IP Address
module string Required - Module
moduleVersion string Required - Module Version
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_assign_bundle_or_module_to_client_by_version clientIP=192.168.1.100  module=BUNDLE-STAP moduleVersion=”8.0_r1234_1”

gim_schedule_install

Schedules for installation all the modules/bundles that were assigned to a client and haven't been installed yet (for example, PENDING). If the parameter module is specific, only the requested module will be scheduled.

Parameter Value type Description
clientIP string Required - Client IP Address
module string Optional - Module. If module is not specified in the command, all the modules for the specified clientIP will be scheduled for install.
date   Required - Date; Format: 'now' or 'yyyy-MM-dd HH:mm'
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_schedule_install clientIP=192.168.1.100 module=BUNDLE-STAP  date=”2008-07-02 14:50”   
grdapi gim_schedule_install clientIP=192.168.1.100 date=”2008-07-02 14:50”   
Note: Date in the past may be used to run something immediately.

gim_list_client_status

Displays the status of the latest operation executed for a specific client.

Parameter Value type Description
clientIP string Required - Client IP Address
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_list_client_status clientIP=192.168.1.100

gim_uninstall_module

Uninstalls a module/bundle on a specific client.

Parameter Value type Description
clientIP string Required - Client IP Address
module string Required - Module.
date   Required - Date; Format: 'now' or 'yyyy-MM-dd HH:mm'
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_uninstall_module clientIP=192.168.1.100 module=BUNDLE-STAP

gim_cancel_install

Cancels installation of  a bundle/module on a specific client. Canceling installation is possible only if a module/bundle is not already in the process of being installed by a client (STATE=IP or IP-PR)

Parameter Value type Description
clientIP string Required - Client IP Address
module string Required- Module.
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_cancel_install clientIP=192.168.1.100 module=BUNDLE-STAP

gim_list_bundles

Lists all the available bundles. A bundle is a group of modules that can be installed on a client.

Parameter Value type Description
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_list_bundles

gim_list_mandatory_params

Lists the mandatory parameters for a single module.

Parameter Value type Description
module string The name of the GIM module for which to display the mandatory parameters
version string The version of the GIM module for which to display the mandatory parameters

Example

grdapi gim_list_mandatory_params module=name version=number

gim_assign_latest_bundle_or module_to_client

Assigns the latest (i.e. the highest version) available bundle or module for a specific client.

Parameter Value type Description
clientIP string Required - Client IP Address
module string Required- Module.
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_assign_latest_bundle_or_module_to_client clientIP=192.168.1.100  module=BUNDLE_STAP

gim_schedule_uninstall

Schedules uninstallation of all the modules/bundles that were assigned to a client and haven't been uninstalled yet (i.e. “PENDING”). If the parameter 'module' is specific, only the requested module will be scheduled.

Parameter Value type Description
clientIP string Required - Client IP Address
module string Optional - Module. If module is not specified in the command, all the modules for the specified clientIP will be scheduled for install.
date   Required - Date; Format: 'now' or 'yyyy-MM-dd HH:mm'
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_schedule_uninstall clientIP=192.168.1.100 module=BUNDLE-STAP  date=”2008-07-02 14:50”   grdapi gim_schedule_uninstall clientIP=192.168.1.100 date=”2008-07-02 14:50”

gim_cancel_uninstall

Cancels uninstallation of  a bundle/module on a specific client. Canceling uninstallation is possible only if a module/bundle is not already in the process of being installed by a client (STATE=IP or IP-PR)

Parameter Value type Description
clientIP string Required - Client IP Address
module string Required- Module.
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_cancel_uninstall clientIP=192.168.1.100 module=BUNDLE-STAP

gim_remove_bundle

The command will delete bundlePackageName from the database as well as from the file system (from /var/log/guard/gim_packages , and also from/var/gim_dist_packages if the Guardium system is a central manager).

parameters (required):

bundlePackageName

Parameter value take bundle package name as specified in the output of the gim_list_unused_bundles. The command will be successful only if:

2.1 The value of bundlePackageName refers to a BUNDLE

2.2 The value of bundlePackageName is not assigned to any client

2.3 The value of bundlePackageName exists

2.4 There is one and only one bundle that refers to the value of bundlePackageName

ALL the conditions (2.1 to 2.4) must be true in order to delete a bundle from the database/file system. Otherwise an error will be generated.

Example

grdapi gim_remove_bundle  bundlePackageName= bundlePackageName

gim_unassign_client_module

Unassigns a module from a client. Unlike 'gim_remove_module', this command will untie the connection between a module and a specific client on the CM/Guardium appliance. This command is will NOT uninstall or remove the module on the actual DB-server machine. It is to be used only in cases on synchronization problems between the DB-server (i.e client) information and the CM/Guardium appliance information regarding the current state of the modules.

Parameter Value type Description
clientIP string Required - Client IP Address
module string Optional. Module. If module is not specified in the command, all the modules for the specified clientIP will be scheduled for install.
date   Required. Date; Format: 'now' or 'yyyy-MM-dd HH:mm'
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_unassign_client_module clientIP=192.168.1.100  module=STAP

gim_get_purge_list

List old software packages (GIM files) that have previously been uploaded to the Guardium® appliance or CM.

Parameter Value type Description
olderThan string Required - Number of days. Files older than the number of days specified will be purged. Valid value is any number greater or equal to 0.
excludeLatest boolean Optional - true or false (default value is true).

true: Avoid purging the latest version per OS per module.

false: Purge the latest version per OS per module.

api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_get_purge_list olderThan=30 excludeLatest=true

gim_purge

Remove old software packages (GIM files) that have previously been uploaded to the Guardium appliance or CM.

Parameter Value type Description
olderThan string Required - Number of days. Files older than the number of days specified will be purged. Valid value is any number greater or equal to 0.
excludeLatest boolean Optional - true or false (default value is true).

true: Avoid purging the latest version per OS per module.

false: Purge the latest version per OS per module.

filename string Optional - A specific file that is to be removed. If the file specified is a bundle (for example, starts with 'guard-bundle'), the content of this bundle will be removed.
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_purge olderThan=30    
Note:

Either the 'filename' parameter or (olderThan and/or excludeLatest) can be specified in the command.

GIM purge will not purge files that are currently scheduled for installation.

GIM purge will not allow the removal of any file (for example, parameter filename) that includes '/' character.

gim_get_available_modules

List the available modules / bundles available to install on a specific server.

Parameter Value type Description
clientIP string Required - Client IP Address

Example

grdapi gim_get_available_modules clientIP=192.168.1.100

gim_get_client_last_event

List the latest operation executed for a specific client.

gim_get_client_last_event is a GrdAPI command with limited functionality. All it does is show the last event occurred during the latest installation attempt. For example, if during the latest installation of S-TAP there were some errors, it will show up by running that grdapi command. However, if you manually fix the installation problem directly on the database server, this grdapi command will still show the same original error message (even though S-TAP is now running). This command should not be used to evaluate S-TAP status after manual fixes on the database server.

Parameter Value type Description
clientIP string Required - Client IP Address

Example

grdapi gim_get_client_last_event clientIP=192.168.1.100

grdapi gim_get_client_last_event clientIP=winx64

grdapi gim_get_client_last_event clientIP=9.70.144.73

gim_get_modules_running_status

List the modules / bundles currently running on a specific server.

Parameter Value type Description
clientIP string Required - Client IP Address
process string name of process
status ON or OFF  
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_get_modules_running_status clientIP=192.168.1.100 process= status=

gim_list_unused_bundles

The command returns a list of unused (not installed on any database server) bundles and individual Windows modules that can be uploaded (for example, Windows CAS, Windows FAM).

parameters (required):

includeLatest ( valid values 0/1)

If set to value 1, the returned list of unused bundles will include the latest unused bundle.

Example

grdapi gim_list_unused_bundles includeLatest=1

gim_reset_client

Disassociate modules from selected client.

Parameter Value type Description
clientIP string Required - Client IP Address
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_reset_client clientIP=192.168.1.100

gim_set_diagnostics

Set diagnostics collection within GIM.

Parameter Value type Description
clientIP string Required - Client IP Address
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_set diagnostics clientIP=192.168.1.100

gim_set_global_param

Set global parameters within GIM.

Parameter Value type Description
clientIP string Required - Client IP Address
paramName string Required - Name of the parameter within the API function to be mapped
paramValue string Required - Value of the parameter within the API function to be mapped
sqlguardip string Optional - IP address /host name of the collector this GIM agent will connect to.
ca_file string Optional - Full file name path to the certificate authority PEM file.
key_file string Optional - Full file name path to the private key PEM file.
cert_file string Optional - Full file name path to the certificate PEM file.
gim_listener_default_port string Optional - Set a different port for the GIM agent server mode.
gim_listener_default_shared_secret string Optional - Set a shared secret to verify collectors that are sending requests to the new server mode GIM agent.
no_listener string Optional - Disable the GIM agent in server mode.
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_set_global_param clientIP=192.168.1.100 paramName=gim_listener_default_port paramValue=8445

gim_remote_activation

Connects the collector's IP address to a server mode GIM agent or group of GIM agents.

Parameter Value type Description
targetGroup string Optional - The group name of all the database servers that the collector connects to. It cannot be specified with the targetHost parameter.
sharedSecret string Optional - The shared secret that was configured during installation.
targetPort string Optional - The port server mode of the GIM agent.
api_target_host string
Optional parameter that specifies the target host(s) to execute the API. When not specified, it defaults to the unit on which command is executed. Valid values:
  • all_managed: for all managed units
  • all: all managed units and CM
  • group:<group name>: where group name is a group of managed units
  • from CM only, the host name or IP of any managed unit, for example, api_target_host=10.0.1.123
  • from managed unit, the host name or IP of the CM

Guardium V10.1 and 10.1.2: In a central management configuration only, specifies a target host where the API will execute. On a Central Manager (CM) the value is the host name or IP of any managed units. On a managed unit it is the host name or IP of the CM.

Example

grdapi gim_remote_activation targetGroup=<someGroup> sharedSecret=<password> targetPort=8445