Grammar files supported by BMC Server Automation
BMC Server Automation supports a variety of grammar files capable of parsing data presented in a prescribed format. After it is parsed, that data can be generated in a format consistent with other information in BMC Server Automation so you can then browse, snapshot, audit, and deploy that information.
Although BMC Server Automation provides many grammar files, the following are the basic types:
- CSV — Parses files consisting of comma-separated entries
- HTTPD — Parses httpd.conf files
- name = value — Parses files with single name/value pairs connected by an equal sign (=)
- name space value — Parses files with name/value pairs connected by white space instead of an equal sign (=)
- XML — Parses XML files using the Xerces DOM parser to generate a DOM tree. Configuration files are then created by traversing the tree. Various schemes are used to generate a unique key for each record.
- Regular — Parses all other configuration files. The following table lists all the grammar files BMC Server Automation supports by default. These grammar files reside in <installDirectory>/scripts. For additional information about how an individual grammar file is used to parse configuration files, refer to information provided in each grammar file. For information about creating custom grammars, see Creating custom grammars.
Grammar Type Name
Associated Grammar File
Parses files with lines made up of a varying number of tab-delimited entries; the first entry is the unique key.
Parses files with four colon-delimited values in each line; the first value is the unique key.
Parses files with four colon-delimited values per line; the first value is the unique key.
Parses files with lines made up of a varying number of tab-delimited entries; uses the entire line as the unique key.
Parses files where each line consists of seven colon-delimited fields; the first value is the unique key.
Parses files with a varying number of space- or tab-delimited entries on each line; the unique key is generated by a combination of all entries.
Parses files with lines of nine colon-delimited values; the first value is the unique key.
AIX /etc/security/* file
Parses all /etc/security files in IBM AIX that have a header on one line followed by name/value pairs connected by an equal sign (=); the first value is the unique key.
audit control file
Parses fields separated by colons, using the first field as the key. This grammar is used to parse /etc/security/audit_control files on Oracle Solaris.
Parses fields separated by colons, using the second field as the key. This grammar is used to parse /etc/security/audit_class and /etc/security/audit_event files on Solaris.
Parses WebLogic config.xml files.
Parses /etc/security/console.perms files on Linux.
Parses Tomcat context.xml files.
Stores five time-based values and one ambiguous command value per line; the command is the unique key.
Parses files consisting of lines of a varying number of comma-separated entries; uses the entire line as a unique key.
fstab mount file
Parses files where each line consists of six tab-delimited entries; the first entry is the unique key.
Parses /etc/grub.conf files on Linux.
Parses files with lines consisting of a varying number of space-delimited entries; the first entry is the unique key.
Parses formats similar to a simple XML format.
Parses records with a name and one value and treats comments as values.
Parses /etc/lilo.conf files on Linux.
Linux /etc/yp.conf file
Parses a complex format specific to /etc/yp.conf files on Linux.
Machine Config XML file
Parses machine.config XML files used for IIS and .NET applications. This grammar is specifically designed for machine.config XML files that may include multiple nodes with identical names and the same parent node.
name = multi values
Parses records with a name and multiple values, such as name = value1 value2 value3.
name = value
Parses files with single name/value pairs connected by an equal sign (=); uses the name before the equal sign as a unique key.
name space value
Parses data where the format is "PROPERTY VALUE". The separator is white space instead of an equal sign (=). This grammar is used to parse /etc/login.defs files on Linux and /etc/hosts.deny and /etc/ssh/sshd_config files on Solaris.
NIS /etc/group file
Parses files for*/etc/group* and Network Information Server (NIS)/etc/group on UNIX platforms.
nsswitch.conf on UNIX
Parses formats using an initial key followed by a colon with a varying number of space-delimited values after the colon.
Oracle config files
Parses tnsnames.ora and listener.ora files in Oracle.
Parses Tomcat running-managed-servers.xml files.
single unique value per line
Parses files where each line contains one value that does not contain a space, equal sign (=), or pound sign (#).
Solaris /etc/system file
Uses a complicated grammar to parse Solaris /etc/system files.
Solaris inetd.conf file
Parses Solaris files with lines consisting of a varying number of tab-delimited entries; all entries make up the unique key.
split line into fields
Parses generic records separated by spaces; all fields participate in the key. Used as an alternative to generic.gm, this grammar is used to parse /etc/init.d/netconfig, /etc/security/audit_startup, and /etc/ftpd/ftpaccess files on Solaris.
Parses /etc/ssh/ssh_config files on Linux.
Parses /etc/ssh/sshd_config files on Linux.
Parses Tomcat server.xml files.
Parses Tomcat users.xml files.
UNIX /etc/syslog.conf file
Parses /etc/syslog.conf files on UNIX.
users and exports file
Parses files using the format of the BMC Server Automation users and exports configuration files. For a discussion of those files, see Setting up configuration files. The first entry is the unique key.
vfstab mount file
Parses files where each line consists of seven tab-delimited entries; uses the first entry as the unique key.
Parses J2EE web.xml files.
Web Config XML file
Parses web.config XML files used for IIS and .NET applications. This grammar is specifically designed for web.config XML files that may include multiple nodes with identical names and the same parent node.
whole line as record
Parses files by treating a complete line as a single field; uses the entire line as a unique key. This grammar can be used for parameter substitution during Deploy Jobs.
Microsoft Windows INI file
Parses Windows INI formats with a bracket-enclosed header and subsequent name-value pairs; the first entry is the unique key.
Parses xinetd.conf files on Linux.
Uses an XML library to parse XML files.