trapsender

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration added in v0.2.0

type Configuration struct {
	SNMPDestination []string
	SNMPRetries     uint
	SNMPVersion     string
	SNMPTimeout     time.Duration

	SNMPCommunity string

	SNMPAuthenticationEnabled  bool
	SNMPAuthenticationProtocol string
	SNMPAuthenticationUsername string
	SNMPAuthenticationPassword string
	SNMPPrivateEnabled         bool
	SNMPPrivateProtocol        string
	SNMPPrivatePassword        string
	SNMPSecurityEngineID       string
	SNMPContextEngineID        string
	SNMPContextName            string
	SNMPSubObjectDefaultOid    string

	DescriptionTemplate template.Template
	ExtraFieldTemplates map[string]template.Template
}

Configuration describes the configuration for sending traps

type TrapSender

type TrapSender struct {
	// contains filtered or unexported fields
}

TrapSender sends traps according to given alerts

func New

func New(configuration Configuration, logger *log.Logger) TrapSender

New creates a new TrapSender

func (TrapSender) SendAlertTraps

func (trapSender TrapSender) SendAlertTraps(alertBucket types.AlertBucket) error

SendAlertTraps sends a bucket of alerts to the given SNMP connection

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL