Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type CustomMapper
- type Flow
- type KKCMetric
- type KTranslate
- func (kc *KTranslate) GetStatus() []byte
- func (kc *KTranslate) HttpInfo(w http.ResponseWriter, r *http.Request)
- func (kc *KTranslate) Init(env svc.Environment) error
- func (kc *KTranslate) Run(ctx context.Context) error
- func (kc *KTranslate) RunHealthCheck(ctx context.Context, result *baseserver.HealthCheckResult)
- func (kc *KTranslate) Start() error
- func (kc *KTranslate) Stop() error
- type UDR
- type UDRMapper
Constants ¶
View Source
const ( CHAN_SLACK = 8000 // Up to this many messages / sec MetricsCheckDuration = 60 * time.Second CacheInvalidateDuration = 8 * time.Hour MDB_NO_LOCK = 0x400000 MDB_PERMS = 0666 )
Setting this decode limit explicitly so that we know what it is. By default at the time of this writing the library would have used 64MiB. Feel free to change if appropriate.
View Source
const ( HttpHealthCheckPath = "/check" HttpAlertInboundPath = "/chf" HttpCompanyID = "sid" HttpAlertKey = "key" MaxProxyListenerBufferAlloc = 10 * 1024 * 1024 // 10MB MSG_KEY_PREFIX = 80 HttpSenderID = "sender_id" APP_PROTOCOL_COL = "app_protocol" UDR_TYPE_INT = "int" UDR_TYPE_BIGINT = "bigint" UDR_TYPE_STRING = "string" UDR_TYPE = "application_type" )
Variables ¶
View Source
var ( DEFAULT_GEO = []byte("--") DEFAULT_GEO_PACKED = patricia.PackGeo(DEFAULT_GEO) )
View Source
var (
RollupsSendDuration = 15 * time.Second
)
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.0.0
type Config struct { Listen string SslCertFile string SslKeyFile string MappingFile string Threads int ThreadsInput int MaxThreads int Format formats.Format FormatRollup formats.Format Compression kt.Compression MaxFlowPerMessage int RollupAndAlpha bool UDRFile string GeoMapping string AsnMapping string DnsResolver string SampleRate uint32 MaxBeforeSample int Auth *auth.AuthConfig SNMPFile string SNMPDisco bool TagMapType maps.Mapper Kentik *kt.KentikConfig VpcSource vpc.CloudSource FlowSource flow.FlowSource SyslogSource string LogTee chan string MetricsChan chan []*kt.JCHF AppMap string HttpInput bool Enricher string }
Config configuration parameters used by activate service
type CustomMapper ¶
func NewCustomMapper ¶
func NewCustomMapper(file string) (*CustomMapper, error)
type KKCMetric ¶
type KKCMetric struct { Flows go_metrics.Meter FlowsOut go_metrics.Meter DroppedFlows go_metrics.Meter Errors go_metrics.Meter AlphaQ go_metrics.Gauge JCHFQ go_metrics.Gauge AlphaQDrop go_metrics.Meter InputQ go_metrics.Meter InputQLen go_metrics.Gauge OutputQLen go_metrics.Gauge SnmpDeviceData *kt.SnmpMetricSet }
type KTranslate ¶
type KTranslate struct {
// contains filtered or unexported fields
}
func NewKTranslate ¶
func NewKTranslate(config *Config, log logger.ContextL, registry go_metrics.Registry, version string, sinks string, serviceName string) (*KTranslate, error)
func (*KTranslate) GetStatus ¶
func (kc *KTranslate) GetStatus() []byte
GetStatus implements the baseserver.Service interface.
func (*KTranslate) HttpInfo ¶
func (kc *KTranslate) HttpInfo(w http.ResponseWriter, r *http.Request)
HttpInfo implements the baseserver.Service interface.
func (*KTranslate) Init ¶
func (kc *KTranslate) Init(env svc.Environment) error
These are needed in case we are running under windows.
func (*KTranslate) RunHealthCheck ¶
func (kc *KTranslate) RunHealthCheck(ctx context.Context, result *baseserver.HealthCheckResult)
RunHealthCheck implements the baseserver.Service interface.
func (*KTranslate) Start ¶
func (kc *KTranslate) Start() error
func (*KTranslate) Stop ¶
func (kc *KTranslate) Stop() error
Click to show internal directories.
Click to hide internal directories.