OCTO_PARSER(1)

πŸ“¦ version 1.0.6, in ubuntu jammy

🌸 octo_parser β€” the Octopussy Parser program, bestie edition 🌸

okay so real quick, this is octo_parser(1) β€” that's the manpage name, and yeah it lives in the User Contributed Perl Documentation section of your manual, which is very much its natural habitat πŸ’…


✨ SYNOPSIS ✨

octo_parser <device>

πŸ’– DESCRIPTION πŸ’–

octo_parser is the program the Octopussy Project uses to parse Logs for each Device. That's it, that's the whole job description. She parses. Per device. Iconic behaviour, no notes πŸ¦‹


πŸŽ€ FUNCTIONS πŸŽ€

here's the whole roster, don't skip anybody, they all matter πŸ’œ

🫢 Exit()

Softly stops the parser. And when I say softly I mean it β€” the current file gets fully parsed before it exits. It's giving graceful shutdown, main character energy, no abrupt goodbyes 😭

πŸ’« Reload()

Softly reloads the configuration of the parser. Same deal as above: the current file is fully parsed before the reload actually happens. Rude interruptions? Not in this house ✨

πŸ¦‹ Inotify_Watch($path)

Watches $path with inotify. It's literally keeping an eye on that path for you, obsessed πŸ‘‘

🌸 Is_Valid_Regexp($message)

Checks if the regexp from message $message is valid. Vibe check, but for regexps πŸŽ€

⭐ Is_Regexp_Assemble_Working($ra)

Checks if Regexp::Assemble will generate a regexp without failure. Like, will it cook or will it crash? This function finds out πŸ“

πŸ’… Init_Message_Alerts($service, $message, $device_alerts)

Inits Alerts for Message $message in Service $service. Getting those alerts set up and ready 🫢

🌈 Init_Service_Message($s_conf, $m, $dev_alerts, $ra)

Inits Message $m from Service $s_conf->{sid}. Yes, the sid comes out of the $s_conf hashref, we love a dereference moment πŸ’–

πŸ‘‘ Init()

Inits Parser & launch UParser if needed. The opening number, the entrance, the moment everything begins ✨

🧚 Write_Logfile($file, $logs, $compression)

Writes Known Logs $logs into Logfile $file. With $compression in the mix, because we contain multitudes πŸ’œ

πŸŽ€ Write_Unknown_Logfile($file, $logs)

Writes Unknown Logs $logs into Logfile $file. Same energy, different log pile β€” the mysterious ones go here πŸ™ˆ

πŸ¦‹ Incoming_To_Unknown($incoming)

Moves Incoming file to Unknown file. Glow-down, but make it file management πŸ’…

πŸ”₯ Alert_Handler($msg, $line)

Handles Alert(s) for the Message $msg on line $line. Something spicy happened on that line and this function is on it 😭

🌸 Line_Handler($line, $serv, $msg, $known_msgs, $match)

Handles line $line for Service $serv & Message $msg. Plus $known_msgs and $match because the line does not come alone, bestie ✨

⭐ Service_Handler($serv, $y, $m, $d, $hour, $min, $file_new)

Handles Service $serv. Look at all those little timestamp pieces β€” $y, $m, $d, $hour, $min β€” and $file_new tagging along for the ride πŸ“

πŸ’– Cache_MsgID_Stats()

Puts MsgID Statistics in cache. Stats, but make them cached. Efficiency queen πŸ‘‘

🌈 Cache_Taxonomy_Stats($service)

Puts Taxonomy Statistics in cache. Same caching slay, now with $service 🌸

🧚 Stats_Handler()

Handles Statistics for one minute. One minute of stats. That's the assignment πŸ’…

πŸŽ€ File_Handler($file)

Handles file $file. Simple, direct, does exactly what it says on the tin 🫢


πŸ’œ AUTHOR πŸ’œ

Sebastien Thebert <octo.devel@gmail.com> β€” the legend behind all this πŸ’–


🌟 SEE ALSO 🌟

go read these too, they're all part of the family:

  • octo_dispatcher
  • octo_extractor
  • octo_uparser
  • octo_reporter
  • octo_scheduler

okay that's the whole page, and yes I'm aware we're running on perl v5.22.2 and this version is dated 2016-05-04 β€” vintage, honestly, and she still eats πŸ’…βœ¨ bye bestie, go parse something πŸ¦‹πŸ’–

πŸ“¦ where this page comes from