serverwatcher 1.dev9__py3-none-any.whl → 1.dev10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- serverwatcher/actionperformer.py +14 -14
- serverwatcher/app.py +6 -3
- serverwatcher/configclasses/evaluation.py +0 -2
- serverwatcher/configclasses/logging.py +8 -3
- serverwatcher/configclasses/messages.py +11 -19
- serverwatcher/defaultconfigs/config.yaml +0 -11
- serverwatcher/defaultconfigs/evaluation.yaml +1 -3
- serverwatcher/defaultconfigs/logging.yaml +16 -0
- serverwatcher/defaultconfigs/messages.yaml +15 -24
- serverwatcher/evaluator.py +12 -2
- serverwatcher/metricfetcher.py +0 -3
- serverwatcher/router.py +5 -2
- serverwatcher/settings.py +1 -1
- {serverwatcher-1.dev9.dist-info → serverwatcher-1.dev10.dist-info}/METADATA +2 -2
- {serverwatcher-1.dev9.dist-info → serverwatcher-1.dev10.dist-info}/RECORD +19 -18
- {serverwatcher-1.dev9.dist-info → serverwatcher-1.dev10.dist-info}/WHEEL +0 -0
- {serverwatcher-1.dev9.dist-info → serverwatcher-1.dev10.dist-info}/entry_points.txt +0 -0
- {serverwatcher-1.dev9.dist-info → serverwatcher-1.dev10.dist-info}/licenses/LICENSE +0 -0
- {serverwatcher-1.dev9.dist-info → serverwatcher-1.dev10.dist-info}/top_level.txt +0 -0
serverwatcher/actionperformer.py
CHANGED
|
@@ -28,15 +28,15 @@ class ActionPerformer:
|
|
|
28
28
|
return self.scheduleRestart(minutes)
|
|
29
29
|
|
|
30
30
|
if action == 'none':
|
|
31
|
-
self.router.info(
|
|
31
|
+
self.router.info(self.router.messages.no_restart)
|
|
32
32
|
return True
|
|
33
33
|
|
|
34
34
|
raise ValueError('Unknown action: ' + str(action))
|
|
35
35
|
|
|
36
36
|
def restartNow(self):
|
|
37
|
-
self.router.info(
|
|
37
|
+
self.router.info(self.router.messages.immediate_restart)
|
|
38
38
|
self.server.restart()
|
|
39
|
-
self.router.info(
|
|
39
|
+
self.router.info(self.router.messages.restart_action_sent)
|
|
40
40
|
self.notifyWebhook('restartActionSent')
|
|
41
41
|
|
|
42
42
|
time.sleep(self.config.restart_wait_seconds)
|
|
@@ -49,12 +49,12 @@ class ActionPerformer:
|
|
|
49
49
|
timeout=self.config.restart_timeout,
|
|
50
50
|
interval=self.config.restart_online_interval,
|
|
51
51
|
):
|
|
52
|
-
self.router.info(
|
|
53
|
-
self.router.destination(
|
|
52
|
+
self.router.info(self.router.messages.server_back_online)
|
|
53
|
+
self.router.destination(self.router.messages.server_back_online_log)
|
|
54
54
|
self.notifyWebhook('serverBackOnline')
|
|
55
55
|
return True
|
|
56
56
|
|
|
57
|
-
self.router.error(
|
|
57
|
+
self.router.error(self.router.messages.server_failed_restart)
|
|
58
58
|
self.notifyWebhook('serverFailedRestart')
|
|
59
59
|
return False
|
|
60
60
|
|
|
@@ -74,8 +74,8 @@ class ActionPerformer:
|
|
|
74
74
|
target = target + timedelta(minutes=snap_step)
|
|
75
75
|
|
|
76
76
|
time_string = target.strftime('%I:%M %p')
|
|
77
|
-
self.router.info(
|
|
78
|
-
self.router.broadcast(
|
|
77
|
+
self.router.info(self.router.messages.scheduled, time=time_string)
|
|
78
|
+
self.router.broadcast(self.router.messages.broadcast_restart_at, time=time_string)
|
|
79
79
|
self.notifyWebhook('restartScheduled', time=time_string)
|
|
80
80
|
|
|
81
81
|
announced_minutes = set()
|
|
@@ -88,16 +88,16 @@ class ActionPerformer:
|
|
|
88
88
|
remaining_minutes = remaining_seconds // 60
|
|
89
89
|
if remaining_minutes in self.config.snap_minutes and remaining_minutes not in announced_minutes:
|
|
90
90
|
plural = '' if remaining_minutes == 1 else 's'
|
|
91
|
-
message =
|
|
92
|
-
self.router.broadcast(message)
|
|
93
|
-
self.router.origin(message)
|
|
91
|
+
message = self.router.messages.minute_template
|
|
92
|
+
self.router.broadcast(message, n=remaining_minutes, s=plural)
|
|
93
|
+
self.router.origin(message, n=remaining_minutes, s=plural)
|
|
94
94
|
announced_minutes.add(remaining_minutes)
|
|
95
95
|
|
|
96
96
|
if remaining_seconds <= 10 and remaining_seconds > 0 and remaining_seconds not in announced_seconds:
|
|
97
97
|
plural = '' if remaining_seconds == 1 else 's'
|
|
98
|
-
message =
|
|
99
|
-
self.router.broadcast(message)
|
|
100
|
-
self.router.origin(message)
|
|
98
|
+
message = self.router.messages.second_template
|
|
99
|
+
self.router.broadcast(message, n=remaining_seconds, s=plural)
|
|
100
|
+
self.router.origin(message, n=remaining_seconds, s=plural)
|
|
101
101
|
announced_seconds.add(remaining_seconds)
|
|
102
102
|
|
|
103
103
|
time.sleep(1)
|
serverwatcher/app.py
CHANGED
|
@@ -22,7 +22,7 @@ class ServerWatcher:
|
|
|
22
22
|
self.server = None
|
|
23
23
|
self.router = None
|
|
24
24
|
self.fetcher = None
|
|
25
|
-
self.evaluator = Evaluator(settings.evaluation)
|
|
25
|
+
self.evaluator = Evaluator(settings.evaluation, settings.messages)
|
|
26
26
|
self.action = None
|
|
27
27
|
self.webhook = None
|
|
28
28
|
if settings.config.bot_webhook_enabled:
|
|
@@ -96,7 +96,7 @@ class ServerWatcher:
|
|
|
96
96
|
missing = [name for name in ('ram_gib', 'cpu_percent', 'uptime_seconds', 'tps', 'players')
|
|
97
97
|
if metrics[name] is None]
|
|
98
98
|
if missing:
|
|
99
|
-
self.router.error(
|
|
99
|
+
self.router.error(settings.messages.sampling_failure, metrics=', '.join(missing))
|
|
100
100
|
self.notifyWebhook('sampling_fail')
|
|
101
101
|
time.sleep(settings.watcher.watch_interval)
|
|
102
102
|
continue
|
|
@@ -116,7 +116,10 @@ class ServerWatcher:
|
|
|
116
116
|
self.notifyWebhook('unexpectedError', error=str(error))
|
|
117
117
|
raise
|
|
118
118
|
except KeyboardInterrupt:
|
|
119
|
-
|
|
119
|
+
if settings.logging.handle_keyboard_interrupt:
|
|
120
|
+
self.router.info(settings.messages.shutdown)
|
|
121
|
+
else:
|
|
122
|
+
raise
|
|
120
123
|
finally:
|
|
121
124
|
if self.server is not None:
|
|
122
125
|
self.server.closeBridge()
|
|
@@ -17,7 +17,6 @@ class EvaluatorConfig:
|
|
|
17
17
|
threshold_min_uptime: float = 'thresholds.min_uptime'
|
|
18
18
|
|
|
19
19
|
threshold_players: int = 'thresholds.players'
|
|
20
|
-
threshold_max_players: int = 'thresholds.max_players'
|
|
21
20
|
|
|
22
21
|
threshold_tps: float = 'thresholds.tps'
|
|
23
22
|
threshold_tps_1m: float = 'thresholds.tps_1m'
|
|
@@ -38,7 +37,6 @@ class EvaluatorConfig:
|
|
|
38
37
|
weight_uptime: int = 'weights.uptime'
|
|
39
38
|
|
|
40
39
|
weight_players: int = 'weights.players'
|
|
41
|
-
weight_max_players: int = 'weights.max_players'
|
|
42
40
|
|
|
43
41
|
weight_tps: int = 'weights.tps'
|
|
44
42
|
weight_tps_1m: int = 'weights.tps_1m'
|
|
@@ -2,14 +2,19 @@ from mapres import datamap
|
|
|
2
2
|
|
|
3
3
|
@datamap.braces.config(recursive=True)
|
|
4
4
|
class LoggingConfig:
|
|
5
|
-
__user_config_path__ = 'config/
|
|
6
|
-
__default_config_path__ = 'defaultconfigs/
|
|
5
|
+
__user_config_path__ = 'config/logging.yaml'
|
|
6
|
+
__default_config_path__ = 'defaultconfigs/logging.yaml'
|
|
7
7
|
|
|
8
8
|
logger_name: str = 'logger.name'
|
|
9
9
|
log_path: str = 'logger.log_path'
|
|
10
10
|
|
|
11
|
+
info_prefix: str = 'prefixes.info'
|
|
12
|
+
warn_prefix: str = 'prefixes.warn'
|
|
13
|
+
error_prefix: str = 'prefixes.error'
|
|
14
|
+
debug_prefix: str = 'prefixes.debug'
|
|
15
|
+
fatal_prefix: str = 'prefixes.fatal'
|
|
16
|
+
|
|
11
17
|
enable_terminal_clearing: bool = 'terminal.enable_clearing'
|
|
12
18
|
handle_keyboard_interrupt: bool = 'terminal.handle_keyboard_interrupt'
|
|
13
19
|
|
|
14
|
-
debug: bool = 'debug'
|
|
15
20
|
timezone: str = 'timezone'
|
|
@@ -6,38 +6,30 @@ class MessagesConfig:
|
|
|
6
6
|
__default_config_path__ = 'defaultconfigs/messages.yaml'
|
|
7
7
|
|
|
8
8
|
prefix: str = 'prefix'
|
|
9
|
-
bullet: str = 'bullet'
|
|
10
|
-
|
|
11
9
|
broadcast_restart_at: str = 'broadcast_restart_at'
|
|
12
|
-
|
|
13
10
|
minute_template: str = 'broadcast_templates.minutes'
|
|
14
11
|
second_template: str = 'broadcast_templates.seconds'
|
|
15
12
|
|
|
16
13
|
startup: str = 'logging.startup'
|
|
17
|
-
status_check: str = 'logging.status_check'
|
|
18
|
-
validation_fail: str = 'logging.validation_fail'
|
|
19
|
-
validation_ok: str = 'logging.validation_ok'
|
|
20
|
-
sampling_start: str = 'logging.sampling_start'
|
|
21
14
|
shutdown: str = 'logging.shutdown'
|
|
15
|
+
sampling_failure: str = 'logging.sampling_failure'
|
|
16
|
+
scheduled: str = 'logging.scheduled'
|
|
22
17
|
immediate_restart: str = 'logging.immediate_restart'
|
|
23
18
|
no_restart: str = 'logging.no_restart'
|
|
24
|
-
scheduled: str = 'logging.scheduled'
|
|
25
|
-
gap_low: str = 'logging.gap_low'
|
|
26
|
-
gap_high: str = 'logging.gap_high'
|
|
27
19
|
|
|
28
|
-
pro_restart_splash: str = 'reasons.pro_splash'
|
|
29
|
-
anti_restart_splash: str = 'reasons.anti_splash'
|
|
30
|
-
|
|
31
|
-
reason_restart_soon: str = 'reasons.restart_soon'
|
|
32
20
|
reason_ram: str = 'reasons.ram'
|
|
33
21
|
reason_cpu: str = 'reasons.cpu'
|
|
34
22
|
reason_uptime: str = 'reasons.uptime'
|
|
35
|
-
reason_tps: str = 'reasons.tps'
|
|
36
|
-
reason_low_uptime: str = 'reasons.low_uptime'
|
|
37
23
|
reason_players: str = 'reasons.players'
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
24
|
+
reason_tps: str = 'reasons.tps'
|
|
25
|
+
reason_tps_1m: str = 'reasons.tps_1m'
|
|
26
|
+
reason_tps_5m: str = 'reasons.tps_5m'
|
|
27
|
+
reason_tps_15m: str = 'reasons.tps_15m'
|
|
28
|
+
reason_mspt: str = 'reasons.mspt'
|
|
29
|
+
reason_loaded_chunks: str = 'reasons.loaded_chunks'
|
|
30
|
+
reason_loaded_entities: str = 'reasons.loaded_entities'
|
|
31
|
+
reason_gc_pause_ms: str = 'reasons.gc_pause_ms'
|
|
32
|
+
reason_thread_peak: str = 'reasons.thread_peak'
|
|
41
33
|
|
|
42
34
|
restart_action_sent: str = 'restarts.restart_action_sent'
|
|
43
35
|
server_back_online: str = 'restarts.back_online'
|
|
@@ -17,14 +17,3 @@ hungernetbot:
|
|
|
17
17
|
enabled: False
|
|
18
18
|
url: 'https://bot.example.com/webhook'
|
|
19
19
|
token: 'CHANGE_ME'
|
|
20
|
-
|
|
21
|
-
logger:
|
|
22
|
-
name: 'ServerWatcher'
|
|
23
|
-
log_path: '/home/container/logs/'
|
|
24
|
-
|
|
25
|
-
terminal:
|
|
26
|
-
enable_clearing: True
|
|
27
|
-
handle_keyboard_interrupt: True
|
|
28
|
-
|
|
29
|
-
debug: False
|
|
30
|
-
timezone: 'America/Chicago'
|
|
@@ -9,8 +9,7 @@ thresholds:
|
|
|
9
9
|
uptime: 12 # minutes
|
|
10
10
|
min_uptime: 30 # do not restart if uptime < 30 minutes
|
|
11
11
|
|
|
12
|
-
players: 0
|
|
13
|
-
max_players: 0 # usually unused
|
|
12
|
+
players: 0
|
|
14
13
|
|
|
15
14
|
tps: 19.5
|
|
16
15
|
tps_1m: 19.5
|
|
@@ -31,7 +30,6 @@ weights:
|
|
|
31
30
|
uptime: 1
|
|
32
31
|
|
|
33
32
|
players: 1
|
|
34
|
-
max_players: 0
|
|
35
33
|
|
|
36
34
|
tps: 3
|
|
37
35
|
tps_1m: 1
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
logger:
|
|
2
|
+
name: 'ServerWatcher'
|
|
3
|
+
log_path: '/home/container/logs/'
|
|
4
|
+
|
|
5
|
+
prefixes:
|
|
6
|
+
info: '<white>[%hh%:%mm%:%ss%] [INFO]: '
|
|
7
|
+
warn: '<yellow>[%hh%:%mm%:%ss%] [WARN]: '
|
|
8
|
+
error: '<red>[%hh%:%mm%:%ss%] [ERROR]: '
|
|
9
|
+
debug: '<aqua>[%hh%:%mm%:%ss%] [DEBUG]: '
|
|
10
|
+
fatal: '<dark_red>[%hh%:%mm%:%ss%] [FATAL]: '
|
|
11
|
+
|
|
12
|
+
terminal:
|
|
13
|
+
enable_clearing: True
|
|
14
|
+
handle_keyboard_interrupt: True
|
|
15
|
+
|
|
16
|
+
timezone: 'America/Chicago'
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
# %weekday%
|
|
40
40
|
|
|
41
41
|
prefix: '<aqua>[Server Watcher]'
|
|
42
|
-
bullet: '-'
|
|
43
42
|
|
|
44
43
|
broadcast_restart_at: '{{prefix}} The server will restart at {{time}} CDT.'
|
|
45
44
|
|
|
@@ -47,36 +46,28 @@ broadcast_templates:
|
|
|
47
46
|
minutes: '{{prefix}} Restart in {{n}} minute{{s}}!'
|
|
48
47
|
seconds: '{{prefix}} <red>Restarting in {{n}} second{{s}}!'
|
|
49
48
|
|
|
50
|
-
broadcast_minutes: {}
|
|
51
|
-
broadcast_seconds: {}
|
|
52
|
-
|
|
53
49
|
logging:
|
|
54
50
|
startup: 'ServerWatcher is running!'
|
|
55
|
-
status_check: 'Checking server status...'
|
|
56
|
-
validation_fail: 'Validation FAILED.'
|
|
57
|
-
validation_ok: 'All validation checks succeeded.'
|
|
58
|
-
sampling_start: 'Starting sampling process. This should take about {{duration}} seconds...'
|
|
59
51
|
shutdown: 'Shutting down ServerWatcher.'
|
|
52
|
+
sampling_failure: 'Sampling failed - missing metrics: {{metrics}}'
|
|
53
|
+
scheduled: 'Scheduling restart for {{time}}.'
|
|
60
54
|
immediate_restart: 'Restarting immediately.'
|
|
61
55
|
no_restart: 'The server does not need to restart.'
|
|
62
|
-
scheduled: 'Restart needed, but anti-restart factors outweigh it.'
|
|
63
|
-
gap_low: 'Gap {{gap}}. Scheduling restart in 2 hours.'
|
|
64
|
-
gap_high: 'Gap {{gap}}. Scheduling restart in 1 hour.'
|
|
65
56
|
|
|
66
57
|
reasons:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
ram: 'ram: {{value}} exceeded its threshold of {{threshold}} GiB'
|
|
59
|
+
cpu: 'cpu: {{value}} exceeded its threshold of {{threshold}}%'
|
|
60
|
+
uptime: 'uptime: {{value}} fell below its threshold of {{threshold}} minutes'
|
|
61
|
+
players: 'players: {{value}} exceeded its threshold of {{threshold}}'
|
|
62
|
+
tps: 'tps: {{value}} fell below its threshold of {{threshold}}'
|
|
63
|
+
tps_1m: 'tps_1m: {{value}} fell below its threshold of {{threshold}}'
|
|
64
|
+
tps_5m: 'tps_5m: {{value}} fell below its threshold of {{threshold}}'
|
|
65
|
+
tps_15m: 'tps_15m: {{value}} fell below its threshold of {{threshold}}'
|
|
66
|
+
mspt: 'mspt: {{value}} exceeded its threshold of {{threshold}} ms'
|
|
67
|
+
loaded_chunks: 'loaded_chunks: {{value}} exceeded its threshold of {{threshold}}'
|
|
68
|
+
loaded_entities: 'loaded_entities: {{value}} exceeded its threshold of {{threshold}}'
|
|
69
|
+
gc_pause_ms: 'gc_pause_ms: {{value}} exceeded its threshold of {{threshold}} ms'
|
|
70
|
+
thread_peak: 'thread_peak: {{value}} exceeded its threshold of {{threshold}}'
|
|
80
71
|
|
|
81
72
|
restarts:
|
|
82
73
|
restart_action_sent: 'Restart action sent. Waiting...'
|
serverwatcher/evaluator.py
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
from mapres import MapResolver
|
|
2
|
+
|
|
3
|
+
|
|
1
4
|
class Evaluator:
|
|
2
|
-
def __init__(self, config):
|
|
5
|
+
def __init__(self, config, messages):
|
|
3
6
|
self.config = config
|
|
7
|
+
self.messages = messages
|
|
8
|
+
self.resolver = MapResolver()
|
|
9
|
+
self.resolver.layers.add_layer(messages)
|
|
4
10
|
|
|
5
11
|
def evaluate(self, metrics):
|
|
6
12
|
score = 0
|
|
@@ -15,7 +21,11 @@ class Evaluator:
|
|
|
15
21
|
bad = value > threshold if compare == '>' else value < threshold
|
|
16
22
|
if bad:
|
|
17
23
|
score += weight
|
|
18
|
-
|
|
24
|
+
template = getattr(self.messages, f'reason_{name}')
|
|
25
|
+
reasons.append(self.resolver.res(
|
|
26
|
+
template,
|
|
27
|
+
extra_maps={'value': value, 'threshold': threshold},
|
|
28
|
+
))
|
|
19
29
|
|
|
20
30
|
check('ram', metrics['ram_gib'], self.config.threshold_ram, self.config.weight_ram, '>')
|
|
21
31
|
check('cpu', metrics['cpu_percent'], self.config.threshold_cpu, self.config.weight_cpu, '>')
|
serverwatcher/metricfetcher.py
CHANGED
|
@@ -47,10 +47,8 @@ class MetricFetcher:
|
|
|
47
47
|
player_stats = self._get(self.server.bridge.getPlayerStats)
|
|
48
48
|
if player_stats:
|
|
49
49
|
players = player_stats.get('count')
|
|
50
|
-
max_players = player_stats.get('max')
|
|
51
50
|
else:
|
|
52
51
|
players = None
|
|
53
|
-
max_players = None
|
|
54
52
|
|
|
55
53
|
tps_stats = self._get(self.server.bridge.getTPSStats)
|
|
56
54
|
if tps_stats:
|
|
@@ -75,7 +73,6 @@ class MetricFetcher:
|
|
|
75
73
|
'uptime_seconds': uptime_seconds,
|
|
76
74
|
|
|
77
75
|
'players': players,
|
|
78
|
-
'max_players': max_players,
|
|
79
76
|
|
|
80
77
|
'tps': tps,
|
|
81
78
|
'tps_1m': tps_1m,
|
serverwatcher/router.py
CHANGED
|
@@ -33,6 +33,9 @@ class Router:
|
|
|
33
33
|
name=logger_name,
|
|
34
34
|
Servers=servers,
|
|
35
35
|
log_path=self.logging.log_path,
|
|
36
|
+
info_prefix=self.logging.info_prefix,
|
|
37
|
+
warn_prefix=self.logging.warn_prefix,
|
|
38
|
+
error_prefix=self.logging.error_prefix,
|
|
36
39
|
common_maps=common_maps,
|
|
37
40
|
origin_maps=[maps.ascii_colors],
|
|
38
41
|
destination_maps=[maps.ascii_colors],
|
|
@@ -45,13 +48,13 @@ class Router:
|
|
|
45
48
|
|
|
46
49
|
self.router.registerLevel(
|
|
47
50
|
name='debug',
|
|
48
|
-
prefix=
|
|
51
|
+
prefix=self.logging.debug_prefix,
|
|
49
52
|
file_method='debug',
|
|
50
53
|
routes=['origin'],
|
|
51
54
|
)
|
|
52
55
|
self.router.registerLevel(
|
|
53
56
|
name='fatal',
|
|
54
|
-
prefix=
|
|
57
|
+
prefix=self.logging.fatal_prefix,
|
|
55
58
|
file_method='fatal',
|
|
56
59
|
routes=['origin'],
|
|
57
60
|
)
|
serverwatcher/settings.py
CHANGED
|
@@ -16,7 +16,7 @@ class SettingsManager:
|
|
|
16
16
|
self.config_dir.mkdir(parents=True, exist_ok=True)
|
|
17
17
|
self.config = loadConfig(GlobalConfig, runtime_path=str(self.config_dir / 'config.yaml'))
|
|
18
18
|
self.evaluation = loadConfig(EvaluatorConfig, runtime_path=str(self.config_dir / 'evaluation.yaml'))
|
|
19
|
-
self.logging = loadConfig(LoggingConfig, runtime_path=str(self.config_dir / '
|
|
19
|
+
self.logging = loadConfig(LoggingConfig, runtime_path=str(self.config_dir / 'logging.yaml'))
|
|
20
20
|
self.messages = loadConfig(MessagesConfig, runtime_path=str(self.config_dir / 'messages.yaml'))
|
|
21
21
|
self.watcher = loadConfig(WatcherConfig, runtime_path=str(self.config_dir / 'watcher.yaml'))
|
|
22
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: serverwatcher
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.dev10
|
|
4
4
|
Summary: A HungerCore-powered Minecraft server automation engine.
|
|
5
5
|
Author: iFamished
|
|
6
6
|
License: GPL-3.0
|
|
@@ -63,7 +63,7 @@ The egg defaults to the `main` branch and enables startup auto-updates. Set `AUT
|
|
|
63
63
|
|
|
64
64
|
`HUNGERLIB_DEV`, `MAPRES_DEV`, and `C2E_DEV` each upgrade their package to the latest prerelease with `uv` on every startup; C2E is optional and is not required by ServerWatcher itself. Choose the ServerWatcher source branch with `GIT_BRANCH`.
|
|
65
65
|
|
|
66
|
-
The YAML files in `src/serverwatcher/defaultconfigs/` are the
|
|
66
|
+
The YAML files in `src/serverwatcher/defaultconfigs/` are the packaged defaults. MapRes copies each one into `/home/container/config/` on first startup and fills missing keys with defaults without replacing overrides. The runtime files are not committed as duplicate defaults: `config.yaml` contains server/API/webhook settings, `logging.yaml` contains logging and terminal settings, and `evaluation.yaml`, `messages.yaml`, and `watcher.yaml` contain their matching settings. `SERVERWATCHER_CONFIG_DIR` can override this path for non-container installs.
|
|
67
67
|
|
|
68
68
|
## HungerNet Bot Webhook
|
|
69
69
|
Set `hungernetbot.enabled` to `True`, `hungernetbot.url` to the Bot's `/webhook` endpoint, and `hungernetbot.token` to the same secret configured as `BRIDGE_WEBHOOK_TOKEN` in HungerNet Bot. For example:
|
|
@@ -17,26 +17,27 @@ old/configclasses/messages.py,sha256=iOkCvwagngW4aeWD5I6hi6cqqDkzEsFJsLHSuqK-P1s
|
|
|
17
17
|
old/configclasses/watcher.py,sha256=8BakRRuFjUzPu1Ms0ZW0sDRHIKNVkEs8Pp7LpguGTpM,1214
|
|
18
18
|
serverwatcher/__init__.py,sha256=wWcS5N5e-1_MN7NCN93PbMok9G0CdvRn_-dfu4YsGPk,75
|
|
19
19
|
serverwatcher/__main__.py,sha256=0GGlvDUxdGolvIqo82N8a7QeJqTNQX-7M_WeylmPUIw,62
|
|
20
|
-
serverwatcher/actionperformer.py,sha256=
|
|
21
|
-
serverwatcher/app.py,sha256=
|
|
20
|
+
serverwatcher/actionperformer.py,sha256=54Uj99e23s-frisroMY2eGlXq3BwR_wLtnb7_rQ4rUc,4232
|
|
21
|
+
serverwatcher/app.py,sha256=fqd-DQTy1sK1ndU9oJ2529nItrl05xIoCNmTm0fwiNs,4542
|
|
22
22
|
serverwatcher/connection.py,sha256=PUmB1yZuqbXm6J_UDo7GmqQb3107ynURA3Ct-m658d0,2096
|
|
23
|
-
serverwatcher/evaluator.py,sha256=
|
|
24
|
-
serverwatcher/metricfetcher.py,sha256=
|
|
25
|
-
serverwatcher/router.py,sha256=
|
|
26
|
-
serverwatcher/settings.py,sha256=
|
|
23
|
+
serverwatcher/evaluator.py,sha256=K-fKSvYmTDNxAqimTTwsd-N2yLqIKOGU9T7YmJKcwGY,2932
|
|
24
|
+
serverwatcher/metricfetcher.py,sha256=lf5JL1IIWr1OdoIubVydDAbxeFLZpP_YaHAJ7w2nT-M,2789
|
|
25
|
+
serverwatcher/router.py,sha256=rCmC1uBcIrSz8xLvXzGmjBJXX1b7MXszp3LYLCNq-Z0,2215
|
|
26
|
+
serverwatcher/settings.py,sha256=YukaHiXxiC1CtIf_tzxLZSs7lOowAQQGgIWyYFRda3c,1134
|
|
27
27
|
serverwatcher/configclasses/__init__.py,sha256=PLLzlldBbriJlzPvzCQhne9WVoKOu0qCv4QzMqpg0hE,312
|
|
28
28
|
serverwatcher/configclasses/config.py,sha256=Q0ZpVe9wsLOCvkfJ2C5QEssRYC7_Wa6LyGxlcUNVs9Y,740
|
|
29
|
-
serverwatcher/configclasses/evaluation.py,sha256=
|
|
30
|
-
serverwatcher/configclasses/logging.py,sha256=
|
|
31
|
-
serverwatcher/configclasses/messages.py,sha256=
|
|
29
|
+
serverwatcher/configclasses/evaluation.py,sha256=6CkAQFSvL04BfL_E0tUM-aWjQXyZGrR0G_nJKsFMKfQ,1744
|
|
30
|
+
serverwatcher/configclasses/logging.py,sha256=mXFpcSeFqKLup9fy90kk6v2H_sEcfTGrdpPkpSo5NvU,646
|
|
31
|
+
serverwatcher/configclasses/messages.py,sha256=OfKoYXPrNi3PYvQ1n8xsofTUFOQe84p8eafPpCSbViE,1487
|
|
32
32
|
serverwatcher/configclasses/watcher.py,sha256=75T8AlCFOMXtfv4veGQhqnrNc_guKi0-cALKAO6CmeQ,669
|
|
33
|
-
serverwatcher/defaultconfigs/config.yaml,sha256=
|
|
34
|
-
serverwatcher/defaultconfigs/evaluation.yaml,sha256=
|
|
35
|
-
serverwatcher/defaultconfigs/
|
|
33
|
+
serverwatcher/defaultconfigs/config.yaml,sha256=c1ADo7Y0F7MsdQlmYoSdJpIHqcNoK-Mv3IZpkA1Ij_I,355
|
|
34
|
+
serverwatcher/defaultconfigs/evaluation.yaml,sha256=sULgvfsybQumDrWE7bNeRmvWp6kcwkJLOrYDuqXAWPw,661
|
|
35
|
+
serverwatcher/defaultconfigs/logging.yaml,sha256=HXX5MmMY0fp8unO-Z-WZZEO9-eEbklnc8OolnpxbUrs,398
|
|
36
|
+
serverwatcher/defaultconfigs/messages.yaml,sha256=dQJc2FljMOMRL8QerWGsDm4juXOa2Zo_11MbhIK5yH8,3179
|
|
36
37
|
serverwatcher/defaultconfigs/watcher.yaml,sha256=iev4whdLrGBWE9zcmuMrUNnZc89iaxujKjUWqdWKGv0,189
|
|
37
|
-
serverwatcher-1.
|
|
38
|
-
serverwatcher-1.
|
|
39
|
-
serverwatcher-1.
|
|
40
|
-
serverwatcher-1.
|
|
41
|
-
serverwatcher-1.
|
|
42
|
-
serverwatcher-1.
|
|
38
|
+
serverwatcher-1.dev10.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
39
|
+
serverwatcher-1.dev10.dist-info/METADATA,sha256=Ex95HHnseTpxNEA29bxSCqT0phhByeX5-ShLLp80EVo,4644
|
|
40
|
+
serverwatcher-1.dev10.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
41
|
+
serverwatcher-1.dev10.dist-info/entry_points.txt,sha256=5d464Lg4-6S6_1bS71BnHAXds6Yyw6vMrrkUMlB7LDQ,57
|
|
42
|
+
serverwatcher-1.dev10.dist-info/top_level.txt,sha256=BSOmfMtsjx7XwYL55cWMZb7rp48ow5Jry9qmMncah8U,18
|
|
43
|
+
serverwatcher-1.dev10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|