types

package
v0.0.0-...-9caf705 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default = iota // ""
	Debug
	Informational
	Notice
	Warning
	Error
	Critical
	Alert
	Emergency
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertmanagerOutputConfig

type AlertmanagerOutputConfig struct {
	HostPort                 string
	MinimumPriority          string
	CheckCert                bool
	MutualTLS                bool
	Endpoint                 string
	ExpiresAfter             int
	ExtraLabels              map[string]string
	ExtraAnnotations         map[string]string
	CustomSeverityMap        map[PriorityType]string
	DropEventThresholds      string
	DropEventThresholdsList  []ThresholdConfig
	DropEventDefaultPriority string
}

type CliqOutputConfig

type CliqOutputConfig struct {
	WebhookURL            string
	Icon                  string
	OutputFormat          string
	MinimumPriority       string
	MessageFormat         string
	MessageFormatTemplate *template.Template
	UseEmoji              bool
	CheckCert             bool
	MutualTLS             bool
}

CliqOutputConfig represents parameters for Zoho Cliq

type CloudEventsOutputConfig

type CloudEventsOutputConfig struct {
	Address         string
	Extensions      map[string]string
	MinimumPriority string
	CheckCert       bool
	MutualTLS       bool
}

CloudEventsOutputConfig represents parameters for CloudEvents

type Configuration

type Configuration struct {
	Log                bool
	MutualTLSFilesPath string
	MutualTLSClient    MutualTLSClient
	TLSServer          TLSServer
	Debug              bool
	ListenAddress      string
	ListenPort         int
	BracketReplacer    string
	Customfields       map[string]string
	Templatedfields    map[string]string
	Prometheus         prometheusOutputConfig
	Slack              SlackOutputConfig
	Cliq               CliqOutputConfig
	Mattermost         MattermostOutputConfig
	Rocketchat         RocketchatOutputConfig
	Teams              teamsOutputConfig
	Datadog            datadogOutputConfig
	Discord            DiscordOutputConfig
	Alertmanager       AlertmanagerOutputConfig
	Elasticsearch      ElasticsearchOutputConfig
	Influxdb           influxdbOutputConfig
	Loki               LokiOutputConfig
	Nats               natsOutputConfig
	Stan               stanOutputConfig
	AWS                awsOutputConfig
	SMTP               smtpOutputConfig
	Opsgenie           opsgenieOutputConfig
	Statsd             statsdOutputConfig
	Dogstatsd          statsdOutputConfig
	Webhook            WebhookOutputConfig
	CloudEvents        CloudEventsOutputConfig
	Azure              azureConfig
	GCP                GcpOutputConfig
	Googlechat         GooglechatConfig
	Kafka              kafkaConfig
	KafkaRest          KafkaRestConfig
	Pagerduty          PagerdutyConfig
	Kubeless           kubelessConfig
	Openfaas           openfaasConfig
	Tekton             tektonConfig
	WebUI              WebUIOutputConfig
	PolicyReport       PolicyReportConfig
	Rabbitmq           RabbitmqConfig
	Wavefront          WavefrontOutputConfig
	Fission            fissionConfig
	Grafana            GrafanaOutputConfig
	GrafanaOnCall      GrafanaOnCallOutputConfig
	Yandex             YandexOutputConfig
	Syslog             SyslogConfig
	NodeRed            NodeRedOutputConfig
	MQTT               MQTTConfig
	Zincsearch         zincsearchOutputConfig
	Gotify             gotifyOutputConfig
	Spyderbat          SpyderbatConfig
	TimescaleDB        TimescaleDBConfig
	Redis              RedisConfig
	Telegram           TelegramConfig
	N8N                N8NConfig
	OpenObserve        OpenObserveConfig
	Dynatrace          DynatraceOutputConfig
}

Configuration is a struct to store configuration

type DiscordOutputConfig

type DiscordOutputConfig struct {
	WebhookURL      string
	MinimumPriority string
	Icon            string
	CheckCert       bool
	MutualTLS       bool
}

DiscordOutputConfig .

type DynatraceOutputConfig

type DynatraceOutputConfig struct {
	APIToken        string
	APIUrl          string
	MinimumPriority string
	CheckCert       bool
}

type ElasticsearchOutputConfig

type ElasticsearchOutputConfig struct {
	HostPort        string
	Index           string
	Type            string
	MinimumPriority string
	Suffix          string
	Username        string
	Password        string
	CheckCert       bool
	MutualTLS       bool
	CustomHeaders   map[string]string
}

type GcpOutputConfig

type GcpOutputConfig struct {
	Credentials      string
	WorkloadIdentity bool
	PubSub           GcpPubSub
	Storage          gcpStorage
	CloudFunctions   gcpCloudFunctions
	CloudRun         gcpCloudRun
}

type GcpPubSub

type GcpPubSub struct {
	ProjectID        string
	Topic            string
	MinimumPriority  string
	CustomAttributes map[string]string
}

type GooglechatConfig

type GooglechatConfig struct {
	WebhookURL            string
	OutputFormat          string
	MinimumPriority       string
	MessageFormat         string
	MessageFormatTemplate *template.Template
	CheckCert             bool
	MutualTLS             bool
}

GooglechatConfig represents parameters for Google chat

type GrafanaOnCallOutputConfig

type GrafanaOnCallOutputConfig struct {
	WebhookURL      string
	CheckCert       bool
	MutualTLS       bool
	MinimumPriority string
	CustomHeaders   map[string]string
}

GrafanaOnCallOutputConfig represents parameters for Grafana OnCall

type GrafanaOutputConfig

type GrafanaOutputConfig struct {
	HostPort        string
	APIKey          string
	DashboardID     int
	PanelID         int
	AllFieldsAsTags bool
	CheckCert       bool
	MutualTLS       bool
	MinimumPriority string
	CustomHeaders   map[string]string
}

GrafanaOutputConfig represents parameters for Grafana

type KafkaRestConfig

type KafkaRestConfig struct {
	Address         string
	Version         int
	MinimumPriority string
	CheckCert       bool
	MutualTLS       bool
}

type KubearmorPayload

type KubearmorPayload struct {
	Timestamp    int64                  ` json:"Timestamp,omitempty"`
	UpdatedTime  string                 ` json:"UpdatedTime,omitempty"`
	ClusterName  string                 ` json:"ClusterName,omitempty"`
	Hostname     string                 ` json:"HostName,omitempty"`
	EventType    string                 ` json:"EventType,omitempty"`
	OutputFields map[string]interface{} `json:"Detail"`
}

Payload is a struct to map kubearmor event json

func (KubearmorPayload) String

func (f KubearmorPayload) String() string

type LokiOutputConfig

type LokiOutputConfig struct {
	HostPort        string
	User            string
	APIKey          string
	MinimumPriority string
	CheckCert       bool
	MutualTLS       bool
	Tenant          string
	Endpoint        string
	ExtraLabels     string
	ExtraLabelsList []string
	CustomHeaders   map[string]string
}

type MQTTConfig

type MQTTConfig struct {
	Broker          string
	Topic           string
	QOS             int
	Retained        bool
	User            string
	Password        string
	CheckCert       bool
	MinimumPriority string
}

MQTTConfig represents config parameters for the MQTT client

type MattermostOutputConfig

type MattermostOutputConfig struct {
	WebhookURL            string
	Footer                string
	Icon                  string
	Username              string
	OutputFormat          string
	MinimumPriority       string
	MessageFormat         string
	MessageFormatTemplate *template.Template
	CheckCert             bool
	MutualTLS             bool
}

MattermostOutputConfig represents parameters for Mattermost

type MutualTLSClient

type MutualTLSClient struct {
	CertFile   string
	KeyFile    string
	CaCertFile string
}

MutualTLSClient represents parameters for mutual TLS as client

type N8NConfig

type N8NConfig struct {
	Address         string
	User            string
	Password        string
	HeaderAuthName  string
	HeaderAuthValue string
	MinimumPriority string
	CheckCert       bool
}

N8NConfig represents config parameters for N8N

type NodeRedOutputConfig

type NodeRedOutputConfig struct {
	Address         string
	User            string
	Password        string
	CustomHeaders   map[string]string
	MinimumPriority string
	CheckCert       bool
}

NodeRedOutputConfig represents parameters for Node-RED

type OpenObserveConfig

type OpenObserveConfig struct {
	HostPort         string
	OrganizationName string
	StreamName       string
	MinimumPriority  string
	Username         string
	Password         string
	CheckCert        bool
	MutualTLS        bool
	CustomHeaders    map[string]string
}

OpenObserveConfig represents config parameters for OpenObserve

type PagerdutyConfig

type PagerdutyConfig struct {
	RoutingKey      string
	Region          string
	MinimumPriority string
	CheckCert       bool
	MutualTLS       bool
}

type Podowner

type Podowner struct {
	Ref       string ` json:"Ref,omitempty"`
	Name      string ` json:"Name,omitempty"`
	Namespace string ` json:"Namespace,omitempty"`
}

type PolicyReportConfig

type PolicyReportConfig struct {
	Enabled         bool
	PruneByPriority bool
	Kubeconfig      string
	MinimumPriority string
	MaxEvents       int
}

PolicyReportConfig represents parameters for policyreport

type PriorityType

type PriorityType int

func Priority

func Priority(p string) PriorityType

func (PriorityType) MarshalJSON

func (p PriorityType) MarshalJSON() ([]byte, error)

func (PriorityType) String

func (p PriorityType) String() string

func (*PriorityType) UnmarshalJSON

func (p *PriorityType) UnmarshalJSON(b []byte) error

type PromStatistics

type PromStatistics struct {
	Falco   *prometheus.CounterVec
	Inputs  *prometheus.CounterVec
	Outputs *prometheus.CounterVec
}

PromStatistics is a struct to store prometheus metrics

type RabbitmqConfig

type RabbitmqConfig struct {
	URL             string
	Queue           string
	MinimumPriority string
}

RabbitmqConfig represents parameters for rabbitmq

type RedisConfig

type RedisConfig struct {
	Address         string
	Password        string
	Database        int
	StorageType     string
	Key             string
	Version         int
	MinimumPriority string
	CheckCert       bool
	MutualTLS       bool
}

RedisConfig represents config parameters for Redis

type RocketchatOutputConfig

type RocketchatOutputConfig struct {
	WebhookURL            string
	Footer                string
	Icon                  string
	Username              string
	OutputFormat          string
	MinimumPriority       string
	MessageFormat         string
	MessageFormatTemplate *template.Template
	CheckCert             bool
	MutualTLS             bool
}

RocketchatOutputConfig .

type SlackOutputConfig

type SlackOutputConfig struct {
	WebhookURL            string
	Channel               string
	Footer                string
	Icon                  string
	Username              string
	OutputFormat          string
	MinimumPriority       string
	MessageFormat         string
	MessageFormatTemplate *template.Template
	CheckCert             bool
	MutualTLS             bool
}

SlackOutputConfig represents parameters for Slack

type SpyderbatConfig

type SpyderbatConfig struct {
	OrgUID            string
	APIKey            string
	APIUrl            string
	Source            string
	SourceDescription string
	MinimumPriority   string
}

type Statistics

type Statistics struct {
	Requests          *expvar.Map
	FIFO              *expvar.Map
	GRPC              *expvar.Map
	Falco             *expvar.Map
	Slack             *expvar.Map
	Mattermost        *expvar.Map
	Rocketchat        *expvar.Map
	Teams             *expvar.Map
	Datadog           *expvar.Map
	Discord           *expvar.Map
	Alertmanager      *expvar.Map
	Elasticsearch     *expvar.Map
	Loki              *expvar.Map
	Nats              *expvar.Map
	Stan              *expvar.Map
	Influxdb          *expvar.Map
	AWSLambda         *expvar.Map
	AWSSQS            *expvar.Map
	AWSSNS            *expvar.Map
	AWSCloudWatchLogs *expvar.Map
	AWSS3             *expvar.Map
	AWSSecurityLake   *expvar.Map
	AWSKinesis        *expvar.Map
	SMTP              *expvar.Map
	Opsgenie          *expvar.Map
	Statsd            *expvar.Map
	Dogstatsd         *expvar.Map
	Webhook           *expvar.Map
	AzureEventHub     *expvar.Map
	GCPPubSub         *expvar.Map
	GCPStorage        *expvar.Map
	GCPCloudFunctions *expvar.Map
	GCPCloudRun       *expvar.Map
	GoogleChat        *expvar.Map
	Kafka             *expvar.Map
	KafkaRest         *expvar.Map
	Pagerduty         *expvar.Map
	CloudEvents       *expvar.Map
	Kubeless          *expvar.Map
	Openfaas          *expvar.Map
	Tekton            *expvar.Map
	WebUI             *expvar.Map
	Rabbitmq          *expvar.Map
	Wavefront         *expvar.Map
	Fission           *expvar.Map
	Grafana           *expvar.Map
	GrafanaOnCall     *expvar.Map
	YandexS3          *expvar.Map
	YandexDataStreams *expvar.Map
	Syslog            *expvar.Map
	Cliq              *expvar.Map
	PolicyReport      *expvar.Map
	NodeRed           *expvar.Map
	MQTT              *expvar.Map
	Zincsearch        *expvar.Map
	Gotify            *expvar.Map
	Spyderbat         *expvar.Map
	TimescaleDB       *expvar.Map
	Redis             *expvar.Map
	Telegram          *expvar.Map
	N8N               *expvar.Map
	OpenObserve       *expvar.Map
	Dynatrace         *expvar.Map
}

Statistics is a struct to store stastics

type SyslogConfig

type SyslogConfig struct {
	Host            string
	Port            string
	Protocol        string
	Format          string
	MinimumPriority string
}

SyslogConfig represents config parameters for the syslog client Host: the remote syslog host. It can be either an IP address or a domain. Port: the remote port address. Ex: 514. Protocol: the type of transfer protocol to use. It should be either "tcp" or "udp".

type TLSServer

type TLSServer struct {
	Deploy     bool
	CertFile   string
	KeyFile    string
	MutualTLS  bool
	CaCertFile string
	NoTLSPort  int
	NoTLSPaths []string
}

TLSServer represents parameters for TLS Server

type TelegramConfig

type TelegramConfig struct {
	Token           string
	ChatID          string
	MinimumPriority string
	CheckCert       bool
}

TelegramConfig represents parameters for Telegram

type ThresholdConfig

type ThresholdConfig struct {
	Value    int64        `json:"value" yaml:"value"`
	Priority PriorityType `json:"priority" yaml:"priority"`
}

type TimescaleDBConfig

type TimescaleDBConfig struct {
	Host            string
	Port            string
	User            string
	Password        string
	Database        string
	HypertableName  string
	MinimumPriority string
}

type WavefrontOutputConfig

type WavefrontOutputConfig struct {
	EndpointType         string // direct or proxy
	EndpointHost         string // Endpoint hostname (only IP or hostname)
	EndpointToken        string // Token for API access. Only for direct mode
	EndpointMetricPort   int    // Port to send metrics. Only for proxy mode
	MetricName           string // The Name of the metric
	FlushIntervalSeconds int    // Time between flushes.
	BatchSize            int    // BatchSize to send. Only for direct mode
	MinimumPriority      string
}

type WebUIOutputConfig

type WebUIOutputConfig struct {
	URL       string
	CheckCert bool
	MutualTLS bool
}

WebUIOutputConfig represents parameters for WebUI

type WebhookOutputConfig

type WebhookOutputConfig struct {
	Address         string
	Method          string
	CustomHeaders   map[string]string
	MinimumPriority string
	CheckCert       bool
	MutualTLS       bool
}

WebhookOutputConfig represents parameters for Webhook

type YandexDataStreamsConfig

type YandexDataStreamsConfig struct {
	Endpoint        string
	StreamName      string
	MinimumPriority string
}

type YandexOutputConfig

type YandexOutputConfig struct {
	AccessKeyID     string
	SecretAccessKey string
	Region          string
	S3              YandexS3Config
	DataStreams     YandexDataStreamsConfig
}

type YandexS3Config

type YandexS3Config struct {
	Endpoint        string
	Prefix          string
	Bucket          string
	MinimumPriority string
}

Jump to

Keyboard shortcuts

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