KBI 310603 New Feature: Detecting Installed Applications
Version
Argent Advanced Technology 3.1A-1308-A and above
Date
Monday, 29 Jul 2013
Summary
This feature allows customers to scan installed vital applications for one or multiple CMDB-X nodes
Technical Background
When a CMDB-X node is associated with some applications, it is easy to define dynamic Monitoring Groups using an ODBC query based on the information.
Customers can use the Monitoring Group in the production Relators to achieve automatic monitoring of the specific applications
Argent AT setup program pre-installs a few Monitoring Groups for application servers. The logic is simple. It queries the nodes that have the specific application
Customers can manually enter the applications for the selected CMDB-X node especially for nodes that are not on the same network, or if the logon user does not have sufficient privileges to run the detection mechanism.
Customers can also pre-define mechanisms to scan the selected nodes for applications
To do so, customers should first define what applications to discover and how to detect them. The supported mechanisms include the following:
- Windows Registry
- Windows Service
- SNMP OID
- VBScript
- Unix Telnet
- Unix SSH
- TCP Service
As the majority of Windows applications have the Windows service as a background process, or use specific registry hives, the methods of ‘Windows Registry‘ and ‘Windows Service‘ are most commonly used
For Linux/Unix applications, the method ‘TCP Service‘ is recommended, as it is the easiest and least intrusive
Customers can detect the installed applications for one or multiple selected CMDB-X nodes
User prompt is shown if the Linux/Unix logon credential or SNMP information is required
Progress window is displayed when scanning is underway
The CMDB-X node property is updated if new applications are found
Resolution
Upgrade to Argent Advanced Technology 3.1A-1308-A and above.
Appendix A – Extended VBScript Syntax
Customers can use VBScript to implement very complicated logic for determining an application is installed. Besides ordinary VBScript syntax, Argent Advanced Technology introduces following keywords to communicate necessary information back and forward:
- TargetServer (Read-Only) – Argent AT assign the real server name to this property
- ApplicationName (Read-Only) – Argent AT assign the application name to this property
- ApplicationFound (Write-Only) – Customer should assign True to this property if the application is determined as being installed; otherwise, assign False
- ScriptHasError (Write-Only) – Customer can assign True to this property if encountering some unrecoverable error within script logic
- WriteStatus (Method) – Write a line to the log
Appendix B – UNIX Script Output Syntax
The Linux/Unix script syntax uses the same format of that of Linux/Unix script rules. If the output contains status ‘PASS‘, it means the application is found; if the output contains status ‘FAIL‘, it means the application is not found.
A ‘PASS‘ sample output should look like:
<TAGResult> <QEResult> <STATUS>PASS</STATUS> </QEResult> </TAGResult>
A ‘FAIL‘ sample output should look like:
<TAGResult> <QEResult> <STATUS>FAIL</STATUS> </QEResult> </TAGResult>
Appendix C – Command Line Interface
Argent AT provides CLI (Command Line Interface) to do the same task as the GUI
Syntax:
- argent_detectapp_cli [-? | -help]
Show the usage
- argent_detectapp_cli -s server [-p application] [-user user] [-pswd pswd] [-snmp v1|v2c] [-comm community]
Scan all applications or one specific application for one node.
Option ‘-s‘ specifies the specific node.
Option ‘-p‘ specifies the specific application. It is optional.
Option ‘-user‘ and ‘-pswd‘ specify the user credential for UNIX scanning. It is not used if no UNIX application is to scan.
Option ‘-snmp‘ specifies the SNMP version. It is not used if no SNMP application is to scan.
Option ‘-comm‘ specifies the SNMP community string. It is not used if no SNMP application is to scan.
- argent_detectapp_cli -n group [-p application] [-user user] [-pswd pswd] [-snmp v1|v2c] [-comm community]
Scan all applications or one specific application for nodes of specified network group.
Option ‘-n‘ specifies the network group
- argent_detectapp_cli -all [-p application] [-user user] [-pswd pswd] [-snmp v1|v2c] [-comm community]
Scan all applications or one specific application for all nodes in CMDB-X
- argent_detectapp_cli [-add | -update] -p application -g group -m registry -reg reghive [-val value]
Add or update an application definition using method ‘Windows Registry‘.
Option ‘-reg‘ specifies the registry hive. Wildcards are supported.
Option ‘-val‘ specifies the registry key value. It is optional
- argent_detectapp_cli [-add | -update] -p application -g group -m service -serv svcname
Add or update an application definition using method ‘Windows Service‘.
Option ‘-serv‘ specifies the service name. Wildcards are supported
- argent_detectapp_cli [-add | -update] -p application -g group -m snmp -oid oid
Add or update an application definition using method ‘SNMP Search‘.
Option ‘-oid‘ specifies the signature OID for the SNMP application
- argent_detectapp_cli [-add | -update] -p application -g group -m vbscript -file script
Add or update an application definition using method ‘VBScript‘.
Option ‘-file‘ specifies the script file
- argent_detectapp_cli [-add | -update] -p application -g group -m ssh -file script
Add or update an application definition using method ‘SSH‘.
Option ‘-file‘ specifies the script file
- argent_detectapp_cli [-add | -update] -p application -g group -m telnet -file script
Add or update an application definition using method ‘Telnet‘.
Option ‘-file‘ specifies the script file
- argent_detectapp_cli [-add | -update] -p application -g group -m tcp -port port_number [-file script]
Add or update an application definition using method ‘TCP Service‘.
Option ‘-port‘ specifies the TCP port.
Option ‘-file‘ specifies the script file
- argent_detectapp_cli -delete -p application
Delete an application definition.
Option ‘-p‘ specifies the application
CLI returns with exit code 0 if the operation is successful. Otherwise, it returns with non-zero exit code