config‎ > ‎

config.ini

The config,ini files can be used to:

  1. set configuration options for infx
  2. pass variables into the service execution environment
  3. set up global variables to use in templates.
  4. set up service alias definitions
  5. define the backup and restore manager
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 service environment after changing these files. Use the config service to check that your options have been
parsed correctly.

sections

 section  description

 infxenv  infx settings
 env  shell environment variables
 template  global template variables
 alias  service alias definitions
 instalias  instance alias definitions
 hostalias host alias definitions 
 BAR  backup and restore manager

infxenv

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

These are the default settings:

[infxenv]
; instance management params
INSTBAE = /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}/logs
CHKDIR = /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 =


 parameter  description

 default
 INSTBASE  Where to look for infx instances  /infx/inst
 INFORMIXSERVER  Informix variable defines the current instance  ${inst} e.g. infx01
 INFORMIXDIR  Informix variable defines software location  /infx/inst/${inst}/informixdir
 INFORMIXSQLHOSTS  Informix variable defines sqlhost file location  /infx/inst/${inst}/informixdir/etc/sqlhosts
 ONCONFIG  Informix variable defined instance configuration file  onconfig.${inst}
 TMPDIR  Location for infx temporary files  /infx/inst/${inst}/tmp
 LOGDIR  Location of infx service history files  /infx/inst/${inst}/logs
 CHKDIR  Location of instance chunk files  /infx/inst/${inst}/chks
 BACKUPDIR  Location of backups directory  /infx/inst/${inst}/backup/db
 BARMANAGER  infx backup and restore manager  ontape
 INFXCGI  CGI address  /infx/scgi-bin/infx.cgi
 INFXCLI  Location of the infx cli  /infx/scripts/infxcli
 INFXREMOTE  Command to use to access remote host  ssh
 INFXCHUNK  Command to use to create a missing chunk file  
 INFX_PHOTO Where to store output from the photo service /infx/${inst{/photo
 INFX_DBPHOTO_DBS List of databases to include in a db photo "all"
 INFX_SERVICE_LIST What services show in config dashboard backup-dbs backup-logs clean restore start
 INFX_NO_LOCK_WAITS Set to "yes" to avoid parsing onstat -k output 

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. 

These instances and hosts show in the dashboard drop down list, and are used by the infx rlist and infx rstat. Specify a list if you don't want everything from the sqlhosts file. 

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 service. These settings go into your shell
via the env service and are set when the database engine is first started.

[env]
DBDATE = DMY4/

template

Variables set here can be referenced in template output. For example, a company name.

[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 service. You can define an alias to represent any combination of service and
parameters.

Example backup services:

[[alias alias="L0" cmd="backup" type="dbs" level=0]]

When you execute this alias, infx automatically expands it:

infx L0 => infx cmd=backup type=dbs level=0

When you call the alias, any additional parameters you pass are automatically passed through and added to the command. If you
specify a parameter on the command line that is part of the alias definition, the final command will get the command line value.

infx defines these alias by default:

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

bob001@bobii:/home/informix>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:

[[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 service, you can specify that an allow file must exist before the service will run.

Example:

[mustallow]
restore=yes

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

clean

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

Example:

[cleanup]
backup-logs=3
restore=-1

This example will only keep three days of logical log backup service logs. Setting restore=-1 will keep all restore service log files.s

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 service execution status. Specify service 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:

[[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.

[include sub-infx-ontape.ini]

See setup BAR manager for more details on these settings.