@@ -74,10 +74,9 @@ def render_GET(self, request):
74
74
Returns 503 otherwise. The response will contain the components that were considered for the healthcheck
75
75
and the reason why they were unhealthy.
76
76
77
- We currently perform 3 checks in the sync mechanism for the healthcheck:
77
+ We currently perform 2 checks in the sync mechanism for the healthcheck:
78
78
1. Whether the fullnode has recent block activity, i.e. if the fullnode has blocks with recent timestamps.
79
79
2. Whether the fullnode has at least one synced peer
80
- 3. Whether the other fullnodes in the network have a best block that is at most 10 blocks ahead of the fullnode's best block.
81
80
''' ,
82
81
'responses' : {
83
82
'200' : {
@@ -90,14 +89,16 @@ def render_GET(self, request):
90
89
'value' : {
91
90
'status' : 'pass' ,
92
91
'description' : 'Hathor-core v0.56.0' ,
93
- 'components' : [
94
- {
95
- 'componentName' : 'sync' ,
96
- 'componentType' : 'internal' ,
97
- 'status' : 'pass' ,
98
- 'output' : 'Healthy'
99
- }
100
- ]
92
+ 'checks' : {
93
+ 'sync' : [
94
+ {
95
+ 'componentName' : 'sync' ,
96
+ 'componentType' : 'internal' ,
97
+ 'status' : 'pass' ,
98
+ 'output' : 'Healthy'
99
+ }
100
+ ]
101
+ }
101
102
}
102
103
}
103
104
}
@@ -114,44 +115,50 @@ def render_GET(self, request):
114
115
'value' : {
115
116
'status' : 'fail' ,
116
117
'description' : 'Hathor-core v0.56.0' ,
117
- 'components' : [
118
- {
119
- 'componentName' : 'sync' ,
120
- 'componentType' : 'internal' ,
121
- 'status' : 'fail' ,
122
- 'output' : 'Node doesn\' t have recent blocks'
123
- }
124
- ]
118
+ 'checks' : {
119
+ 'sync' : [
120
+ {
121
+ 'componentName' : 'sync' ,
122
+ 'componentType' : 'internal' ,
123
+ 'status' : 'fail' ,
124
+ 'output' : 'Node doesn\' t have recent blocks'
125
+ }
126
+ ]
127
+ }
125
128
}
126
129
},
127
130
'no_synced_peer' : {
128
131
'summary' : 'Node with no synced peer' ,
129
132
'value' : {
130
133
'status' : 'fail' ,
131
134
'description' : 'Hathor-core v0.56.0' ,
132
- 'components' : [
133
- {
134
- 'componentName' : 'sync' ,
135
- 'componentType' : 'internal' ,
136
- 'status' : 'fail' ,
137
- 'output' : 'Node doesn\' t have a synced peer'
138
- }
139
- ]
135
+ 'checks' : {
136
+ 'sync' : [
137
+ {
138
+ 'componentName' : 'sync' ,
139
+ 'componentType' : 'internal' ,
140
+ 'status' : 'fail' ,
141
+ 'output' : 'Node doesn\' t have a synced peer'
142
+ }
143
+ ]
144
+ }
140
145
}
141
146
},
142
147
'peer_best_block_far_ahead' : {
143
148
'summary' : 'Peer with best block too far ahead' ,
144
149
'value' : {
145
150
'status' : 'fail' ,
146
151
'description' : 'Hathor-core v0.56.0' ,
147
- 'components' : [
148
- {
149
- 'componentName' : 'sync' ,
150
- 'componentType' : 'internal' ,
151
- 'status' : 'fail' ,
152
- 'output' : 'Node\' s peer with highest height is too far ahead.'
153
- }
154
- ]
152
+ 'checks' : {
153
+ 'sync' : [
154
+ {
155
+ 'componentName' : 'sync' ,
156
+ 'componentType' : 'internal' ,
157
+ 'status' : 'fail' ,
158
+ 'output' : 'Node\' s peer with highest height is too far ahead.'
159
+ }
160
+ ]
161
+ }
155
162
}
156
163
}
157
164
}
0 commit comments