Argent AT Command-Line Tools

The Argent AT Command Line Tools are a set of command-line executables introduced in Argent AT 3.1A-1304-L or above, to manage servers/devices in the following areas:

  1. CMDB-X
  2. Monitoring Groups
  3. License Manager

Note: This article refers to a feature known as verifying. This feature allows customers to “test” changes and observe the output without actually committing any changes to the database.

ARGENT_CMDB_CLI.EXE

This utility manages the CMDB-X database.

Adding Servers or Devices to the CMDB-X

To add a server/device to the CMDB-X, run the command line:

ARGENT_CMDB_CLI -n node -xml xml_file [-g group] -a

Argument ‘-n’ specifies the node name.

Argument ‘-g’ specifies the network group that the node will be added to. It is optional. If not specified, the default ‘First Network Group’ is assumed.

Argument ‘-xml’ specifies xml file for all the node properties.

The XML format is


	<AT>

		<CMDBX>

			<Property name=xxxx>value</Property>

			<Property name=xxxx>value</Property>

			...

		</CMDBX>

	</AT>			

The property name and values are in the same format as the CMDB node properties in the Argent AT GUI.

Use the node property dialog box as reference to specify the property name and value.

Some properties can only have a few limited possible values. For example, the possible values of property ‘OS’ for a Windows machine are the ones shown in the combo pull-down.

The valid OS types are as follows:

  • Windows Domain Controllers
  • Windows Servers
  • Windows Workstations
  • NT Backup Controllers
  • Solaris Servers
  • HP-UX Servers
  • AIX Servers
  • SCO Servers
  • Linux Servers
  • TCP/IP Addresses
  • iSeries Server
  • Cluster Nodes
  • Cluster Groups
  • Cluster Networks
  • Cluster Network Interfaces
  • Cluster Resource
  • Printer Queues
  • Windows 9x Systems
  • Novell Systems
  • URL Object
  • Internet Mail Object
  • FTP Object
  • ESX Host
  • ESX Datacenter
  • ESX Cluster
  • ESX Resource Pool
  • XenServer
  • Unknown Systems

A sample XML for a W2000 machine is as follows:

As an example, assume we place the XML file under C:\ARGENT\ArgentGuardianUltra\TEMP, and we run the command line from the Argent Guardian Ultra home directory.

To add a node named ‘TestNode’, this can be done by using the following command line:

ARGENT_CMDB_CLI -n TestNode -xml TEMP\CMDB_W2000.xml -a

It is also possible to use multiple options ‘-o’ to specify properties for the newly added node. Due to the limitation of command line length and easier readability, the XML input format is recommended.

To add a Windows machine, a quick command line with minimum properties can be as follows:

ARGENT_CMDB_CLI -n TestNode -o “Domain:A” -o “OS:Windows Workstations” -o “Netbios Name:PANA40” -a

To add a Linux server, specify the OS as ‘Linux Servers’. Example:

ARGENT_CMDB_CLI -n TestNode1 -o “Domain:A” -o “OS:Linux Servers” -o “Alternative IP:192.168.2.106” -a

To add an iSeries server, specify OS as ‘iSeries Server’. Example:

ARGENT_CMDB_CLI -n TestNode2 -o “Domain:A” -o “OS:iSeries Server” -o “Alternative IP:10.10.1.50” -a

The status of the command line can be determined by the exit code:

  • 0 – Successful
  • 1 – Failed as node is already in CMDB-X database
  • 9999 – Internal error

For more details, customers can either see the console output or the log file ‘ARGENT_CMDB_CLI_LOG.TXT’.

Removing Servers or Devices from the CMDB-X

To remove a server/device from CMDB-X, run the command line:

ARGENT_CMDB_CLI -n node -r

Argument ‘-n’ specifies the node name.

The status of the command line can be determined by the exit code:

  • 0 – Successful
  • 1 – Failed as node does not exist in CMDB-X database
  • 2 – Unsuccessful because the node is licensed in some Argent AT product.
  • 9999 – Internal error

For more details, customers can either see the console output or the log file ‘ARGENT_CMDB_CLI_LOG.TXT’.

Verifying Properties for Servers or Devices

To verify one or more multiple properties of specified node, run the command line:

ARGENT_CMDB_CLI -n node [-o “property:value”]+ -v

Argument ‘-n’ specifies the node name.

Argument ‘-o’ specifies a node property to verify.

The command compares property values only. The properties are not changed.

The status of the command line can be determined by the exit code:

  • 0 – Successful that node is present and property values match.
  • 1 – Failed because node is not found in CMDB-X database.
  • 2 – Node is present but one or more property values do not match.
  • 9999 – Internal error.

Changing Properties for Servers or Devices

To change one or more multiple properties of a specified node, run command line:

ARGENT_CMDB_CLI -n node [-o “property:value”]+ -e

Argument ‘-n’ specifies the node name.

Argument ‘-o’ specifies a node property to enforce.

The command compares property values and changes the values if they differ.

The status of the command line can be determined by the exit code:

  • 0 – Node is present and property values match.
  • 1 – Failed because node is not found in CMDB-X database.
  • 2 – Node is present but one or more property values do not match.
  • 9999 – Internal error.

Argent ARGENT_CMDB_CLI.EXE is enhanced to Add/Modify the newly implemented CMDB-X Node property ‘Tier’ in Argent AT 2007-A

Example:

The command to change the Tier property value to 7 of existing node SQL-2019 is:

      ARGENT_CMDB_CLI -n SQL-2019 -o “Tier:7” -e

ARGENT_MONITORING_GROUP_CLI.EXE

This utility manages Monitoring Groups through a command line interface

Note: This utility does NOT handle Monitoring Groups using ODBC queries as the query result is dynamic.

Adding Servers or Devices to Monitoring Groups

To add a server/device to a Monitoring Group, run the command line:

ARGENT_MONITORING_GROUP_CLI -n node -m group -a

Argument ‘-n’ specifies the node name.

Argument ‘-m’ specifies a Monitoring Group that node will be added to.

Example:
ARGENT_MONITORING_GROUP_CLI -n TestNode1 -m “&MG_TEST” -a

Note: Double quotes are needed for Monitoring Group names as the special character ‘&’ is part of the name.

The status of the command line can be determined by the exit code:

  • 0 – Successful
  • 1 – Failed as Monitoring Group does not exist
  • 9998 – Node is not in CMDB-X database
  • 9999 – Internal error

For more details, customers can either see the console output or the log file ‘ARGENT_MONITORING_GROUP_CLI_LOG.TXT’.

Removing Servers or Devices from Monitoring Groups

To remove a server/device from a Monitoring Group, run the command line:

ARGENT_MONITORING_GROUP_CLI -n node -m group -r

Argument ‘-n’ specifies the node name.

Argument ‘-m’ specifies a Monitoring Group the node will be added to.

Example:
ARGENT_MONITORING_GROUP_CLI -n TestNode1 -m “&MG_TEST” -r

The status of the command line can be determined by the exit code:

  • 0 – Successful
  • 1 – Failed as Monitoring Group does not exist
  • 9999 – Internal error

For more details, customers can either see the console output or the log file ‘ARGENT_MONITORING_GROUP_CLI_LOG.TXT’.

Verifying Servers or Devices In A Monitoring Groups

To verify a server/device included in a Monitoring Group, run the command line:

ARGENT_MONITORING_GROUP_CLI -n node -m group -v

Argument ‘-n’ specifies the node name.

Argument ‘-m’ specifies a Monitoring Group that node will be added to.

Example:
ARGENT_MONITORING_GROUP_CLI -n TestNode1 -m “&MG_TEST” -v

The status of the command line can be determined by the exit code:

  • 0 – Node is already included in the Monitoring Group.
  • 1 – Node was not included and is added successfully.
  • 2 – Failed as Monitoring Group does not exist
  • 9998 – Node is not in CMDB-X database
  • 9999 – Internal error

For more details, customers can either see the console output or the log file ‘ARGENT_MONITORING_GROUP_CLI_LOG.TXT’.

Changing Servers or Devices In A Monitoring Groups

To change a server/device included in a Monitoring Group, run the command line:

ARGENT_MONITORING_GROUP_CLI -n node -m group -e

Argument ‘-n’ specifies the node name.

Argument ‘-m’ specifies a Monitoring Group that node will be added to.

Example:
ARGENT_MONITORING_GROUP_CLI -n TestNode1 -m “&MG_TEST” -e

The status of the command line can be determined by the exit code:

  • 0 – Node is already included in the Monitoring Group.
  • 1 – Node was not included and is added successfully.
  • 2 – Failed as Monitoring Group does not exist
  • 9998 – Node is not in CMDB-X database
  • 9999 – Internal error

For more details, customers can either see the console output or the log file ‘ARGENT_MONITORING_GROUP_CLI_LOG.TXT’.

ARGENT_LICENSE_CLI.EXE

This utility manages the product License Manager database.

Licensing Servers or Devices

To license a server/device, run the command line:

ARGENT_LICENSE_CLI -n node -xml xml_file -p product -a

Argument ‘-n’ specifies the node name.

Argument ‘-p’ specifies the AT product name, for example, ‘Argent Guardian Ultra’, ‘Argent for Compliance’ etc.

Argument ‘-xml’ specifies xml file for all the node properties.

The XML format is


	<AT>

		<LICENSED>

			<Property name=xxxx>value</Property>

			<Property name=xxxx>value</Property>

			...

		</LICENSED>

	</AT>			

The property name and value are in the same format as licensed node properties in AT GUI. Use the license node property dialog box as reference to specify the property name and value.

There might be some duplicated property names in the dialog box.

For example, property ‘Password’ may show up in several places.

In order to differentiate them, specify the property in format of ‘CATEGORY\PROPERTY’.

For example, to tell the two highlighted passwords apart, customers can use ‘Use Other Credentials\Password’ and ‘Windows Event Log\Password’ respectively.

A sample XML for a W2000 machine is as follows:

Assuming we place the XML under C:\ARGENT\ArgentGuardianUltra\TEMP, and run the command line from the Argent Guardian Ultra home directory.

To add a node ‘TestNode’, this can be done using the following command line:

ARGENT_LICENSE_CLI -n TestNode -xml TEMP\LICENSE_W2000.xml -p “Argent Guardian Ultra” -a

The status of the command line can be determined by the exit code:

  • 0 – Successful
  • 1 – Failed as node is already licensed
  • 9998 – Failed as node is not in CMDB-X database
  • 9999 – Internal error

For more details, customers can either see the console output or the log file ‘ARGENT_LICENSE_CLI_LOG.TXT’.

Removing Licensed Servers or Devices

To unlicense a server/device, run the command line:

ARGENT_LICENSE_CLI -n node -p product -r

Argument ‘-n’ specifies the node name.

Argument ‘-p’ specifies the AT product name, for example, ‘Argent Guardian Ultra’, ‘Argent for Compliance’ etc.

The status of the command line can be determined by the exit code:

  • 0 – Successful
  • 1 – Failed as node is not licensed
  • 9998 – Failed as node is not in CMDB-X database
  • 9999 – Internal error

For more details, customers can either see the console output or the log file ‘ARGENT_LICENSE_CLI_LOG.TXT’.

Verifying Properties of Licensed Servers or Devices

To verify properties for a licensed server/device, run the command line:

ARGENT_LICENSE_CLI -n node -p product [-o “property:value”]+ -v

Argument ‘-n’ specifies the node name.

Argument ‘-p’ specifies the AT product name, for example, ‘Argent Guardian Ultra’, ‘Argent for Compliance’ etc.

Argument ‘-o’ specifies one or more properties to verify.

Example:
ARGENT_LICENSE_CLI -n TestNode -p “Argent Guardian Ultra” -o “Method:PDH” -v

The status of the command line can be determined by the exit code:

  • 0 – Node is licensed and properties are the same
  • 1 – Node is not licensed
  • 2 – Node is licensed but some properties are different
  • 9999 – Internal error

For more details, customers can either see the console output or the log file ‘ARGENT_LICENSE_CLI_LOG.TXT’.

Changing Properties of Licensed Servers or Devices

To change the properties for a licensed server/device, run the command line:

ARGENT_LICENSE_CLI -n node -p product [-o “property:value”]+ -e

Argument ‘-n’ specifies the node name.

Argument ‘-p’ specifies the AT product name, for example, ‘Argent Guardian Ultra’, ‘Argent for Compliance’ etc.

Argument ‘-o’ specifies one or more properties to enforce.

Example:
ARGENT_LICENSE_CLI -n TestNode -p “Argent Guardian Ultra” -o “Method:PDH” -e

The status of the command line can be determined by the exit code:

  • 0 – Node is licensed and properties are the same
  • 1 – Node is not licensed
  • 2 – Node is licensed but some properties are different and changes are applied successfully
  • 9999 – Internal error

For more details, customers can either see the console output or the log file ‘ARGENT_LICENSE_CLI_LOG.TXT’.