SADMIN Configuration file

Updated: 2018/08/20
O/S : Aix, Linux, MacOS

 
NAME

sadmin.cfg   -   SADMIN Tools configuration file.

 
SYNOPSIS

sadmin.cfg

  • This file is located in the "${SADMIN}/cfg" directory, and is SADMIN configuration file.
 
DESCRIPTION
  • Blank lines and lines that begin with a "#" are ignored by the System Monitor
  • SADMIN use this file by every scripts included in SADMIN. The values define in this file are available to all scripts you make (Shell or Python). You can view the list of environment variables and functions available to you by viewing the sadmlib_std_demo_sh.pdf (Shell) and sadmlib_std_demo_py.pdf (Python), that was produced by running the Library demonstration scripts ($SADMIN/bin/sadmlib_std_demo.sh, $SADMIN/bin/sadmlib_std_demo.py).

  • #----------------------------------------------------------------------------
    # SADMIN - Configuration file - Created on Mon Dec 14 15:52:38 EST 2015
    #   - Comment line MUST begin with an # in column 1
    #   - Blank lines are ignored
    #   - The Format is simple (NAME = VALUE)
    #       NAME must start in column 1
    #   - These are the defaults values used by sadmin tools
    #   - Most fields can be overriden on a script basis
    #        Like SADM_ALERT_TYPE , SADM_MAIL_ADDR overriden at the top of script
    #        See the template sadm_template.sh as an example.
    #   - If this file (sadmin.cfg) is not present when the 1st script is run,
    #     then template file .sadmin.cfg will be copied to sadmin.cfg
    #     If both file sadmin.cfg and .sadmin.cfg are not present default values
    #     are used.
    #----------------------------------------------------------------------------
    
    
    
    
     
    #----------------------------------------------------------------------------
    # This field indicate whether this host is a SADMIN [S]erver or a [C]lient.
    # Valid value are : SADMIN [S]erver, SADMIN [C]lient, SADMIN [D]evelopement
    # Used in various script to activate or deactivate some features/operations.
    # IMPORTANT : Set this field accordingly, there can be only one SADMIN Server
    #
    # [D]evelopment Host Type is used only in 'sadm_client_housekeeping.sh' script.
    #  - When SADM_HOST_TYPE is set to [C] then server dir. are deleted on client.
    #  - When SADM_HOST_TYPE is set to [D] then server dir. are left untouched.
    #----------------------------------------------------------------------------
    SADM_HOST_TYPE = C
    
    
    #----------------------------------------------------------------------------
    # Default Option for sending Alert after a SCRIPT is ended
    # Can be overridden by changing SADM_ALERT_TYPE at the top of template script.
    # 0 = No Alert Sent     1 = On Error Only
    # 2 = On Success Only   3 = Always send alert
    #----------------------------------------------------------------------------
    SADM_ALERT_TYPE = 1
    
    
    #----------------------------------------------------------------------------
    # The default Alert Group is 'default' (Defined in alert_group.cfg)
    # Group specified here, MUST exist in the $SADMIN/cfg/alert_group.cfg.
    #
    # Use in Script: 
    #   Default Alert Group for sending Alert at the end of a script.
    #   For exception, it can be overridden by changing SADM_ALERT_GROUP 
    #   variable at the top of script.
    #
    # Use by System Monitor 
    #   When a new filesystem is detected, line are added with this Alert group 
    #   for Warning/Error.
    #   For exception, it can be overridden by changing the Warning Alert Group
    #   (Column J) and the Error Alert Group (Column K), in the System Monitor
    #   configuration file of the system ($SADMIN/cfg/`hostname -s`.smon).
    #
    #----------------------------------------------------------------------------
    SADM_ALERT_GROUP = default
    
    
    
    
    #----------------------------------------------------------------------------
    # This field specify the email address used by SADMIN Tools
    # to send various email. For example, you can request that the log of
    # a script be sent when an error occured or every time is it run.
    # (See SADM_ALERT_TYPE later on)
    # Multiple email can be specify, a comma must seperate each of them.
    #----------------------------------------------------------------------------
    SADM_MAIL_ADDR = duplessis.jacques@gmail.com
    
    
    
    #----------------------------------------------------------------------------
    # Your company name 
    # This name that will appears in the heading of the web site and on 
    # some report and email that SADMIN produce.
    #----------------------------------------------------------------------------
    SADM_CIE_NAME = Your Cie Name
    
    
    
    
    #----------------------------------------------------------------------------
    # SADMIN Server - (MUST be fully qualified name)
    # This name MUST NOT be an alias in the DNS
    # It MUST be the result of the 'hostname' command on the SADMIN server
    #----------------------------------------------------------------------------
    SADM_SERVER = holmes.maison.ca
    #
    #
    #----------------------------------------------------------------------------
    # Standard Port for SSH is 22 - But if you use a different port put it here
    #----------------------------------------------------------------------------
    SADM_SSH_PORT = 32
    #
    #----------------------------------------------------------------------------
    # Location of the rrdtool binary 
    #----------------------------------------------------------------------------
    SADM_RRDTOOL = /bin/rrdtool
    #
    #
    #----------------------------------------------------------------------------
    # Default Domain when Adding new server to SADM Tools
    #----------------------------------------------------------------------------
    SADM_DOMAIN = maison.ca
    
    
     
     
    #----------------------------------------------------------------------------
    # This is the user and group that have access to $SADM_BASE_DIR (/sadmin)
    # sadm_housekeeping_client.sh and sadm_housekeeping_server.sh will use them
    # to make sure all files and directories belong to them.
    #----------------------------------------------------------------------------
    SADM_USER = sadmin
    SADM_GROUP = sadmin
    
    
    #----------------------------------------------------------------------------
    # This is the user and group that run the apache server. 
    # Do a 'ps -ef | grep -Ei "httpd|apacahe2"' & look at the name in column one,
    # for the user name (SADM_WWW_USER).
    # And give the same name to the group name (SADM_WWW_GROUP).
    # sadm_housekeeping_server.sh will use them to make sure all files and
    # directories belong to them.
    # They should be set to the user and group that is running the http server.
    # On RedHat/CentOS it is usually apache/apache
    # On Ubuntu/Debian/Raspbian,LinuxMint it is usually www-data/www-data
    #----------------------------------------------------------------------------
    SADM_WWW_USER  = apache
    SADM_WWW_GROUP = apache
    
    
    #----------------------------------------------------------------------------
    # MARIADB/MYSQL DATABASE PARAMETERS
    #----------------------------------------------------------------------------
    SADM_DBNAME     = sadmin
    SADM_DBHOST     = sadmin.maison.ca
    SADM_DBPORT     = 3306
    SADM_RW_DBUSER  = sadmin
    SADM_RO_DBUSER  = squery
    
    
    #----------------------------------------------------------------------------
    # The Log filename are "[HOSTNAME]_sadm_[NAME_OF_SCRIPT].log"
    # They are located in ${SADM_BASE_DIR}/log
    # Log are created/updated each time the function sadm_start() is called.
    # There is a log file per script, log are cumulative, they are never cleared
    # SADM_MAX_LOGLINE represent the maximum number of lines that each *.log file
    # can contain.
    # *.log are trimmed to this number when the function sadm_stop() is called
    #----------------------------------------------------------------------------
    SADM_MAX_LOGLINE=2000
    
     
    #----------------------------------------------------------------------------
    # The *.rch ([R]eturn [C]ode [H]istory] file, record script execution history.
    #----------------------------------------------------------------------------
    # You can use the "sadm_rch_scr_summary.sh" (You can also type "smon")
    # to display a summary of all "rch" files collected from the server farm.
    #----------------------------------------------------------------------------
    # The *.rch filename are "[HOSTNAME]_sadm_[NAME_OF_SCRIPT].rch"
    # They are located in ${SADM_BASE_DIR}/dat/rch
    # Log are created/updated each time the function sadm_start() is called.
    # There is a log file per script, log are cumulative, they are never cleared
    # SADM_MAX_RCHLINE represent the maximum number of lines that each *.rch file
    # can contain.
    # *.rch are trimmed to this number when the function sadm_stop() is called
    #----------------------------------------------------------------------------
    # Each Script excution will create 2 lines in the rch file
    # Example :
    #   nomad 2016.01.16 06:05:01 ........ sadm_daily_data_collection 2
    #   nomad 2016.01.16 06:05:01 06:06:09 sadm_daily_data_collection 0
    # First Line
    #   Line is added to rch file when the script call the sadm_start() function
    #   The code "2" at the end of the file indicate the script in "Running"
    #   So the script "sadm_daily_data_collection" was started at 6:05:01 am
    #   on January the 16th 2016 on the host named "nomad"
    # Second Line
    #   Line is added to rch file when the script call the sadm_stop() function.
    #   Code "0" at the end of the file indicate the script ended with "Success".
    #   Code "1" at the end of the file would indicate a "Failure" of the script.
    #   So the script "sadm_daily_data_collection" was started at 6:05:01 am
    #   on January the 16th 2016 on the host named "nomad" and ended at 06:06 am.
    #----------------------------------------------------------------------------
    # If script is run daily, so value of 100 would keep an history of 50 days.
    #----------------------------------------------------------------------------
    SADM_MAX_RCHLINE=125
    
    
     
    #----------------------------------------------------------------------------
    # One *.nmon file is produced daily and recorded in $SADMIN_BASE_DIR/dat/nmon
    # of each server.
    # The name of each nmon file is "[HOSTNAME]_[yymmdd]_[hhmm].nmon"
    # This file is created by the "nmon" tool, that collect information and
    # performance statistics about the server.
    # You can find the nmon homepage at http://nmon.sourceforge.net/pmwiki.php
    # SADMIN script will install nmon if not present on the system, the first
    # time a script using the SADM Library is run.
    # You can find a copy of nmon for your env. in ${SADM_BASE_DIR}/pkg/nmon dir.
    # SADM Tools will use it to produce performance graph of your servers.
    # -----
    # Once a day nmon dir. of each servers is sync (rsync) to the SADMIN server,
    # this is done by the "sadm_daily_data_collection.sh" that run every day early
    # in the morning.
    # -----
    # At midnight every night the current nmon file is closed and a new one created
    # This is done by executing "sadm_nmon_midnight_restart.sh" (it is in crontab)
    # -----
    # The script "sadm_housekeeping_client.sh" run once a day delete any nmon
    # files older that the number of days specified in this Global variable.
    # Default value of 40 days, is a reasonable default (each file is about 500k)
    #----------------------------------------------------------------------------
    SADM_NMON_KEEPDAYS=60
    
    
     
    #----------------------------------------------------------------------------
    # The *.rch files ([R]eturn [C]ode [H]istory) are updated every time the
    # associate script is run.
    # The *.rch files are located in ${SADM_BASE_DIR}/dat/rch directory.
    # If an *.rch is not updated for a long time, this may
    # indicate that the associated script don't exist anymore and as not been run
    # for a while. The *.rch file will then stay there for ever.
    # The variable SADM_RCH_KEEPDAYS indicated the number of days we wait, till we
    # deleted an *.rch file that was not updated for the number of days specified.
    # Recommended value is 60 days.
    #----------------------------------------------------------------------------
    SADM_RCH_KEEPDAYS=60
    
    
    
     
    #----------------------------------------------------------------------------
    # The *.log files are updated every time the associate script is run.
    # The *.log files are located in ${SADM_BASE_DIR}/log directory.
    # If an *.log is not updated for a long time, this may indicate that the
    # associated script don't exist anymore and as not been run for a while.
    # The *.log file will then stay there for ever.
    # The variable SADM_LOG_KEEPDAYS indicated the number of days we wait, till we
    # deleted an *.log file that was not updated for the number of days specified.
    # Recommended value is 60 days.
    #----------------------------------------------------------------------------
    SADM_LOG_KEEPDAYS=60
    
    
    #----------------------------------------------------------------------------
    # NFS mount point where the Rear Backup are stored on the NFS Server
    # NFS Server name where the Rear Backup are Stored
    # NFS Server name where the Storix Backup are Stored
    #----------------------------------------------------------------------------
    SADM_REAR_NFS_SERVER = batnas.maison.ca
    SADM_REAR_NFS_MOUNT_POINT = /volume1/Linux_DR
    SADM_REAR_BACKUP_TO_KEEP = 3
    
    #----------------------------------------------------------------------------
    # NFS mount point where the Storix are stored on the NFS Server
    #----------------------------------------------------------------------------
    SADM_STORIX_NFS_SERVER = batnas.maison.ca
    SADM_STORIX_NFS_MOUNT_POINT = /volume1/storix
    SADM_STORIX_NFS_BACKUP_TO_KEEP = 3
    
    
    #----------------------------------------------------------------------------
    # Backup Script (sadm_backup.sh) to NFS or Local mount point 
    #----------------------------------------------------------------------------
    SADM_BACKUP_NFS_SERVER      = batnas.maison.ca
    SADM_BACKUP_NFS_MOUNT_POINT = /volume1/backup_linux
    
    # Backup to keep per type of backup
    SADM_DAILY_BACKUP_TO_KEEP   =   3
    SADM_WEEKLY_BACKUP_TO_KEEP  =   3
    SADM_MONTHLY_BACKUP_TO_KEEP =   3
    SADM_YEARLY_BACKUP_TO_KEEP  =   2
    
    # Day of the week to do a weekly backup (1=Mon,2=Tue,3=Wed,4=Thu,5=Fri,6=Sat,7=Sun)
    SADM_WEEKLY_BACKUP_DAY      =   5     
    # Date in the month to do a Monthly Backup Date (1-28)             
    SADM_MONTHLY_BACKUP_DATE    =   1    
    # Month and Date When to do a Yearly Backup Month
    SADM_YEARLY_BACKUP_MONTH    =   12
    SADM_YEARLY_BACKUP_DATE     =   31
    
       
    #----------------------------------------------------------------------------
    # NFS Server, mount point and Number of Mksysb backup to keep 
    #----------------------------------------------------------------------------
    SADM_MKSYSB_NFS_SERVER = batnfs.maison.ca
    SADM_MKSYSB_NFS_MOUNT_POINT = /volume1/mksysb
    SADM_MKSYSB_BACKUP_TO_KEEP = 2
    
     
    #----------------------------------------------------------------------------
    # Network that we want to scan daily and have HostName Discover (DNS)
    # and Mac Address
    #----------------------------------------------------------------------------
    SADM_NETWORK1 = 192.168.1.0/24
    SADM_NETWORK2 = 
    SADM_NETWORK3 =
    SADM_NETWORK4 =
    SADM_NETWORK5 =
    



 
AUTHOR
Jacques Duplessis (jacques.duplessis@sadmin.ca.).
Any suggestions or bug report can be sent at http://www.sadmin.ca/support.php

 
COPYRIGHT
Copyright © 2018 Free Software Foundation, Inc. License GPLv3+:
    - GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software, you are free to change and redistribute it.
There is NO WARRANTY to the extent permitted by law.

 
SEE ALSO
sadm_housekeeping_client.sh   (Daily end of day script)
sadm_housekeeping_server.sh   (Daily start of day script)

Copyright © 2015-2019 - www.sadmin.ca - Suggestions, Questions or Report a problem at support@sadmin.ca