+ All Categories
Home > Documents > BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ......

BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ......

Date post: 04-Jun-2018
Category:
Upload: lamnguyet
View: 227 times
Download: 0 times
Share this document with a friend
12
BMC Software Confidential Configuration files BMC Server Automation 8.3 URL: Date: 18-Mar-2014 16:55 https://docs.bmc.com/docs/pages/viewpage.action?pageId=297533289
Transcript
Page 1: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

BMC Software Confidential

Configuration files

BMC Server Automation 8.3

URL:

Date: 18-Mar-2014 16:55

https://docs.bmc.com/docs/pages/viewpage.action?pageId=297533289

Page 2: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 2 12

Page 3: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 3 12

Table of Contents

1 Parsing configuration files ________________________________________________________________ 3

2 Grammar files supported by BMC Server Automation ___________________________________________ 3

3 How to add a parameterized configuration file to a component template ___________________________ 6

3.1 Adding parts to a component template __________________________________________________ 7

3.2 Adding configuration files ____________________________________________________________ 8

4 Index _______________________________________________________________________________ 10

By default BMC Server Automation automatically recognizes standard configuration files for all supported OSs.

For BMC Server Automation to read a configuration file correctly, it must adhere to configuration file standards

for the relevant operating system. BMC Server Automation can also treat most types of XML files as configuration

files.

1 Parsing configuration filesBMC Server Automation uses a system of grammar files to parse configuration files. Typically the BMC Server

Automation grammars examine each line in a configuration file, and if the line matches rules set up in the

grammar, the grammar generates a configuration file record. When defining a grammar file, an option exists for

creating configuration file records from multiple lines, which is required for some types of configuration files.

After configuration file records are created, you can browse, snapshot, audit, run compliance on, and deploy

them like other server objects. Using these standard procedures, you can manipulate the contents of

configuration files with great precision, down to their individual lines. In this way you can monitor configuration

files on servers throughout your system and if necessary correct inconsistencies. For more information, see:

Grammar files supported by BMC Server Automation

Identifying additional configuration files

2 Grammar files supported by BMC Server

AutomationBMC 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:

Page 4: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 4 12

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 . For additional<installDirectory>/scripts

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 Description

/etc/auto_* file auto.gm Parses files with lines made up of a varying number of tab-delimited

entries; the first entry is the unique key.

/etc/group file group.gm Parses files with four colon-delimited values in each line; the first value is

the unique key.

/etc/inittab file inittab.gm Parses files with four colon-delimited values per line; the first value is the

unique key.

/etc/pam file pam.gm Parses files with lines made up of a varying number of tab-delimited

entries; uses the entire line as the unique key.

/etc/passwd file passwd.gm Parses files where each line consists of seven colon-delimited fields; the

first value is the unique key.

/etc/resolv.conf file resolv.gm 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.

/etc/shadow file shadow.gm Parses files with lines of nine colon-delimited values; the first value is the

unique key.

AIX /etc/security/* file aix_security.gm Parses all files in IBM AIX that have a header on one line/etc/security

followed by name/value pairs connected by an equal sign (=); the first

value is the unique key.

audit control file audit_control.gm Parses fields separated by colons, using the first field as the key. This

grammar is used to parse files on Oracle/etc/security/audit_control

Solaris.

audit files audit.gm Parses fields separated by colons, using the second field as the key. This

grammar is used to parse / and etc/security/audit_class

files on Solaris./etc/security/audit_event

config.xml config.xml.gm Parses WebLogic config.xml files.

console_perms console_perms.gm Parses files on Linux./etc/security/console.perms

context.xml context.xml.gm Parses Tomcat files.context.xml

Page 5: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 5 12

Grammar Type Name Associated Grammar File Description

crontab file crontab.gm Stores five time-based values and one ambiguous command value per

line; the command is the unique key.

csv file csv.gm Parses files consisting of lines of a varying number of comma-separated

entries; uses the entire line as a unique key.

fstab mount file fstab.gm Parses files where each line consists of six tab-delimited entries; the first

entry is the unique key.

grub.conf grub.gm Parses files on Linux./etc/grub.conf

hosts file hosts.gm Parses files with lines consisting of a varying number of space-delimited

entries; the first entry is the unique key.

httpd.conf file httpd.gm Parses formats similar to a simple XML format.

init.ora file init.ora.gm Parses records with a name and one value and treats comments as values.

lilo.conf lilo.gm Parses files on Linux./etc/lilo.conf

Linux /etc/yp.conf file ypconf.gm Parses a complex format specific to files on Linux./etc/yp.conf

Machine Config XML file machine.config.xml.gm Parses XML files used for IIS and .NET applications. Thismachine.config

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 nvp.gm Parses records with a name and multiple values, such as

name = value1 value2 value3.

name = value nsvp.gm 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 nsvp_space.gm Parses data where the format is "PROPERTY VALUE". The separator is

white space instead of an equal sign (=). This grammar is used to parse

files on Linux and and /etc/login.defs /etc/hosts.deny

files on Solaris./etc/ssh/sshd_config

NIS /etc/group file nis-group.gm Parses files for*/etc/group* and Network Information Server (NIS)

on UNIX platforms./etc/group

nsswitch.conf on UNIX nsswitch.gm Parses formats using an initial key followed by a colon with a varying

number of space-delimited values after the colon.

Oracle config files ora.gm Parses and files in Oracle.tnsnames.ora listener.ora

running-managed-servers.xml running-managed-servers.xml Parses Tomcat files.running-managed-servers.xml

single unique value per line single_val.gm Parses files where each line contains one value that does not contain a

space, equal sign (=), or pound sign (#).

Solaris /etc/system file system.gm Uses a complicated grammar to parse Solaris files./etc/system

Solaris inetd.conf file inetd.gm Parses Solaris files with lines consisting of a varying number of

tab-delimited entries; all entries make up the unique key.

Page 6: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 6 12

Grammar Type Name Associated Grammar File Description

split line into fields line.gm Parses generic records separated by spaces; all fields participate in the

key. Used as an alternative to , this grammar is used to parse generic.gm

, , and /etc/init.d/netconfig /etc/security/audit_startup /etc/ftpd/ftpaccess

files on Solaris.

ssh_config ssh_config.gm Parses files on Linux./etc/ssh/ssh_config

sshd_config sshd_config.gm Parses files on Linux./etc/ssh/sshd_config

tomcat-server.xml tomcat-server.xml.gm Parses Tomcat server.xml files.

tomcat-users.xml tomcat-users.xml.gm Parses Tomcat files.users.xml

UNIX /etc/syslog.conf file syslog.gm Parses files on UNIX./etc/syslog.conf

users and exports file users.gm Parses files using the format of the BMC Server Automation and users

configuration files. For a discussion of those files, see exports Setting up

. The first entry is the unique key.configuration files

vfstab mount file vfstab.gm Parses files where each line consists of seven tab-delimited entries; uses

the first entry as the unique key.

web.xml web.xml.gm Parses J2EE web.xml files.

Web Config XML file web.config.xml.gm Parses XML files used for IIS and .NET applications. Thisweb.config

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 generic.gm 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 ini.gm Parses Windows INI formats with a bracket-enclosed header and

subsequent name-value pairs; the first entry is the unique key.

xinetd.conf file xinetd.gm Parses files on Linux.xinetd.conf

XML file xml.gm Uses an XML library to parse XML files.

3 How to add a parameterized configuration file

to a component templateThe more you work with component templates and your environment, the more you become aware of what you

need to track, remediate, and possibly eliminate. This section describes how to refine the objects in a component

template, also known as the .Parts

Page 7: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 7 12

1.

2.

Adding parts to a component template (see page 7)

Adding configuration files (see page 8)

3.1 Adding parts to a component templateThe following example presents the basic steps for adding parts to a component template.

Open your component template and choose the Parts tab. Then click and select the part to add.Add

In this example we are adding a specific WAR file, and also a related Windows Service.

Click the Snapshot/Audit tab. For each part that you added in the previous step, validate what you want to

capture as part of the Snapshot and Audit.

In the example below, we selected , which means . This ensuresContents Take a full backup of this object

that if someone changes this file, we can remediate it with the file in the Snapshot. Otherwise, we would

only be able to remediate the file permissions and ownerships, which might not be sufficient.

Page 8: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 8 12

1.

3.2 Adding configuration filesSometimes you might care about a specific entry within a file, but not about the entire contents of a file. In the

example below, the file contains a set of configuration entries for JPetStore. BMC Serverdatabase.properties

Automation parses this file and treats every entry within the file as its own separate configuration object.

Because this configuration file is specific to JPetStore, we will define the configuration object within the

component template. This is instead of defining the configuration file within the Configuration Object Dictionary,

which would associate the configuration file with every server of a particular operating system.

Within the component template, click the Local Configuration Objects tab. To add a new object, click Add

, select and click .Configuration File Next

Page 9: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 9 12

2.

3.

Browse to the file on a server and click .database.properties OK

Because the JPetStore path is parameterized, we want to parameterize the configuration file, as well. To

parameterize, insert a property into the path to the file.

Page 10: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 10 12

4.

5.

Select the appropriate grammar file for parsing the file, and then click .Finish

The grammar file determines how to separate each entry within the file into a unique object, and must

the formatting of your file.match

The custom Configuration File object is displayed within the JPetStore component template.

Include the configuration file as a part within the component template. On the Parts tab, add the Local

Config File and click . Then save the Component Template.OK

Page 11: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 11 12

Index

bbmc contributor 6

ccomponent template 6

configuration files 6

contributor unapproved 6

hhowto 6

pparameterization 6

© Copyright 2013 BMC Software, Inc.

© Copyright 2013 BladeLogic, Inc.

BMC, BMC Software, and the BMC Software logo are the exclusive properties of BMC Software, Inc., are registered with the U.S. Patent and Trademark

Office, and may be registered or pending registration in other countries. All other BMC trademarks, service marks, and logos may be registered or

pending registration in the U.S. or in other countries. All other trademarks or registered trademarks are the property of their respective owners.

BladeLogic and the BladeLogic logo are the exclusive properties of BladeLogic, Inc. The BladeLogic trademark is registered with the U.S. Patent and

Trademark Office, and may be registered or pending registration in other countries. All other BladeLogic trademarks, service marks, and logos may be

registered or pending registration in the U.S. or in other countries. All other trademarks or registered trademarks are the property of their respective

owners.

All Cisco trademarks that are referred to or displayed in the space are registered trademarks or trademarks of Cisco Systems, Inc. and/or its affiliates in

the United States and certain other countries.

All IBM trademarks that are referred to or displayed in the space are trademarks of International Business Machines Corporation in the United States,

other countries, or both.

IT Infrastructure Library® is a registered trade mark of the Cabinet Office.

ITIL® is a registered trade mark of the Cabinet Office.

Linux is the registered trademark of Linus Torvalds.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

PinkVERIFY and PinkVERIFY logo Trademark Pink Elephant. Used under license from Pink Elephant.

Page 12: BMC Server Automation 8 · BMC Server Automation uses a system of grammar files to parse ... Solaris. audit files audit.gm ... UNIX /etc/syslog.conf file syslog.gm Parses /etc/syslog

Configuration files BMC Software Confidential

BMC Server Automation 8.3 Page of 12 12

All SAP trademarks that are referred to or displayed in the document are trademarks or registered trademarks of SAP AG in Germany and in several other

countries.

UNIX is the registered trademark of The Open Group in the US and other countries.

The information included in this documentation is the proprietary and confidential information of BMC Software, Inc., its affiliates, or licensors. Your use

of this information is subject to the terms and conditions of the applicable End User License agreement for the product and to the proprietary and

restricted rights notices included in the product documentation.

Restricted rights legend

U.S. Government Restricted Rights to Computer Software. UNPUBLISHED—RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF THE UNITED STATES.

Use, duplication, or disclosure of any data and computer software by the U.S. Government is subject to restrictions, as applicable, set forth in FAR

Section 52.227-14, DFARS 252.227-7013, DFARS 252.227-7014, DFARS 252.227-7015, and DFARS 252.227-7025, as amended from time to time.

Contractor/Manufacturer is BMC SOFTWARE INC, 2101 CITYWEST BLVD, HOUSTON TX 77042-2827, USA. Any contract notices should be sent to this

address.

BMC Software Inc.

2101 CityWest Blvd, Houston TX 77042-2827, USA

713 918 8800

Customer Support: 800 537 1813 or contact your local support center


Recommended