config.ini

Top level configuration, infx wide settings.

The config,ini files can be used to:

  1. set configuration options for infx
  2. pass variables into the command execution environment
  3. set up global variables to use in templates.
  4. set up command alias definitions
  5. define the backup and restore manager

file locations

Config files can be maintained from the config dashboard, or edited in the following locations.

file description
/infx/etc/config.ini DO NOT EDIT, default global settings for infx
/infx/local/etc/config.ini your overall infx settings
/infx/local/etc/sub-${host}.ini file with settings just for ${host}
/infx/inst/${inst}/config.ini file with settings just for ${inst}

Its good practice to test the command environment after changing these files.

Use the infx config command to check that your options have been parsed correctly.

sections

section description
infxenv infx settings
env shell environment variables
template global template variables
alias command alias
instalias instance alias
hostalias host alias
BAR backup and restore

The settings in this section apply directly to the infx management suite, and are used to build the command execution environment.

default config

variables

parameter description
INSTBASE Where to look for infx instances
INFORMIXSERVER Informix variable defines the current instance
INFORMIXDIR Informix variable defines software location
INFORMIXSQLHOSTS Informix variable defines sqlhost file location
ONCONFIG Informixvariable defined instance configuration file
TMPDIR Location for infx temporary files
LOGDIR Location of infx command history files
CHKDIR Location of instance chunk files
BACKUPDIR Location of backups directory
BARMANAGER infx backup and restore manager
INFXCGI CGI address
INFXCLI Location of the infx cli
INFXREMOTE Command to use to access remote host
INFXCHUNK Command to use to create a missing chunk file
INFX_PHOTO Where to store output from the photo command
INFX_DBPHOTO_DBS List of databases to include in a db photo
INFX_SERVICE_LIST What commands show in config dashboard
INFX_NO_LOCK_WAITS Set to “yes” to avoid parsing onstat -k output

special parameters

The special parameters, REMOTE_HOST and REMOTE_INST and used to quickly access remote instances.

By default, REMOTE_HOSTS and REMOTE_INSTS are loaded from the sqlhosts file, and contain every remote host and remote instance defined there.

You can override these defaults by supplying your own list of remote hosts and remote instances.

This example limits the remote hosts lists to server1 and server2 only. The instance list is limited to instance primus@server1 and secondus@server2 only. Any other remote hosts and instances can still be accessed manually.

env

Variables set in this section are automatically put in the shell environment before running a command. These settings go into your shell via the env command and are set when the database engine is first started.

template

Variables set here can be referenced in template output.

For example, a company name.

infx uses a set of color names in templates for passing color values to graphs or other objects that don’t support CSS class names.

You can override those default colors here.

name default description
CLR_GOOD #008ED6 Its all good
CLR_OK #88AA88 Its all ok
CLR_BAD #D64646 Things are not good
CLR_ERROR #D64646 This is an error
CLR_WARN #FF8E46 Warning, its going to go bad.
CLR_BLAND #EEEEEE Boring and almost invisible
CLR_GONE #FFFFFF Invisible
CLR_DAT #2283D6 Data, as opposed to indices
CLR_IDX #5583D6 Indices, as opposed to data

alias

Use this section to define an alias for a frequently executed command. You can define an alias to represent any combination of command and parameters.

Example backup command:

When you execute this infx LO, infx expands it to infx cmd=backup type=dbs level=0.

infx defines these alias by default:

To see the current alias definitions, use the infx alias command:

instalias

Use this section to define an alias for an infx instance. You may need to create an alias for an instance if you use HDR replication or change the instance DBSERVERNAME parameter.

Example instalias:

[[instalias inst="secondus" alias="secondus_tcp"]]

When you access instance “secondus_tcp”, you will be correctly directed to the “secondus” instance.

hostalias

Use this section to define an alias for a host. You may need to do this if you have multiple network adapters, or are using a VPN. For example, servera might also be known as servera-vpn.

Example hostalias:

[[hostalias host="servera" alias="servera-vpn"]]

When you access host “servera-vpn”, infx will redirect to host “servera”.

mustallow

To prevent accidental execution of a command, you can specify that an allow file must exist before the command will run.

Example:

Now, the file /infx/inst/${inst}/etc/allow-restore must exist or the restore command will not start.

clean

Define how the command and instance logs will be cleaned up. Specify a number of log files to keep for each command. By default 28 log files are kept.

Example:

This example will only keep three days of command logs for backups. Setting restore=-1 to keep all restore command log files.

alert

Use this section to ignore items when determining alert status. Specify an number of values to be ignored for each type alert status.

status description
inst_onlinelog_status Set to good, warn or error based on recent messages in online log. Specify patterns to ignore.
service_status Set to good, warn or error based on latest command execution status. Specify command names to ignore.
dbspace_status Set to good, warn or error based on the flags and amount of free space. Specify dbspace names to ignore
users-name Set to good, warn or error based on user session status. Specify user names to ignore.
users-host Specify hosts to ignore user sessions from
users-dbname Specify databases to ignore users sessions for.
fs_status Set to good, warn or error based on amount of free space. Specify file systems to ignore.

Example alert status:

BAR

In the config.ini, you make one section for each type of backup and restore manager you want to define. As these definitions are quite detailed, its best to create a sub config file, and include it into the main one.The included config files provide basic definitions for backup and restore with ontape and onbar.

Example, load definition for ontape backup and restore to disk.

[include sub-infx-ontape.ini]

See backup & restore for more information.