summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2013-12-11 16:57:42 (GMT)
committerBritney Fransen <brfransen@gmail.com>2013-12-11 16:57:42 (GMT)
commit78e5c0eb57d6bd88bbf81ddbe9f474a0a896b298 (patch)
tree963b884ab71097b035dc06321e1cc30482a42c91 /abs/core/LinHES-system
parent8ae3e21c370d8a60b4572f35ea8d1654bc197f9f (diff)
downloadlinhes_pkgbuild-78e5c0eb57d6bd88bbf81ddbe9f474a0a896b298.zip
linhes_pkgbuild-78e5c0eb57d6bd88bbf81ddbe9f474a0a896b298.tar.gz
linhes_pkgbuild-78e5c0eb57d6bd88bbf81ddbe9f474a0a896b298.tar.bz2
LinHES-system: myth_status.py: add support for color levels. refs #943 #945
remove diskspace.cron as xymon now monitors and notifies disk levels
Diffstat (limited to 'abs/core/LinHES-system')
-rwxr-xr-xabs/core/LinHES-system/PKGBUILD8
-rwxr-xr-xabs/core/LinHES-system/diskspace.cron2
-rw-r--r--abs/core/LinHES-system/myth_status.py10
3 files changed, 10 insertions, 10 deletions
diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD
index 48be7d5..e03cb7d 100755
--- a/abs/core/LinHES-system/PKGBUILD
+++ b/abs/core/LinHES-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-system
pkgver=8.1
-pkgrel=8
+pkgrel=9
arch=('i686' 'x86_64')
install=system.install
pkgdesc="Everything that makes LinHES an automated system"
@@ -28,7 +28,7 @@ binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh
mythwelcome-config.py mythwelcome-set-alarm.sh mythwelcome-test-wakeup.sh"
source=(LinHES-session LinHES-profile.sh $binfiles
- alsa-base diskspace.cron cacheclean.cron xfs_defrag.cron
+ alsa-base cacheclean.cron xfs_defrag.cron
readme_is_xml readme_light add_storage.readme
system-sudo.rules msg.cfg)
@@ -61,7 +61,6 @@ package() {
#cron files
#install -m755 -D $srcdir/smolt.cron $pkgdir/etc/cron.weekly/smolt.cron
install -m755 -D $srcdir/cacheclean.cron $pkgdir/etc/cron.weekly/cacheclean
- install -m755 -D $srcdir/diskspace.cron $pkgdir/etc/cron.tenminutes/diskspace
install -m755 -D $srcdir/xfs_defrag.cron $pkgdir/etc/cron.weekly/xfs_defrag
#sudo rules
@@ -86,7 +85,7 @@ md5sums=('7f5624a2d965a4cd3ed6a37ebee13fd9'
'542e670e78d117657f93141e9689f54d'
'8da6a7f1703a002f84e66629e847d8a6'
'bb72ab230c7a71706285bd0f31a4fb1f'
- '07fc64580cc98aa28561730ac7695eca'
+ '42981e30e016c5f00b841b8490a3a489'
'962a3e9eaba2d1466251b7ab0956705d'
'1758aed160de64abfafb28a3a8f3390e'
'33fbebbd546672cedd3c5e7350ab414e'
@@ -129,7 +128,6 @@ md5sums=('7f5624a2d965a4cd3ed6a37ebee13fd9'
'95c092f67036a361ef7a57436f44332e'
'410795ef9039e4c6c0484e706ecfd567'
'eb879fee9603a05d5420d4ce8ed9e450'
- '84492954db16740f949d795b74383189'
'02c810c2f47b7c4495fdacaf54189473'
'474d5c6883fcfffae4f199aceb3b1356'
'36bdfa8d877cea20ca3870faf08e08d5'
diff --git a/abs/core/LinHES-system/diskspace.cron b/abs/core/LinHES-system/diskspace.cron
deleted file mode 100755
index ab3c91b..0000000
--- a/abs/core/LinHES-system/diskspace.cron
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-/usr/bin/nice -n19 /usr/LH/bin/diskspace.sh -osd
diff --git a/abs/core/LinHES-system/myth_status.py b/abs/core/LinHES-system/myth_status.py
index 0f2edfb..df8c84a 100644
--- a/abs/core/LinHES-system/myth_status.py
+++ b/abs/core/LinHES-system/myth_status.py
@@ -5,6 +5,7 @@
from MythTV import MythBE,MythDB,MythLog
import datetime,time,sys,subprocess,re
import os,glob
+from socket import gethostname;
def formatTD(td):
days = td.days
@@ -56,6 +57,7 @@ def print_alerts():
out_line=''
datahost = ''
dataservice = ''
+ datacolor = ''
datadown = ''
try:
#print " myth_staus: reading in %s" %alert_file
@@ -76,14 +78,16 @@ def print_alerts():
datahost = value.strip()
elif data == 'SERVICE':
dataservice = value.strip()
+ elif data == 'COLOR':
+ datacolor = value.strip()
elif data == 'DOWN':
datadown = value.strip()
sec=int(datadown)
td_sec = datetime.timedelta(seconds=sec)
td_sec_formated = formatTD(td_sec)
- out_line =" %s on %s down for %s \n" %(dataservice,
- datahost,
+ out_line =" %s on %s %s for %s \n" %(dataservice,
+ datahost,datacolor.upper(),
td_sec_formated)
out_alert += out_line
@@ -91,7 +95,7 @@ def print_alerts():
print "---------------"
if len(out_alert) > 0:
print out_alert
- print " Please see the system health webpage for more information"
+ print " Go to http://%s and click Health & Maintenance for more information." %gethostname()
else:
print " All systems OK"