diff options
-rwxr-xr-x | abs/core/xymon/PKGBUILD | 4 | ||||
-rwxr-xr-x | abs/core/xymon/hobbit_myth_data.py | 16 |
2 files changed, 9 insertions, 11 deletions
diff --git a/abs/core/xymon/PKGBUILD b/abs/core/xymon/PKGBUILD index 2ee5cdb..e8908cc 100755 --- a/abs/core/xymon/PKGBUILD +++ b/abs/core/xymon/PKGBUILD @@ -1,7 +1,7 @@ pkgbase=xymon pkgname=('xymonserver' 'xymonclient') pkgver=4.3.17 -pkgrel=10 +pkgrel=11 pkgdesc="Xymon is a system for monitoring of hosts and networks" license="GPL" arch=('i686' 'x86_64') @@ -169,7 +169,7 @@ md5sums=('d8d119a777e7b7204d1292fb27314312' '270e13da6cbc9d49079d994edaa71e64' '22d4c9065fd959efe82f121dcb511305' '9af2ad60ac4c3cb653754618f603e311' - 'b8eb10070f2ad6a245d3da15091694ba' + 'a9b7f0a22f29f55b2928160bc44f2c14' '6452d891d88bb46d07bcf7790a523ad0' 'b4e8641e97e6b689dbc634af785e6799' 'e2844513e2c92e8b5084818f3b2a478d' diff --git a/abs/core/xymon/hobbit_myth_data.py b/abs/core/xymon/hobbit_myth_data.py index ac56903..ec16818 100755 --- a/abs/core/xymon/hobbit_myth_data.py +++ b/abs/core/xymon/hobbit_myth_data.py @@ -66,11 +66,9 @@ def check_mtc(mtc_file): print "couldn't open %s file" %mtc_file return False else: - mtc = infile.readlines() + mtc = infile.read() infile.close() - for i in mtc: - line=i - if line.split()[0] == "Finished": + if "Finished Maintenance" in mtc: return True else: return False @@ -99,7 +97,7 @@ now = datetime.datetime.now() #date = "%s-%s-%s" %(now.year, now.month, now.day) date = (now.strftime('%Y-%m-%d')) #2013-12-03 -mtc_file = "/var/log/%s/myth_mtc.log" %date +mtc_file = "/var/log/%s/%s_myth_mtc.log" %(date,os.uname()[1]) mtc=check_mtc(mtc_file) num_days=find_data_left() @@ -109,14 +107,14 @@ current_color=0 if mtc: current_color = set_color_code(current_color,0) - msg="\n Maintenance script was successful \n Log file: %s\n " %mtc_file + msg="\n Maintenance completed successfully. \n Log file: %s\n " %mtc_file else: current_color = set_color_code(current_color,2) msg=''' - ** Maintenance script did not run. ** - BACKUP FILE WAS NOT CREATED + ** Maintenance did NOT complete sucessfully. ** - The system may have been busy + The system may have been busy. + See the log for more information. Log file: %s \n''' %mtc_file if num_days == 1 : |