Class: Mihari::Emitters::TheHive
- Inherits:
-
Base
- Object
- Base
- Mihari::Emitters::TheHive
show all
- Defined in:
- lib/mihari/emitters/the_hive.rb
Instance Method Summary
collapse
Methods inherited from Base
inherited, #run
Methods included from Retriable
#retry_on_error
#configuration_status, #configured?
Instance Method Details
#emit(title:, description:, artifacts:, tags: []) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/mihari/emitters/the_hive.rb', line 11
def emit(title:, description:, artifacts:, tags: [])
return if artifacts.empty?
the_hive.alert.create(
title: title,
description: description,
artifacts: artifacts.map(&:to_h),
tags: tags
)
save_as_cache artifacts.map(&:data)
end
|
#valid? ⇒ true, false
7
8
9
|
# File 'lib/mihari/emitters/the_hive.rb', line 7
def valid?
the_hive.valid?
end
|