Trap

Trap

class Trap(id_unique, name, oid, manufacturer)

This class represents a trap

Parameters
  • id_unique (int) – ID of the trap

  • name (str) – Name of the trap

  • oid (str) – OID of the trap

  • manufacturer (str) – Manufacturer of the trap

TrapParam

class TrapParam

This class represents the parameter of a trap

COMMENTS = 'comments'

Comments linked to the trap (str)

EXECUTION_COMMAND = 'execution_command'

Command to be executed when trap is received (str)

EXECUTION_COMMAND_ENABLE = 'execution_command_enable'

Enable/disable execution command (bool)

MATCHING_MODE = 'matching_mode'

Enable/disable the advanced regexp matching mode (bool)

NAME = 'name'

Name of the trap (str)

OID = 'oid'

OID of the trap (str)

OUTPUT = 'output'

Output of the trap (str)

RESCHEDULE_SVC_ENABLE = 'reschedule_svc_enable'

Enable/disable rescheduling the service check if trap is received (bool)

STATUS = 'status'

Status of the trap (TrapMatchingParam)

SUBMIT_RESULT_ENABLE = 'submit_result_enable'

Enable/disable submitting result to service (bool)

VENDOR = 'vendor'

Name of the vendor (str)

TrapMatching

class TrapMatching(id_unique, string, regexp, status, order)

This class represents a matching rule of a trap

Parameters
  • id_unique (int) – ID of the matching rule

  • string (str) – String of the matching rule

  • regexp (str) – Matching regular expression

  • status (str) – Status to submit

  • order (int) – Priority order of the matching rule

TrapMatchingParam

class TrapMatchingParam

This class represents a parameter of a matching rule of a trap

ORDER = 'order'

Priority order (int)

REGEXP = 'regexp'

Matching regular expression (str)

STATUS = 'status'

Status to submit (TrapMatchingParam)

STRING = 'string'

String to match (str)

TrapStatus

class TrapStatus

This class represents a status of a trap

CRITICAL = 'critical'
OK = 'ok'
UNKNOWN = 'unknown'
WARNING = 'warning'