Class: Auvik::V3

Inherits:
Integration
  • Object
show all
Defined in:
app/models/pager_tree/integrations/auvik/v3.rb

Constant Summary collapse

AUVIK_SEVERITY =
{
  emergency: 1,
  critical: 2,
  warning: 3,
  info: 4
}
OPTIONS =
[]

Instance Method Summary collapse

Instance Method Details

#adapter_actionObject



32
33
34
35
36
37
38
39
# File 'app/models/pager_tree/integrations/auvik/v3.rb', line 32

def adapter_action
  case _alert_status
  when 0 then :create
  when 1 then :resolve
  else
    :other
  end
end

#adapter_incoming_can_defer?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/models/pager_tree/integrations/auvik/v3.rb', line 24

def adapter_incoming_can_defer?
  true
end

#adapter_process_createObject



41
42
43
44
45
46
47
48
49
50
# File 'app/models/pager_tree/integrations/auvik/v3.rb', line 41

def adapter_process_create
  Alert.new(
    title: _title,
    description: _description,
    urgency: _urgency,
    thirdparty_id: adapter_thirdparty_id,
    dedup_keys: [],
    additional_data: _additional_datums
  )
end

#adapter_supports_incoming?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/models/pager_tree/integrations/auvik/v3.rb', line 16

def adapter_supports_incoming?
  true
end

#adapter_supports_outgoing?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/models/pager_tree/integrations/auvik/v3.rb', line 20

def adapter_supports_outgoing?
  false
end

#adapter_thirdparty_idObject



28
29
30
# File 'app/models/pager_tree/integrations/auvik/v3.rb', line 28

def adapter_thirdparty_id
  _correlation_id
end