diff options
author | James Meyer <james.meyer@operamail.com> | 2012-12-17 20:13:45 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-12-17 20:13:45 (GMT) |
commit | 83c279ebc4568913810e401b3d7d57bb11cfcfc0 (patch) | |
tree | 31351118a4371baf49c98a73ad8d3ebe0bc21bc4 /abs/core/xymon/hobbit_myth_data.py | |
parent | 5aacb10ca8302bc1e05f267ac74dfda4667cd51d (diff) | |
download | linhes_pkgbuild-83c279ebc4568913810e401b3d7d57bb11cfcfc0.zip linhes_pkgbuild-83c279ebc4568913810e401b3d7d57bb11cfcfc0.tar.gz linhes_pkgbuild-83c279ebc4568913810e401b3d7d57bb11cfcfc0.tar.bz2 |
xymon: add check for remote backup copies that are pending.
refs # 885
Diffstat (limited to 'abs/core/xymon/hobbit_myth_data.py')
-rw-r--r-- | abs/core/xymon/hobbit_myth_data.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/abs/core/xymon/hobbit_myth_data.py b/abs/core/xymon/hobbit_myth_data.py index e870754..8b38fc6 100644 --- a/abs/core/xymon/hobbit_myth_data.py +++ b/abs/core/xymon/hobbit_myth_data.py @@ -71,28 +71,41 @@ mtc_file = "/var/log/%s/myth_mtc.log" %date mtc=check_mtc(mtc_file) num_days=find_data_left() + + + if mtc: BBCOLOR="green" msg="\n Maintenance script ran ok \n %s \n " %mtc_file else: BBCOLOR ="yellow" - msg="\n Maintenance script didn't run. \n %s \n" %mtc_file + msg="\n * Maintenance script didn't run. \n %s \n" %mtc_file if num_days == 1 : BBCOLOR="yellow" - msg+="\nOnly 1 day of guide data left" + msg+="\n * Only 1 day of guide data left" elif num_days == 0 : BBCOLOR="red " - msg+="\nNo guide data available" + msg+="\n * No guide data available" elif num_days == -100 : BBCOLOR="red" - msg+="\nCould not connect to database" + msg+="\n ** Could not connect to database!" else: data_check = True BBCOLOR="green" msg+="\n %s days of guide data" %(num_days) +if os.path.isfile("/data/storage/disk0/backup/system_backups/remote_backup_failed.txt"): + if BBCOLOR == "green": + BBCOLOR="yellow" + msg+="\n\n * Remote backup jobs are queued" +else: + msg+="\n\n No remote backup jobs queued" + + + + BBLINE=msg LINE = "status " + MACHINE + ".myth_mtc" + " " + BBCOLOR + " " + DATE + " " + BBLINE cmd = BB + ' ' + BBDISP + ' "' + LINE + '"' |