OCTO_EX...R_FIELDS(1)

πŸ“¦ version 1.0.6, in ubuntu jammy

πŸ’– octo_extractor_fields β€” the tea β˜•

okay bestie, so this is a page from the User Contributed Perl Documentation for OCTO_EX...R_FIELDS(1), and it's lowkey iconic because it's literally the manual for the program the Octopussy Project uses to pull logs out of stuff β€” but, like, by table fields specifically. ✨


🌸 NAME 🌸

octo_extractor_fields β€” the Octopussy Logs Extractor (by table fields) program. that's her. that's the whole name. 🫢


πŸŽ€ SYNOPSIS πŸŽ€

octo_extractor --device <device> --service <service>
  --table <table> --loglevel <loglevel> --taxonomy <taxonomy>
     --begin YYYYMMDDHHMM --end YYYYMMDDHHMM
  --fields <field1,field2,fieldn>      [ --pid_param <string> ] [ --json <json_outputfile> ]

like yes, that's a lot of flags, but you got this bestie. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

octo_extractor_fields is the program used by the Octopussy Project to extract Logs (by table fields). it does exactly what it says on the tin and it does it well. no cap. πŸ”₯


✨ FUNCTIONS ✨

πŸ’œ String_List($type, $any, $fct, @args)

Returns a List of elements separated by ", " from one function and args. cute little joiner behavior. πŸŽ€

πŸ’œ Help()

Prints Help. that's it. she helps. πŸ‘‘

πŸ’œ Progress($msg, $num, $nb_match)

Sets progress status. so you can watch it cook. πŸ“

πŸ’œ Get_Messages_To_Parse($services, $loglevel, $taxonomy, $table, $fields)

Returns list of Messages to parse. giving "let me find the ones I actually care about" energy. πŸ’…

πŸ’œ Get_TimePeriod_Files($devices, $services, $begin, $end)

Returns list of Files for Devices $devices, Services $services and Period $begin-$end. time-bounded, as she should be. ⏳✨

Prints Logs. the main character moment of the whole page tbh. 🌈

πŸ’œ the correlation bit (unnamed, but ICONIC)

this one has no cute little function name, it's just vibes and code, so here it is, verbatim, exactly as written, do not touch:

 my $correlation_key    = 'id';
 my @correlation_values = ('idpes', 'idcnx', 'cpcnx');
 my %correl             = ();

 # Init correlation table
 foreach my $d (@logs) {
     foreach my $cv (@correlation_values) {
         if (NOT_NULL($d->{$cv}) && ($d->{$cv} ne "N/A") && ($d->{$cv} ne "0")) {
             $correl{$d->{$correlation_key}}{$cv} = $d->{$cv};
         }
     }
 }

 # Use correlation table to fill NULL values
 foreach my $d (@logs) {
     foreach my $cv (@correlation_values) {
         if (NULL($d->{$cv}) || ($d->{$cv} eq 'N/A') || ($d->{$cv} eq '0')) {
             $d->{$cv} = $correl{$d->{$correlation_key}}{$cv};
         }
     }
 }

basically: build a lookup table from the non-null, non-"N/A", non-"0" values, then go back and fill in the null / 'N/A' / '0' ones from it. it's giving glow-up for your data. πŸ’–

πŸ’œ End()

Ends Extraction. bye bestie, extraction over. πŸ‘‹βœ¨


🌟 AUTHOR 🌟

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


πŸ‘€ SEE ALSO πŸ‘€

  • octo_dispatcher
  • octo_extractor
  • octo_parser
  • octo_uparser
  • octo_reporter
  • octo_scheduler

the whole squad fr fr. go read them too, iykyk. 🫢


πŸŽ€ and that's the whole page bestie, no notes. this version was documented with perl v5.22.2 and dated 2016-05-04 β€” yeah she's a little vintage, but vintage is just iconic with extra steps. stay slaying, and remember: extract responsibly. πŸ’…πŸ’–βœ¨
πŸ“¦ where this page comes from