elasticsearch 2.x compatibility, bump version number

This commit is contained in:
Dave Pedu 2016-02-25 22:54:22 -08:00
parent 7bd23394e3
commit ec819b2cad
7 changed files with 16 additions and 8 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ examples/config.test.json
build
dist
pymonitor.egg-info
testenv

View File

@ -96,3 +96,10 @@ Roadmap
* Complete API docs
* More builtin monitors
* Local logging in case ES can't be reached
Changelog
---------
*0.1.0:* renamed fields with names containing dots for elasticsearch 2.0 compatibility
*0.0.1:* initial release!

View File

@ -1 +1 @@
__version__ = "0.0.1"
__version__ = "0.1.0"

View File

@ -82,7 +82,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["hostname_raw"] = self.sysinfo["hostname"]
self.sysinfo["ipaddr"] = sysinfo.ipaddr()
def get_index_name(self):
@ -106,7 +106,7 @@ class Backend:
"hostname": {
"type": "string"
},
"hostname.raw": {
"hostname_raw": {
"type" : "string",
"index" : "not_analyzed"
}

View File

@ -11,7 +11,7 @@ def diskio(disks=[]):
continue
stats = {
"disk": disk,
"disk.raw": disk,
"disk_raw": disk,
"reads_ps": round(stats.read_count/uptime, 2),
"writes_ps":round(stats.write_count/uptime, 2),
"read_ps": round(stats.read_bytes/uptime, 2),
@ -31,7 +31,7 @@ mapping = {
"disk": {
"type": "string"
},
"disk.raw": {
"disk_raw": {
"type": "string",
"index" : "not_analyzed"
},

View File

@ -6,7 +6,7 @@ def diskspace(filesystems=[]):
info = {
"fs": fs,
"fs.raw": 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,
@ -44,7 +44,7 @@ mapping = {
"fs": {
"type": "string"
},
"fs.raw": {
"fs_raw": {
"type" : "string",
"index" : "not_analyzed"
},

View File

@ -1,3 +1,3 @@
elasticsearch==2.1.0
elasticsearch==2.2.0
psutil==3.3.0
PyYAML==3.11