-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi_monitoring.yaml
262 lines (262 loc) · 7.42 KB
/
openapi_monitoring.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
openapi: 3.0.3
info:
title: rpistat
description: Monitoring API
contact:
email: info@tecnick.com
license:
name: Internal use only. All rights reserved.
url: https://github.com/tecnickcom/rpistat/blob/main/LICENSE
version: 3.0.0
servers:
- url: https://rpistat:65501/
security:
- {}
tags:
- name: index
description: Service index
- name: ping
description: Ping this service
- name: status
description: Check this service health status
- name: metrics
description: Returns Prometheus metrics
- name: pprof
description: Returns pprof data
- name: stats
description: Returns system usage statistics
paths:
/:
get:
tags:
- index
summary: Provides a summary of the service and available endpoints
responses:
'200':
description: The service is reachable
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/response'
- type: object
properties:
data:
type: object
description: content
properties:
duration:
type: number
description: service uptime in seconds
routes:
type: array
items:
type: object
/ping:
get:
tags:
- ping
summary: Check if the service is reachable
responses:
'200':
description: The service is reachable
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/response'
- type: object
properties:
data:
type: string
description: OK
/status:
get:
tags:
- status
summary: Returns the health status of this service
responses:
'200':
description: The service is healthy
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/response'
- type: object
properties:
data:
type: object
description: content
'503':
description: One or more internal systems are not available
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/response'
- type: object
properties:
data:
type: object
description: content
/metrics:
get:
tags:
- metrics
summary: Returns Prometheus metrics
responses:
'200':
description: Prometheus metrics
/pprof:
get:
tags:
- pprof
summary: Returns pprof profiling data
responses:
'200':
description: pprof profiling data
/ip:
get:
tags:
- status
summary: Returns the public IP address of this service instance
responses:
'200':
description: IP address of this service instance
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/response'
- type: object
properties:
data:
type: string
description: Public IP address
'424':
description: Unable to connect to the ipify service
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/response'
- type: object
properties:
data:
type: string
description: Error
/stats:
get:
tags:
- stats
summary: Returns system usage statistics
responses:
'200':
description: System usage statistics
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/stats'
components:
schemas:
response:
type: object
properties:
program:
type: string
description: program name (i.e. rpistat)
version:
type: string
description: service version number (e.g. "1.2.3")
release:
type: string
description: service release number (e.g. "13")
datetime:
type: string
description: readable date-time (RFC3339)
timestamp:
type: integer
description: timestamp in nanoseconds
status:
type: string
description: http status code description
code:
type: integer
description: http status code
message:
type: string
description: response message
stats:
type: object
properties:
datetime:
type: string
description: >-
DateTime is the human-readable date and time when the response is
sent.
timestamp:
type: integer
description: >-
Timestamp is the machine-readable UTC timestamp in nanoseconds since
EPOCH.
hostname:
type: string
description: Hostname name of the host.
uptime:
type: integer
description: Uptime time since last system boot.
memory_total:
type: integer
description: Total Memory in bytes.
memory_free:
type: integer
description: Total free memory in bytes.
memory_used:
type: integer
description: Total memory used in bytes.
memory_usage:
type: number
description: Total memory used in percentage
load_1m:
type: number
description: Load is the 1 minute load average.
load_5m:
type: number
description: Load is the 5 minute load average.
load_15m:
type: number
description: Load is the 15 minute load average.
temperature_cpu:
type: number
description: CPU Temperature in Celsius Degrees.
disk_total:
type: integer
description: Total Disk size in bytes.
disk_free:
type: integer
description: Total free disk space in bytes.
disk_used:
type: integer
description: Total disk used in bytes.
disk_usage:
type: number
description: Total disk used in percentage
network:
type: array
items:
type: object
description: >-
Network contains an array of network statistics, one entry for
each physical interface.
properties:
nic:
type: string
description: NIC name.
rx:
type: integer
description: Received bytes.
tx:
type: integer
description: Transmitted bytes.