config.ini
Top level configuration, infx wide settings.
The config,ini files can be used to:
- set configuration options for infx
- pass variables into the command execution environment
- set up global variables to use in templates.
- set up command alias definitions
- 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[infxenv] ;instance management params INSTBASE = /infx/inst INFORMIXSERVER = ${inst} INFORMIXDIR = /infx/inst/${inst}/informixdir INFORMIXSQLHOSTS = /infx/inst/${inst}/informixdir/etc/sqlhosts ONCONFIG = onconfig.${inst} TMPDIR = /infx/inst/${inst}/tmp LOGDIR = /infx/inst/${inst}/logsCHKDIR = /infx/inst/${inst}/chks BACKUPDIR = /infx/inst/${inst}/backup/db BARMANAGER = ontape INFXCGI = /infx/scgi-bin/infx.cgi INFXCLI = /infx/scripts/infxcli INFXREMOTE = "ssh" REMOTE_HOSTS = REMOTE_INSTS = |
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.
1 2 |
REMOTE_HOSTS = "server1 sever2" REMOTE_INSTS = "primus@server1 secondus@server2" |
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.
1 2 |
[env] DBDATE = DMY4/ |
template
Variables set here can be referenced in template output.
For example, a company name.
1 2 |
[template] COMPANY_NAME = jgharris.com |
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:
1 |
[[alias alias="L0" cmd="backup" type="dbs" level=0]] |
When you execute this infx LO, infx expands it to infx cmd=backup type=dbs level=0.
infx defines these alias by default:
1 2 3 4 |
[[alias="L0" level="0" cmd="backup" type="dbs"]] [[alias="L1" level="1" cmd="backup" type="dbs"]] [[alias="L2" level="2" cmd="backup" type="dbs"]] [[alias="backup-logs" cmd="backup" type="logs"]] |
To see the current alias definitions, use the infx alias command:
1 2 3 4 5 6 |
$ infx alias alias=L0 level=0 cmd=backup type=dbs alias=L1 level=1 cmd=backup type=dbs alias=L2 level=2 cmd=backup type=dbs alias=backup-logs cmd=backup type=logs alias=mylist cmd=list util=mylist |
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:
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:
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:
1 2 |
[mustallow] restore=yes |
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:
1 2 3 |
[cleanup] backup-dbs=3 restore=-1 |
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:
1 2 3 4 5 6 |
[[alert status="onlinelog" ignore="warning:"]] [[alert status="dbspace" ignore="archive"]] [[alert status="fs" ignore="/scratch"]] [[alert status="users-name" ignore="informix"]] [[alert status="users-host" ignore="testapp"]] [[alert status="users-dbname" ignore="testdb"]] |
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.
See backup & restore for more information.