summaryrefslogtreecommitdiffstats
path: root/abs/core/xymon/hbnotes.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-12-15 01:28:30 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-12-15 01:28:30 (GMT)
commit5f412bda6e87effcc6836e2d92f1cfbaf7be442d (patch)
treebb5b1dc8f4c1fa690268aaefa6eb67685101499a /abs/core/xymon/hbnotes.py
parent8ced51bcba2796ad5066503d47f84ae921dbd0f3 (diff)
downloadlinhes_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
Diffstat (limited to 'abs/core/xymon/hbnotes.py')
-rw-r--r--abs/core/xymon/hbnotes.py4
1 files changed, 3 insertions, 1 deletions
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])