Renamed column "message" to "log". (0.25.7)
This commit is contained in:
parent
294bb598f7
commit
d5bb4a962d
5 changed files with 9 additions and 9 deletions
|
|
@ -20,7 +20,7 @@ from linspector.environment import Environment
|
||||||
from linspector.linspector import Linspector
|
from linspector.linspector import Linspector
|
||||||
from linspector.monitors import Monitors
|
from linspector.monitors import Monitors
|
||||||
|
|
||||||
__version__ = '0.25.7'
|
__version__ = '0.25.8'
|
||||||
__author__ = 'Johannes Findeisen <you@hanez.org>'
|
__author__ = 'Johannes Findeisen <you@hanez.org>'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ class MySQLDatabase(Database):
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
log.warning('database configuration error: {0}'.format(err))
|
log.warning('database configuration error: {0}'.format(err))
|
||||||
|
|
||||||
def insert(self, host, identifier, json, message, service, status, timestamp):
|
def insert(self, host, identifier, json, log, service, status, timestamp):
|
||||||
try:
|
try:
|
||||||
self._connection = pymysql.connect(cursorclass=pymysql.cursors.DictCursor,
|
self._connection = pymysql.connect(cursorclass=pymysql.cursors.DictCursor,
|
||||||
database=self._database,
|
database=self._database,
|
||||||
|
|
@ -66,7 +66,7 @@ class MySQLDatabase(Database):
|
||||||
'host, ' \
|
'host, ' \
|
||||||
'identifier, ' \
|
'identifier, ' \
|
||||||
'json, ' \
|
'json, ' \
|
||||||
'message, ' \
|
'log, ' \
|
||||||
'service, ' \
|
'service, ' \
|
||||||
'status, ' \
|
'status, ' \
|
||||||
'timestamp ' \
|
'timestamp ' \
|
||||||
|
|
@ -74,7 +74,7 @@ class MySQLDatabase(Database):
|
||||||
str((host if host else 'None')) + '\",\"' + \
|
str((host if host else 'None')) + '\",\"' + \
|
||||||
str((identifier if identifier else 'None')) + '\",\"' + \
|
str((identifier if identifier else 'None')) + '\",\"' + \
|
||||||
str((json if json else 'None')) + '\",\"' + \
|
str((json if json else 'None')) + '\",\"' + \
|
||||||
str((message if message else 'None')) + '\",\"' + \
|
str((log if log else 'None')) + '\",\"' + \
|
||||||
str((service if service else 'None')) + '\",\"' + \
|
str((service if service else 'None')) + '\",\"' + \
|
||||||
str((status if status else 'UNKNOWN')) + '\",\"' + \
|
str((status if status else 'UNKNOWN')) + '\",\"' + \
|
||||||
str(timestamp) + '\")'
|
str(timestamp) + '\")'
|
||||||
|
|
|
||||||
|
|
@ -128,11 +128,11 @@ class Monitor:
|
||||||
self._databases[database].insert(self._result['host'],
|
self._databases[database].insert(self._result['host'],
|
||||||
self._identifier,
|
self._identifier,
|
||||||
self._result,
|
self._result,
|
||||||
self._result['message'],
|
self._result['log'],
|
||||||
self._result['service'],
|
self._result['service'],
|
||||||
self._result['status'],
|
self._result['status'],
|
||||||
int(time.time()))
|
int(time.time()))
|
||||||
self._log.info(self._result['message'])
|
self._log.info(self._result['log'])
|
||||||
|
|
||||||
self._log.debug(self._tasks)
|
self._log.debug(self._tasks)
|
||||||
for task in self._tasks:
|
for task in self._tasks:
|
||||||
|
|
@ -141,7 +141,7 @@ class Monitor:
|
||||||
self._log.debug("identifier: " + self._identifier)
|
self._log.debug("identifier: " + self._identifier)
|
||||||
self._log.debug("service: " + self._service)
|
self._log.debug("service: " + self._service)
|
||||||
self._log.debug("status: " + self._result['status'])
|
self._log.debug("status: " + self._result['status'])
|
||||||
self._log.debug("message: " + self._result['message'])
|
self._log.debug("log: " + self._result['log'])
|
||||||
self._log.debug("json: " + str(self._result))
|
self._log.debug("json: " + str(self._result))
|
||||||
|
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,6 @@ class PortService(Service):
|
||||||
|
|
||||||
return {'error': error,
|
return {'error': error,
|
||||||
'host': monitor.get_host(),
|
'host': monitor.get_host(),
|
||||||
'message': self.get_str(identifier, monitor.get_host(), service, status),
|
'log': self.get_str(identifier, monitor.get_host(), service, status),
|
||||||
'service': service,
|
'service': service,
|
||||||
'status': status}
|
'status': status}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class IsConnectedService(Service):
|
||||||
|
|
||||||
result = {'error': error,
|
result = {'error': error,
|
||||||
'host': monitor.get_host(),
|
'host': monitor.get_host(),
|
||||||
'message': self.get_str(identifier, monitor.get_host(), service, status),
|
'log': self.get_str(identifier, monitor.get_host(), service, status),
|
||||||
'service': service,
|
'service': service,
|
||||||
'status': status}
|
'status': status}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue