Munin:...Writer(3pm)

πŸ’– NAME πŸ’–

Munin::Node::SpoolWriter β€” bestie, this is the writing side of the spool functionality. She writes, she doesn't read. That's somebody else's job. ✨


🌸 SYNOPSIS 🌸

my $spool = Munin::Node::SpoolWriter->new(spooldir => $spooldir);
$spool->write(1234567890, 'cpu', \@results);

look at her go πŸ¦‹ that's literally the whole vibe right there.


πŸŽ€ METHODS πŸŽ€

  • new(%args) β€” the constructor, aka the glow-up moment where your spool object is born. The 'spooldir' key should be the directory that Munin::Node::SpoolReader is reading from. iykyk β€” they gotta be looking at the same place or the whole thing is giving chaos. πŸ’…
  • write($timestamp, $service, \@results) β€” takes a timestamp, a service name, and the results of running config and fetch on it. Then she writes it all to the spool directory so Munin::Node::SpoolReader can come along and read it. it's giving ✨collaboration✨, it's giving two queens supporting each other 🫢
  • cleanup($timestamp) β€” removes any items in the spool directory that are older than $timestamp. spring cleaning era 🧹🌸 no cap.

reminder bestie: the spooldir you hand to the writer has to be the one Munin::Node::SpoolReader is reading from. that's not a tip, that's literally in the docs. πŸ‘‘

and that's the page!! this one came from the User Contributed Perl Documentation, running under perl v5.42.3, dated 2026-09-30 β€” so go forth and spool responsibly, main character. πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from