summaryrefslogtreecommitdiffstats
path: root/abs/core/xymon
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/xymon')
-rw-r--r--abs/core/xymon/PKGBUILD10
-rw-r--r--abs/core/xymon/hbnotes.py11
-rw-r--r--abs/core/xymon/hobbit-myth-orphan.sh86
-rw-r--r--abs/core/xymon/hobbit_myth_data.py2
-rw-r--r--abs/core/xymon/xymon.install2
5 files changed, 53 insertions, 58 deletions
diff --git a/abs/core/xymon/PKGBUILD b/abs/core/xymon/PKGBUILD
index 5332ff5..23590a1 100644
--- a/abs/core/xymon/PKGBUILD
+++ b/abs/core/xymon/PKGBUILD
@@ -1,7 +1,7 @@
pkgbase=xymon
pkgname=(xymonserver xymonclient)
pkgver=4.3.5
-pkgrel=26
+pkgrel=32
pkgdesc="Hobbit is a system for monitoring servers and networks. "
license="GPL"
arch=('i686' 'x86_64')
@@ -9,7 +9,7 @@ arch=('i686' 'x86_64')
url="http://www.xymon.com/"
source=(http://voxel.dl.sourceforge.net/project/xymon/Xymon/4.3.5/xymon-4.3.5.tar.gz hobbitadd.py xymon_ghost_check graph.cfg.diff xymonserver.cfg.diff tasks.d.mv clientlaunch.cfg.patch hobbitstorage.py hbnotes.py hobbit-myth-orphan.sh analysis.cfg hbfunc.py be.png tuner.png tv.png hobbit-mem-myth.sh hobbit_notify.sh alerts.cfg hobbit_myth_data.py logrotate-server.xymon logrotate-client.xymon log_list.sh client-local.cfg.patch led_themes.tar.gz )
-depends=(rrdtool fping pcre python graphviz)
+depends=(rrdtool fping pcre python graphviz 'linhes-scripts>=7-24')
install=xymon.install
build() {
@@ -118,8 +118,8 @@ md5sums=('31923ec126fe1c264fceb459d2175161'
'cc845b5aedc33dda8e3103b915fe4967'
'650b523d879f32c1bad3b4a9e10e7c93'
'093648dabb0d1da0fdcc37b327737f43'
- '84f6b0db44e5142bb59aeabc7ea875af'
- '6eb6ecdf33454f35b6c2409b863c816f'
+ 'cac3478de106d875ddbdaa377d26692d'
+ '0f70e76a164f648f0a4a01110137cb20'
'f6921f0413215ae174e81306be80d37f'
'be02f5d21373f97224ffa4727ec9718a'
'd210c43fb9ee9ad6cd7648e0c2e0efea'
@@ -128,7 +128,7 @@ md5sums=('31923ec126fe1c264fceb459d2175161'
'0757294eec13771f8e63da23cf066796'
'622f400fd098cbc43c203e3210a6694e'
'd06c4327cc69aeead3fa05f39660f33e'
- '129353c8ad92e89c691382a98dd5ce77'
+ 'eb502ce1be9b658be74911b53832caa8'
'f6ff1fb4bacee930007b877424619b30'
'e06147db25d75cf246886137a4ea164a'
'98e9242ae346f729b14cb195786571f2'
diff --git a/abs/core/xymon/hbnotes.py b/abs/core/xymon/hbnotes.py
index 13dbd86..2a1b221 100644
--- a/abs/core/xymon/hbnotes.py
+++ b/abs/core/xymon/hbnotes.py
@@ -19,8 +19,8 @@ except:
-def createdropdown():
- dir = "/data/database_backup"
+def createdropdown(currenthostype):
+ dir = "/myth/system_backup"
dropdown=" "
#dropdown='''
#<input name="param2" type="radio" value="Restore" />Restore database </>
@@ -33,7 +33,8 @@ def createdropdown():
#dropdown+='<option value="' + file + '">' + file + '</option> '
dropdown+='</select> <br><input name="param2" type="radio" value="Backup" checked="checked" />Backup database<br /> '
dropdown+='<input name="param2" type="radio" value="Optimize" />Optimize database<br /> '
- dropdown+='<input name="param2" type="radio" value="ShutdownAll" />Shutdown All Systems (expect MBE)<br /> '
+ if currenthostype == "Master_backend":
+ dropdown+='<input name="param2" type="radio" value="ShutdownAll" />Shutdown All Systems (expect MBE)<br /> '
#dropdown+='''<input name="param2" type="radio" value="UpdateAll" />Update All Systems </> <select name="param5">
#<option value="Myth_only">Myth only</option>
#<option value="All"> Full System</option>
@@ -339,8 +340,8 @@ def main(argv):
</div>
'''
- if currenthostype == "Master_backend":
- mbeoptions=createdropdown()
+ if currenthostype == "Master_backend" or currenthostype == "Standalone":
+ mbeoptions=createdropdown(currenthostype)
else:
mbeoptions=''
returnurl="/xymon/notes/"
diff --git a/abs/core/xymon/hobbit-myth-orphan.sh b/abs/core/xymon/hobbit-myth-orphan.sh
index f9f7d54..5cba136 100644
--- a/abs/core/xymon/hobbit-myth-orphan.sh
+++ b/abs/core/xymon/hobbit-myth-orphan.sh
@@ -1,53 +1,47 @@
#!/bin/bash
TMPFILE=/tmp/oprhan.result
-/usr/local/bin/myth.find_orphans.pl > $TMPFILE
-
-
- COLUMN=orphan # Name of the column
- COLOR=green # By default, everything is OK
-
- # Do whatever you need to test for something
- # As an example, go red if /tmp/badstuff exists.
-
-thumbs=`grep -A 4 "Summary:" $TMPFILE |tail -n 1 | cut -d" " -f3 `
-if [ ! x$thumbs = x0 ]
-then
- MSG="$thumbs orphaned thumbnails with no corresponding recording"
- COLOR='yellow'
-fi
-
-missing=`grep -A 2 "Summary:" $TMPFILE |tail -n 1 | cut -d, -f2 | cut -d" " -f2 `
-if [ ! x$missing = x0 ]
-then
- COLOR='red'
-MSG="${MSG}
- `grep -A 2 "Summary:" $TMPFILE |tail -n 1 ` "
-fi
-
-unkown=`grep -A 5 "Summary:" $TMPFILE |tail -n 1 | cut -d" " -f3 `
-if [ ! x$unkown = x0 ]
-then
- COLOR='red'
-MSG="${MSG}
-`grep -A 5 "Summary:" $TMPFILE |tail -n 1 `"
-fi
-
-
-MSG="${MSG}
-
-
- `cat $TMPFILE`
- "
-
- # Tell Hobbit about it
- $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
-/usr/local/bin/myth.find_orphans.pl
-
+MYTHCONFDIR=/usr/share/mythtv /usr/LH/bin/find_orphans.py --printonly > $TMPFILE
+
+
+COLUMN=orphan # Name of the column
+COLOR=green # By default, everything is OK
+MSG="All OK"
+
+
+
+
+#yellow
+for i in "Orphaned video files" "Orphaned snapshots" "Database backups" "Other files"
+do
+ grep -q "$i" $TMPFILE
+ status=$?
+ if [ $status -eq 0 ]
+ then
+ COLOR="yellow"
+ MSG="Problems found"
+ fi
+done
+
+#red
+for i in "Recordings with missing files" "Zero byte recordings"
+do
+ grep -q "$i" $TMPFILE
+ status=$?
+ if [ $status -eq 0 ]
+ then
+ COLOR="red"
+ MSG="Problems found"
+ fi
+done
+
+MSG="
+ ${MSG}
+ `cat $TMPFILE` "
+# Tell Hobbit about it
+$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
${MSG}
-
"
-
- exit 0
+exit 0
diff --git a/abs/core/xymon/hobbit_myth_data.py b/abs/core/xymon/hobbit_myth_data.py
index 840c293..1acca67 100644
--- a/abs/core/xymon/hobbit_myth_data.py
+++ b/abs/core/xymon/hobbit_myth_data.py
@@ -34,7 +34,7 @@ def check_mtc():
for i in mtc:
line=i
infile.close()
- if line.strip() == "Finished":
+ if line.split()[0] == "Finished":
return True
else:
return False
diff --git a/abs/core/xymon/xymon.install b/abs/core/xymon/xymon.install
index 8a1d798..067030e 100644
--- a/abs/core/xymon/xymon.install
+++ b/abs/core/xymon/xymon.install
@@ -26,7 +26,7 @@ post_install() {
echo "Adding sudo permissions for http {backup_job}"
echo "Adding sudo permissions for http {sv}"
LINE="nobody ALL = NOPASSWD:/usr/bin/certmaster-ca"
- LINE1="http ALL = NOPASSWD:/usr/MythVantage/bin/backup_job"
+ LINE1="http ALL = NOPASSWD:/usr/LH/bin/lh_system_backup_job"
LINE2="http ALL = NOPASSWD:/sbin/sv"
setfacl -R -m u:nobody:rwx /data/srv/httpd/htdocs
for i in "$LINE" "$LINE1" "$LINE2"