-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Log message normalisation tool producing structured JSON messages -- -- Log message normalisation tool producing structured JSON messages @package hnormalise @version 0.3.2.0 module HNormalise.Torque.Internal data TorqueJobShortNode TorqueJobShortNode :: !Int -> !(Maybe Int) -> TorqueJobShortNode [$sel:number:TorqueJobShortNode] :: TorqueJobShortNode -> !Int [$sel:ppn:TorqueJobShortNode] :: TorqueJobShortNode -> !(Maybe Int) data TorqueJobFQNode TorqueJobFQNode :: !Text -> !Int -> TorqueJobFQNode [$sel:name:TorqueJobFQNode] :: TorqueJobFQNode -> !Text [$sel:ppn:TorqueJobFQNode] :: TorqueJobFQNode -> !Int data TorqueExecHost TorqueExecHost :: !Text -> !Int -> !Int -> TorqueExecHost [$sel:name:TorqueExecHost] :: TorqueExecHost -> !Text [$sel:lowerCore:TorqueExecHost] :: TorqueExecHost -> !Int [$sel:upperCore:TorqueExecHost] :: TorqueExecHost -> !Int data TorqueWalltime TorqueWalltime :: !Int -> !Int -> !Int -> !Int -> TorqueWalltime [$sel:days:TorqueWalltime] :: TorqueWalltime -> !Int [$sel:hours:TorqueWalltime] :: TorqueWalltime -> !Int [$sel:minutes:TorqueWalltime] :: TorqueWalltime -> !Int [$sel:seconds:TorqueWalltime] :: TorqueWalltime -> !Int data TorqueResourceRequest TorqueResourceRequest :: !(Maybe Integer) -> !(Maybe Text) -> !(Maybe Text) -> !(Maybe Int) -> !(Either TorqueJobShortNode [TorqueJobFQNode]) -> !(Maybe Int) -> !Int -> !(Either TorqueJobShortNode [TorqueJobFQNode]) -> !(Maybe Text) -> !(Maybe Text) -> !(Maybe Integer) -> !(Maybe Integer) -> !(Maybe Integer) -> !TorqueWalltime -> TorqueResourceRequest [$sel:mem:TorqueResourceRequest] :: TorqueResourceRequest -> !(Maybe Integer) [$sel:advres:TorqueResourceRequest] :: TorqueResourceRequest -> !(Maybe Text) [$sel:naccesspolicy:TorqueResourceRequest] :: TorqueResourceRequest -> !(Maybe Text) [$sel:ncpus:TorqueResourceRequest] :: TorqueResourceRequest -> !(Maybe Int) [$sel:neednodes:TorqueResourceRequest] :: TorqueResourceRequest -> !(Either TorqueJobShortNode [TorqueJobFQNode]) [$sel:nice:TorqueResourceRequest] :: TorqueResourceRequest -> !(Maybe Int) [$sel:nodeCount:TorqueResourceRequest] :: TorqueResourceRequest -> !Int [$sel:nodes:TorqueResourceRequest] :: TorqueResourceRequest -> !(Either TorqueJobShortNode [TorqueJobFQNode]) [$sel:select:TorqueResourceRequest] :: TorqueResourceRequest -> !(Maybe Text) [$sel:qos:TorqueResourceRequest] :: TorqueResourceRequest -> !(Maybe Text) [$sel:pmem:TorqueResourceRequest] :: TorqueResourceRequest -> !(Maybe Integer) [$sel:vmem:TorqueResourceRequest] :: TorqueResourceRequest -> !(Maybe Integer) [$sel:pvmem:TorqueResourceRequest] :: TorqueResourceRequest -> !(Maybe Integer) [$sel:walltime:TorqueResourceRequest] :: TorqueResourceRequest -> !TorqueWalltime data TorqueResourceUsage TorqueResourceUsage :: !Integer -> !Integer -> !Integer -> !Integer -> !TorqueWalltime -> TorqueResourceUsage [$sel:cputime:TorqueResourceUsage] :: TorqueResourceUsage -> !Integer [$sel:energy:TorqueResourceUsage] :: TorqueResourceUsage -> !Integer [$sel:mem:TorqueResourceUsage] :: TorqueResourceUsage -> !Integer [$sel:vmem:TorqueResourceUsage] :: TorqueResourceUsage -> !Integer [$sel:walltime:TorqueResourceUsage] :: TorqueResourceUsage -> !TorqueWalltime data TorqueJobTime TorqueJobTime :: !Integer -> !Integer -> !Integer -> !Integer -> !Integer -> TorqueJobTime [$sel:ctime:TorqueJobTime] :: TorqueJobTime -> !Integer [$sel:qtime:TorqueJobTime] :: TorqueJobTime -> !Integer [$sel:etime:TorqueJobTime] :: TorqueJobTime -> !Integer [$sel:startTime:TorqueJobTime] :: TorqueJobTime -> !Integer [$sel:endTime:TorqueJobTime] :: TorqueJobTime -> !Integer data TorqueJobExit TorqueJobExit :: !TorqueJobName -> !Text -> !Text -> !Text -> !Text -> !(Maybe Int) -> !Text -> !Integer -> !TorqueJobTime -> !TorqueResourceRequest -> !TorqueResourceUsage -> !Int -> !Int -> !Int -> TorqueJobExit [$sel:name:TorqueJobExit] :: TorqueJobExit -> !TorqueJobName [$sel:user:TorqueJobExit] :: TorqueJobExit -> !Text [$sel:group:TorqueJobExit] :: TorqueJobExit -> !Text [$sel:jobname:TorqueJobExit] :: TorqueJobExit -> !Text [$sel:queue:TorqueJobExit] :: TorqueJobExit -> !Text [$sel:startCount:TorqueJobExit] :: TorqueJobExit -> !(Maybe Int) [$sel:owner:TorqueJobExit] :: TorqueJobExit -> !Text [$sel:session:TorqueJobExit] :: TorqueJobExit -> !Integer [$sel:times:TorqueJobExit] :: TorqueJobExit -> !TorqueJobTime [$sel:resourceRequest:TorqueJobExit] :: TorqueJobExit -> !TorqueResourceRequest [$sel:resourceUsage:TorqueJobExit] :: TorqueJobExit -> !TorqueResourceUsage [$sel:totalExecutionSlots:TorqueJobExit] :: TorqueJobExit -> !Int [$sel:uniqueNodeCount:TorqueJobExit] :: TorqueJobExit -> !Int [$sel:exitStatus:TorqueJobExit] :: TorqueJobExit -> !Int data TorqueJobName TorqueJobName :: !Integer -> !(Maybe Integer) -> !Text -> !Text -> TorqueJobName [$sel:number:TorqueJobName] :: TorqueJobName -> !Integer [$sel:array_id:TorqueJobName] :: TorqueJobName -> !(Maybe Integer) [$sel:master:TorqueJobName] :: TorqueJobName -> !Text [$sel:cluster:TorqueJobName] :: TorqueJobName -> !Text instance GHC.Generics.Generic HNormalise.Torque.Internal.TorqueJobExit instance GHC.Classes.Eq HNormalise.Torque.Internal.TorqueJobExit instance GHC.Show.Show HNormalise.Torque.Internal.TorqueJobExit instance GHC.Generics.Generic HNormalise.Torque.Internal.TorqueJobName instance GHC.Classes.Eq HNormalise.Torque.Internal.TorqueJobName instance GHC.Show.Show HNormalise.Torque.Internal.TorqueJobName instance GHC.Generics.Generic HNormalise.Torque.Internal.TorqueJobTime instance GHC.Classes.Eq HNormalise.Torque.Internal.TorqueJobTime instance GHC.Show.Show HNormalise.Torque.Internal.TorqueJobTime instance GHC.Generics.Generic HNormalise.Torque.Internal.TorqueResourceUsage instance GHC.Classes.Eq HNormalise.Torque.Internal.TorqueResourceUsage instance GHC.Show.Show HNormalise.Torque.Internal.TorqueResourceUsage instance GHC.Generics.Generic HNormalise.Torque.Internal.TorqueResourceRequest instance GHC.Classes.Eq HNormalise.Torque.Internal.TorqueResourceRequest instance GHC.Show.Show HNormalise.Torque.Internal.TorqueResourceRequest instance GHC.Generics.Generic HNormalise.Torque.Internal.TorqueWalltime instance GHC.Classes.Eq HNormalise.Torque.Internal.TorqueWalltime instance GHC.Show.Show HNormalise.Torque.Internal.TorqueWalltime instance GHC.Generics.Generic HNormalise.Torque.Internal.TorqueExecHost instance GHC.Classes.Eq HNormalise.Torque.Internal.TorqueExecHost instance GHC.Show.Show HNormalise.Torque.Internal.TorqueExecHost instance GHC.Generics.Generic HNormalise.Torque.Internal.TorqueJobFQNode instance GHC.Classes.Eq HNormalise.Torque.Internal.TorqueJobFQNode instance GHC.Show.Show HNormalise.Torque.Internal.TorqueJobFQNode instance GHC.Generics.Generic HNormalise.Torque.Internal.TorqueJobShortNode instance GHC.Classes.Eq HNormalise.Torque.Internal.TorqueJobShortNode instance GHC.Show.Show HNormalise.Torque.Internal.TorqueJobShortNode module HNormalise.Torque.Json instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Torque.Internal.TorqueJobShortNode instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Torque.Internal.TorqueJobFQNode instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Torque.Internal.TorqueExecHost instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Torque.Internal.TorqueWalltime instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Torque.Internal.TorqueResourceRequest instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Torque.Internal.TorqueResourceUsage instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Torque.Internal.TorqueJobTime instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Torque.Internal.TorqueJobExit instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Torque.Internal.TorqueJobName module HNormalise.Lmod.Internal data LmodModule LmodModule :: !Text -> !Text -> LmodModule [$sel:name:LmodModule] :: LmodModule -> !Text [$sel:version:LmodModule] :: LmodModule -> !Text data LmodInfo LmodInfo :: !Text -> !Text -> !Text -> LmodInfo [$sel:username:LmodInfo] :: LmodInfo -> !Text [$sel:cluster:LmodInfo] :: LmodInfo -> !Text [$sel:jobid:LmodInfo] :: LmodInfo -> !Text data LmodLoad LmodLoad :: !LmodInfo -> !Bool -> !LmodModule -> !Text -> LmodLoad [$sel:info:LmodLoad] :: LmodLoad -> !LmodInfo [$sel:userload:LmodLoad] :: LmodLoad -> !Bool [$sel:modul:LmodLoad] :: LmodLoad -> !LmodModule [$sel:filename:LmodLoad] :: LmodLoad -> !Text instance GHC.Generics.Generic HNormalise.Lmod.Internal.LmodLoad instance GHC.Classes.Eq HNormalise.Lmod.Internal.LmodLoad instance GHC.Show.Show HNormalise.Lmod.Internal.LmodLoad instance GHC.Generics.Generic HNormalise.Lmod.Internal.LmodInfo instance GHC.Classes.Eq HNormalise.Lmod.Internal.LmodInfo instance GHC.Show.Show HNormalise.Lmod.Internal.LmodInfo instance GHC.Generics.Generic HNormalise.Lmod.Internal.LmodModule instance GHC.Classes.Eq HNormalise.Lmod.Internal.LmodModule instance GHC.Show.Show HNormalise.Lmod.Internal.LmodModule module HNormalise.Lmod.Json instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Lmod.Internal.LmodInfo instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Lmod.Internal.LmodLoad instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Lmod.Internal.LmodModule module HNormalise.Huppel.Internal data Huppel Huppel :: Int -> Huppel [$sel:id:Huppel] :: Huppel -> Int instance GHC.Generics.Generic HNormalise.Huppel.Internal.Huppel instance GHC.Show.Show HNormalise.Huppel.Internal.Huppel instance GHC.Classes.Eq HNormalise.Huppel.Internal.Huppel module HNormalise.Huppel.Json instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Huppel.Internal.Huppel module HNormalise.Config data Config Config :: !(Maybe Int) -> !(Maybe Text) -> !(Maybe Int) -> !(Maybe Text) -> !(Maybe Int) -> !(Maybe Text) -> Config -- | port for incoming messages [listenPort] :: Config -> !(Maybe Int) -- | binding to this host specification (TODO: needs support for -- HostPreference) [listenHost] :: Config -> !(Maybe Text) -- | port to send rsyslog with successfully parsed and normalised msg part [successPort] :: Config -> !(Maybe Int) -- | host to send normalised data to [successHost] :: Config -> !(Maybe Text) -- | port to send rsyslog messges that failed to parse [failPort] :: Config -> !(Maybe Int) -- | host to send original data to when parsing failed [failHost] :: Config -> !(Maybe Text) loadConfig :: Maybe FilePath -> IO Config instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Config.Config instance Data.Aeson.Types.FromJSON.FromJSON HNormalise.Config.Config instance GHC.Show.Show HNormalise.Config.Config instance GHC.Base.Monoid HNormalise.Config.Config module HNormalise.Common.Internal data Host Hostname :: Text -> Host IPv4 :: IPv4 -> Host IPv6 :: IPv6 -> Host instance GHC.Classes.Eq HNormalise.Common.Internal.Host instance GHC.Show.Show HNormalise.Common.Internal.Host module HNormalise.Common.Json instance Data.Aeson.Types.ToJSON.ToJSON Net.Types.IPv6 instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Common.Internal.Host module HNormalise.Common.Parser hostnameParser :: Parser Text hostnameOrIPParser :: Parser Host keyParser :: Text -> Parser Text Char kvParser :: Parser (Text, Text) kvTextParser :: Text -> Parser Text kvTextDelimParser :: Text -> String -> Parser Text kvNumParser :: Integral a => Text -> Parser a kvYesNoParser :: Text -> Parser Bool kvHostOrIPParser :: Text -> Parser Host maybeOption :: Parser a -> Parser (Maybe a) module HNormalise.Huppel.Parser parseHuppel :: Parser Huppel module HNormalise.Lmod.Parser parseLmodInfo :: Parser LmodInfo parseLmodModule :: Parser LmodModule parseLmodLoad :: Parser (Text, LmodLoad) module HNormalise.Torque.Parser parseTorqueWalltime :: Parser TorqueWalltime parseTorqueDays :: Parser Text TorqueWalltime parseTorqueHours :: Parser Text TorqueWalltime parseTorqueMinutes :: Parser Text TorqueWalltime parseTorqueSeconds :: Parser Text TorqueWalltime parseTorqueMemory :: Parser Integer parseTorqueJobName :: Parser TorqueJobName parseTorqueResourceNodeList :: Parser (Either TorqueJobShortNode [TorqueJobFQNode]) parseTorqueResourceRequest :: Parser TorqueResourceRequest parseTorqueResourceUsage :: Parser TorqueResourceUsage parseTorqueHostList :: Parser [TorqueExecHost] parseTorqueExit :: Parser (Text, TorqueJobExit) module HNormalise.Shorewall.Internal data ShorewallProtocol TCP :: ShorewallProtocol UDP :: ShorewallProtocol ICMP :: ShorewallProtocol data Shorewall Shorewall :: !Text -> !Text -> !Text -> !(Maybe Text) -> !(Maybe Text) -> !Host -> !Host -> !ShorewallProtocol -> !(Maybe Integer) -> !(Maybe Integer) -> Shorewall [$sel:fwrule:Shorewall] :: Shorewall -> !Text [$sel:fwtarget:Shorewall] :: Shorewall -> !Text [$sel:fwin:Shorewall] :: Shorewall -> !Text [$sel:fwout:Shorewall] :: Shorewall -> !(Maybe Text) [$sel:fwmac:Shorewall] :: Shorewall -> !(Maybe Text) [$sel:fwsrc:Shorewall] :: Shorewall -> !Host [$sel:fwdst:Shorewall] :: Shorewall -> !Host [$sel:fwproto:Shorewall] :: Shorewall -> !ShorewallProtocol [$sel:fwspt:Shorewall] :: Shorewall -> !(Maybe Integer) [$sel:fwdpt:Shorewall] :: Shorewall -> !(Maybe Integer) instance GHC.Generics.Generic HNormalise.Shorewall.Internal.Shorewall instance GHC.Classes.Eq HNormalise.Shorewall.Internal.Shorewall instance GHC.Show.Show HNormalise.Shorewall.Internal.Shorewall instance GHC.Generics.Generic HNormalise.Shorewall.Internal.ShorewallProtocol instance GHC.Classes.Eq HNormalise.Shorewall.Internal.ShorewallProtocol instance GHC.Show.Show HNormalise.Shorewall.Internal.ShorewallProtocol module HNormalise.Shorewall.Json instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Shorewall.Internal.ShorewallProtocol instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Shorewall.Internal.Shorewall module HNormalise.Shorewall.Parser parseShorewallTCP :: Parser Shorewall parseShorewallUDP :: Parser Shorewall parseShorewallICMP :: Parser Shorewall parseShorewall :: Parser (Text, Shorewall) module HNormalise.Snoopy.Internal data Snoopy Snoopy :: !Int -> !Int -> !(Maybe Text) -> !Int -> !Text -> !Text -> !Text -> !Text -> Snoopy [$sel:pid:Snoopy] :: Snoopy -> !Int [$sel:uid:Snoopy] :: Snoopy -> !Int [$sel:username:Snoopy] :: Snoopy -> !(Maybe Text) [$sel:sid:Snoopy] :: Snoopy -> !Int [$sel:tty:Snoopy] :: Snoopy -> !Text [$sel:cwd:Snoopy] :: Snoopy -> !Text [$sel:executable:Snoopy] :: Snoopy -> !Text [$sel:command:Snoopy] :: Snoopy -> !Text instance GHC.Generics.Generic HNormalise.Snoopy.Internal.Snoopy instance GHC.Classes.Eq HNormalise.Snoopy.Internal.Snoopy instance GHC.Show.Show HNormalise.Snoopy.Internal.Snoopy module HNormalise.Snoopy.Json instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Snoopy.Internal.Snoopy module HNormalise.Internal data ParseResult -- | Huppel Result for testing purposes, should you want to check -- the pipeline works without pushing in actual data PR_Huppel :: Huppel -> ParseResult -- | Represents a parsed LmodLoad message PR_Lmod :: LmodLoad -> ParseResult -- | Represents a parsed Shorewall message PR_Shorewall :: Shorewall -> ParseResult -- | Represents a parsed Snoopy message PR_Snoopy :: Snoopy -> ParseResult -- | Represents a parsed TorqueJobExit message PR_Torque :: TorqueJobExit -> ParseResult data Rsyslog Rsyslog :: !Text -> !(Maybe ZonedTime) -> !Text -> !Text -> !Text -> !Text -> !Text -> !(Maybe Int) -> !Text -> !Text -> !ZonedTime -> !Text -> !Text -> !Text -> !Text -> Rsyslog [$sel:msg:Rsyslog] :: Rsyslog -> !Text [$sel:timereported:Rsyslog] :: Rsyslog -> !(Maybe ZonedTime) [$sel:hostname:Rsyslog] :: Rsyslog -> !Text [$sel:syslogtag:Rsyslog] :: Rsyslog -> !Text [$sel:inputname:Rsyslog] :: Rsyslog -> !Text [$sel:fromhost:Rsyslog] :: Rsyslog -> !Text [$sel:fromhost_ip:Rsyslog] :: Rsyslog -> !Text [$sel:pri:Rsyslog] :: Rsyslog -> !(Maybe Int) [$sel:syslogfacility:Rsyslog] :: Rsyslog -> !Text [$sel:syslogseverity:Rsyslog] :: Rsyslog -> !Text [$sel:timegenerated:Rsyslog] :: Rsyslog -> !ZonedTime [$sel:programname:Rsyslog] :: Rsyslog -> !Text [$sel:protocol_version:Rsyslog] :: Rsyslog -> !Text [$sel:app_name:Rsyslog] :: Rsyslog -> !Text [$sel:procid:Rsyslog] :: Rsyslog -> !Text data NormalisedRsyslog NRsyslog :: Rsyslog -> ParseResult -> Text -> NormalisedRsyslog -- | The original rsyslog message in a parsed form [$sel:rsyslog:NRsyslog] :: NormalisedRsyslog -> Rsyslog -- | The normalised message [$sel:normalised:NRsyslog] :: NormalisedRsyslog -> ParseResult -- | The key under which the normalised info will appear in the JSON result [$sel:jsonkey:NRsyslog] :: NormalisedRsyslog -> Text instance GHC.Generics.Generic HNormalise.Internal.NormalisedRsyslog instance GHC.Show.Show HNormalise.Internal.NormalisedRsyslog instance GHC.Generics.Generic HNormalise.Internal.Rsyslog instance GHC.Show.Show HNormalise.Internal.Rsyslog instance GHC.Generics.Generic HNormalise.Internal.ParseResult instance GHC.Classes.Eq HNormalise.Internal.ParseResult instance GHC.Show.Show HNormalise.Internal.ParseResult instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Internal.ParseResult module HNormalise.Json instance Data.Aeson.Types.FromJSON.FromJSON HNormalise.Internal.Rsyslog instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Internal.Rsyslog instance Data.Aeson.Types.ToJSON.ToJSON HNormalise.Internal.NormalisedRsyslog module HNormalise.Snoopy.Parser parseSnoopy :: Parser (Text, Snoopy) module HNormalise.Parser rsyslogLogstashTemplate :: [Char] -- | The parseMessage function will try and use each configured -- parser to normalise the input it's given parseMessage :: Parser (Text, ParseResult) -- | The getJsonKey function return the key under which the -- normalised message should appear when JSON is produced getJsonKey :: ParseResult -> Text -- | The parseRsyslogLogstashString currently is a placeholder -- function that will convert the incoming rsyslog message if it is -- encoded as expected in a plain string format %PRI%1 -- %timegenerated:::date-rfc3339% %HOSTNAME% %syslogtag% - %APP-NAME%: -- %msg% parseRsyslogLogstashString :: Parser ByteString module HNormalise -- | The normaliseRsyslog function returns an NRSyslog -- structure tranformed to a ByteString or Nothing when -- parsing fails normaliseRsyslog :: Rsyslog -> Maybe ByteString -- | The normaliseJsonInput function converts a ByteString -- to a normalised message or keeps the original if the conversion -- (parsing) fails. normaliseJsonInput :: ByteString -> Normalised -- | The normaliseText function converts a Text to a -- normalised message or keeps the original (in ByteString) -- format if the conversion fails normaliseText :: Text -> Normalised -- | The parseMessage function will try and use each configured -- parser to normalise the input it's given parseMessage :: Parser (Text, ParseResult) data Normalised -- | A Transformed message contains the JSON normalised -- representation as a ByteString Transformed :: !ByteString -> Normalised -- | An Original messge contains the unaltered incoming message as a -- ByteString Original :: !ByteString -> Normalised