Small configuration change and a change in misc.random service. (0.21.4)

This commit is contained in:
Johannes Findeisen 2023-02-27 10:58:02 +01:00
commit 3192dcd6f5
2 changed files with 9 additions and 9 deletions

View file

@ -17,13 +17,13 @@ log_level = INFO
; logfile to use
logfile = /home/hanez/code/linspector/linspector/log/linspector.log
; number of logfiles to keep (default: 10)
logfile_count = 25
logfile_count = 1
; logfile format. this overrides the default configured in the code
;logfile_format = [{time:YYYY-MM-DD HH:mm:ss.SSSSSS ZZ}] [{elapsed}] [{level}] [linspector] [{name}:{function}:{line}]: {message}
; log level for file based logging
logfile_level = DEBUG
; size of logfiles (default: 1MB)
logfile_size = 25 MiB
logfile_size = 100 MiB
notifications =
plugins =

View file

@ -33,15 +33,15 @@ class DummyService(Service):
rnd6 = random.randint(0, 99999999999999)
rnd7 = random.randint(0, 99999999999999)
rnd8 = random.randint(0, 99999999999999)
sha512_1 = hashlib.sha512(str((str(rnd1) + str(rnd2) + str(rnd3) + str(rnd4) +
str(rnd5) + str(rnd6) + str(rnd7) + str(rnd8))).
encode('utf-8')).hexdigest()
sha512_2 = hashlib.sha512(str((str(rnd1) + str(rnd2) + str(rnd3) + str(rnd4) +
str(rnd5) + str(rnd6) + str(rnd7) + str(rnd8) + str(sha512_1))).
encode('utf-8')).hexdigest()
sha256 = hashlib.sha256(str((str(rnd1) + str(rnd2) + str(rnd3) + str(rnd4) +
str(rnd5) + str(rnd6) + str(rnd7) + str(rnd8))).
encode('utf-8')).hexdigest()
sha512 = hashlib.sha512(str((str(rnd1) + str(rnd2) + str(rnd3) + str(rnd4) +
str(rnd5) + str(rnd6) + str(rnd7) + str(rnd8) + str(sha256))).
encode('utf-8')).hexdigest()
self.__log.info('identifier=' + identifier +
' host=' + monitor.get_host() +
' service=' + service +
' status=' + ('OK' if status == 0 else 'ERROR') + ' sha512=' +
sha512_2)
sha512)
return True