diff options
author | James Meyer <james.meyer@operamail.com> | 2012-12-15 01:28:30 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-12-15 01:28:30 (GMT) |
commit | 5f412bda6e87effcc6836e2d92f1cfbaf7be442d (patch) | |
tree | bb5b1dc8f4c1fa690268aaefa6eb67685101499a | |
parent | 8ced51bcba2796ad5066503d47f84ae921dbd0f3 (diff) | |
download | linhes_pkgbuild-5f412bda6e87effcc6836e2d92f1cfbaf7be442d.zip linhes_pkgbuild-5f412bda6e87effcc6836e2d92f1cfbaf7be442d.tar.gz linhes_pkgbuild-5f412bda6e87effcc6836e2d92f1cfbaf7be442d.tar.bz2 |
xymon: hbnotes.py don't create notes files for hosts that are not LinHES hosts/have a missint hostsystemtype
-rwxr-xr-x | abs/core/xymon/PKGBUILD | 4 | ||||
-rw-r--r-- | abs/core/xymon/hbnotes.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/abs/core/xymon/PKGBUILD b/abs/core/xymon/PKGBUILD index e640a73..e902f26 100755 --- a/abs/core/xymon/PKGBUILD +++ b/abs/core/xymon/PKGBUILD @@ -1,7 +1,7 @@ pkgbase=xymon pkgname=(xymonserver xymonclient) pkgver=4.3.5 -pkgrel=41 +pkgrel=42 pkgdesc="Hobbit is a system for monitoring servers and networks. " license="GPL" arch=('i686' 'x86_64') @@ -125,7 +125,7 @@ md5sums=('31923ec126fe1c264fceb459d2175161' '2d88e59ab17114030da514ba3f0a5b64' 'ee608dcafc050d790e28647a670f6b60' 'b2f98ac0df013332deedc1efae0a270d' - 'a652448ebcae3f439c8f23369b69ecf2' + '8ad9dded90acc96e9186ba846a91bbb9' '0f70e76a164f648f0a4a01110137cb20' 'f6921f0413215ae174e81306be80d37f' '80d9cfac86c6d96836e6f406e35e7cf5' diff --git a/abs/core/xymon/hbnotes.py b/abs/core/xymon/hbnotes.py index 158bcd8..8d73dbf 100644 --- a/abs/core/xymon/hbnotes.py +++ b/abs/core/xymon/hbnotes.py @@ -214,10 +214,12 @@ def create_notes(): cursor = db.cursor() cursor.execute("SELECT DISTINCT(hostname) from settings") result = cursor.fetchall() - for row in result: cursor.execute("select value,data from settings where hostname=%s and value in ('HostSystemType','HostHwuuid');",(row)) hostvalues=cursor.fetchall() + #This is here to ignore non LinHES hosts, or those that don't have a HostSystemType + if len(hostvalues) == 0: + continue found_uuid="false" filename="/home/xymon/server/www/notes/" filename+=str(row[0]) |