cef-0.1.4: CEF log format

Safe HaskellSafe
LanguageHaskell2010

System.Log.CEF

Contents

Description

CEF Log Format

This library implements ArcSight CEF Revision 20 released on 06052013

See: https://protect724.hp.com/servlet/JiveServlet/downloadBody/1072-102-6-4697/CommonEventFormat.pdf

Synopsis

Documentation

data CEFEvent Source

Constructors

CEFEvent 

Fields

deviceVendor :: Text
 
deviceProduct :: Text
 
deviceVersion :: Text
 
signatureId :: Text

Is a unique identifier per event-type.

name :: Text

Is a string representing a human-readable and understandable description of the event.

severity :: Int

Reflects the importance of the event. Must be in range [0..10].

extensions :: Extensions
 

log :: CEFEvent -> Builder Source

>>> :set -XOverloadedStrings
>>> let exampleEvent = CEFEvent "Acme Corp" "Acmetorazor" "2.1" "cool" "MyNameIsCool" 10 (applicationProtocol "PUT")
>>> toLazyByteString $ log exampleEvent
"CEF:0|Acme Corp|Acmetorazor|2.1|cool|MyNameIsCool|10|app=PUT\n"

Extensions

extensionsBuilder :: Extensions -> Builder Source

>>> :set -XOverloadedStrings
>>> toLazyByteString $ extensionsBuilder (applicationProtocol "PUT" <> deviceCustomIPv6Address1 "localnet" "::1")
"app=PUT c6a1Label=localnet c6a1=::1"

customExtension :: Text -> Text -> Extensions Source

See Chapter 4: User-Defined Extensions from the reference

Predefined Extensions

See Chapter 2: ArcSight Extension Dictionary from the reference

Re-exports

(<>) :: Monoid m => m -> m -> m infixr 6

An infix synonym for mappend.

Since: 4.5.0.0