sadm_daily_farm_fetch.sh
NAME
sadm_daily_farm_fetch.sh
Collect Hardware/Software/Performance data from actives servers
SYNOPSIS
sadm_daily_farm_fetch.sh [-d 0-9] [-h] [-v]
DESCRIPTION
This script is run automatically every morning by the sadm_server-sunrise.sh script. The function of this script is to transfer the disaster recovery directory and the system performance monitor files (*.nmon) produced by each client to the SADMIN server.
- The disaster recovery directories will then become the input for the “sadm_database_update.py” script, that is again run as part of the sadm_server-sunrise.sh.
rsync -ar --delete $HOSTNAME:/sadmin/dat/dr/ /sadmin/www/dat/$HOSTNAME/dr/
- The performance data files will be processed by the “sadm_nmon_rrd_update.sh” that execution usually follow this script in the execution sequence in sadm_server-sunrise.sh.
rsync -ar --delete $HOSTNAME:/sadmin/dat/nmon/ /sadmin/www/dat/$HOSTNAME/nmon/
EXAMPLE
# sadm_daily_farm_fetch.sh
================================================================================
Sat May 29 12:21:14 EDT 2021 - sadm_daily_farm_fetch.sh V4.5 - SADM Lib. V3.70
Server Name: holmes.maison.ca - Type: LINUX
CENTOS 7.9.2009 Kernel 3.10.0-1160.25.1.el7.x86_64
==================================================
Processing All Actives Server(s)
Processing (1) borg.maison.ca
SADMIN installed in /opt/sadmin on borg.
[ OK ] rsync -ar --delete borg:/opt/sadmin/dat/dr/ /sadmin/www/dat/borg/dr/
[ OK ] rsync -ar --delete borg:/opt/sadmin/dat/nmon/ /sadmin/www/dat/borg/nmon/
Processing (2) centos6.maison.ca
[ WARNING ] Can't SSH to centos6.maison.ca (Sporadic System).
Processing (3) centos7.maison.ca
SADMIN installed in /sadmin on centos7.
[ OK ] rsync -ar --delete centos7:/sadmin/dat/dr/ /sadmin/www/dat/centos7/dr/
[ OK ] rsync -ar --delete centos7:/sadmin/dat/nmon/ /sadmin/www/dat/centos7/nmon/
Processing (4) centos8.maison.ca
SADMIN installed in /opt/sadmin on centos8.
[ OK ] rsync -ar --delete centos8:/opt/sadmin/dat/dr/ /sadmin/www/dat/centos8/dr/
[ OK ] rsync -ar --delete centos8:/opt/sadmin/dat
...
...
----------
FINAL number of Error(s) detected is 0
==================================================
Script exit code is 0 (Success) and execution time is 00:00:57
History (/sadmin/dat/rch/holmes_sadm_daily_farm_fetch.rch) trim to 35 lines.
Script will send an alert only when it terminate with error ($SADM_ALERT_TYPE=1).
Script succeeded, no alert will be send to 'default' alert group.
New log (/sadmin/log/holmes_sadm_daily_farm_fetch.log) created ($SADM_LOG_APPEND='N').
End of sadm_daily_farm_fetch.sh - Sat May 29 12:22:07 EDT 2021
OPTIONS
Options | Description |
---|---|
[ -d 0-9 ] | Set debug level from 0 to 9 (Default is 0) |
[ -h ] | Display this help and exit. |
[ -v ] | Output version information and exit. |
ENVIRONMENT
- The “$SADMIN” environment variable must be defined and contains the root directory of the SADMIN tools (normally /opt/sadmin). It should be already done, the setup script have updated the ‘/etc/profile.d/sadmin.sh’ and the ‘/etc/environment’ files.
- The SADMIN configuration file, is needed and loaded in memory at the beginning of every scripts. This file should already exist and contains your SADMIN configuration and preference setting.
- For Shell script the Shell Library is used and for Python script the Python Library is used.
EXIT STATUS
Exit Code | Description |
---|---|
0 | An exit status of zero indicates success. |
1 | Failure is indicated by a nonzero value, typically ‘1’. |
AUTHOR
Jacques Duplessis
Any suggestions or bug report can be submitted at the support page
COPYRIGHT
Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
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_server-sunrise.sh - Collect & process data produced by all actives clients
sadm_server_housekeeping.sh - Enforce security SADMIN Web interface & crontab files
sadm_daily_farm_fetch.sh - Collect Hardware/Software/Performance data from actives servers
sadm_database_update.py - Take data collected from clients and update database
sadm_nmon_rrd_update.sh - Daily performance database update
sadm_subnet-lookup.py - Scan network selected subnet & store info in database
sadm_backupdb.sh - Backup one or all MySQL/MariaDB databases on the system
sadmin.cfg - SADMIN main configuration file