@@ -151,68 +151,3 @@ Use these scopes to request access to API resources.
151
151
includes ``read `` and ``write ``.
152
152
153
153
``delete:alerts `` only required to delete alerts if the `DELETE_SCOPES ` setting is enabled.
154
-
155
- Audit Log
156
- ---------
157
-
158
- An audit trail can be enabled to keep track of changes to Alerta.
159
-
160
- Every audit event will have an audit ``id ``, ``@timestamp ``, ``event ``,
161
- ``category ``, ``message ``, ``user ``, ``resource ``, ``request `` and
162
- ``extra `` elements. The ``extra `` element may include relevant data
163
- depending on the type of event.
164
-
165
- **Example Audit Event **
166
-
167
- .. code :: json
168
-
169
- {
170
- "id" : " c87210da-3cfb-4cbd-b8ec-4fe9ed39aeef" ,
171
- "@timestamp" : " 2018-11-10T21:36:23.946Z" ,
172
- "event" : " apikey-deleted" ,
173
- "category" : " admin" ,
174
- "message" : " " ,
175
- "user" : {
176
- "id" : " satterly" ,
177
- "customers" : [],
178
- "scopes" : [
179
- " admin" ,
180
- " read" ,
181
- " write"
182
- ]
183
- },
184
- "resource" : {
185
- "id" : " dc0b5a62-015b-4ba3-965e-012ca2e4db9b" ,
186
- "type" : " apikey"
187
- },
188
- "request" : {
189
- "endpoint" : " api.delete_key" ,
190
- "method" : " DELETE" ,
191
- "url" : " http://localhost:8080/key/dc0b5a62-015b-4ba3-965e-012ca2e4db9b" ,
192
- "args" : {},
193
- "data" : " " ,
194
- "ipAddress" : " 127.0.0.1"
195
- },
196
- "extra" : {}
197
- }
198
-
199
- Audit events can be logged locally to the standard application log
200
- (which could also help with general debugging) or forwarded to a
201
- HTTP endpoint using a POST.
202
-
203
- **Example Loggly configuration **
204
-
205
- The following example configuration can be used to log all ``admin ``,
206
- ``write `` and ``auth `` requests to the Flask application log file and
207
- forward the events to the Loggly _ "logging-as-a-service" endpoint,
208
- replacing ``TOKEN `` in the Loggly URL with your customer token.
209
-
210
- .. _Loggly : https://www.loggly.com/docs/http-endpoint/
211
-
212
- .. code :: python
213
-
214
- AUDIT_TRAIL = [' admin' , ' write' , ' auth' ]
215
- AUDIT_LOG = True # log to Flask application logger
216
- AUDIT_URL = ' http://logs-01.loggly.com/inputs/TOKEN/tag/http/'
217
-
218
- .. image :: _static/images/loggly-screen-shot-2.png
0 commit comments