25 lines
765 B
Django/Jinja
25 lines
765 B
Django/Jinja
{
|
|
"event": "alert.created",
|
|
"alert": {
|
|
"id": {{ alert.id }},
|
|
"type": "{{ alert.type }}",
|
|
"severity": "{{ alert.severity }}",
|
|
"message": "{{ alert.message }}",
|
|
{% if alert.ip_address %}"ip_address": "{{ alert.ip_address }}",{% endif %}
|
|
{% if alert.port %}"port": {{ alert.port }},{% endif %}
|
|
"acknowledged": {{ alert.acknowledged|lower }},
|
|
"created_at": "{{ alert.created_at.isoformat() }}"
|
|
},
|
|
"scan": {
|
|
"id": {{ scan.id }},
|
|
"title": "{{ scan.title }}",
|
|
"timestamp": "{{ scan.timestamp.isoformat() }}",
|
|
"status": "{{ scan.status }}"
|
|
},
|
|
"rule": {
|
|
"id": {{ rule.id }},
|
|
"name": "{{ rule.name }}",
|
|
"type": "{{ rule.type }}",
|
|
"threshold": {{ rule.threshold if rule.threshold else 'null' }}
|
|
}
|
|
} |