add some unanalyzed fields for better searches
This commit is contained in:
parent
ef62815af6
commit
8f9df8d04d
@ -81,6 +81,7 @@ class Backend:
|
||||
Fetch generic system info that is sent with every piece of monitoring data
|
||||
"""
|
||||
self.sysinfo["hostname"] = sysinfo.hostname()
|
||||
self.sysinfo["hostname.raw"] = self.sysinfo["hostname"]
|
||||
self.sysinfo["ipaddr"] = sysinfo.ipaddr()
|
||||
|
||||
def get_index_name(self):
|
||||
@ -100,6 +101,13 @@ class Backend:
|
||||
"properties": {
|
||||
"ipaddr": {
|
||||
"type": "ip"
|
||||
},
|
||||
"hostname": {
|
||||
"type": "string"
|
||||
},
|
||||
"hostname.raw": {
|
||||
"type" : "string",
|
||||
"index" : "not_analyzed"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ def diskspace(filesystems=[]):
|
||||
|
||||
info = {
|
||||
"fs": fs,
|
||||
"fs.raw": fs,
|
||||
"diskfree": stats.f_bsize * stats.f_bavail,
|
||||
"diskused": (stats.f_blocks-stats.f_bavail) * stats.f_bsize,
|
||||
"disksize": stats.f_bsize * stats.f_blocks
|
||||
@ -36,6 +37,10 @@ mapping = {
|
||||
},
|
||||
"fs": {
|
||||
"type": "string"
|
||||
},
|
||||
"fs.raw": {
|
||||
"type" : "string",
|
||||
"index" : "not_analyzed"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user