Net::P...llector(3pm)
π NAME π
Okay bestie, gather round, because Net::Prometheus::ProcessCollector is here and she's literally the vibe. This is the manual page for the Net::P...llector(3pm) docs (yes, the title gets truncated like that, it's giving β¨abbreviatedβ¨), and what she does is hand you a process collector for your OS. Periodt. π«Ά
β¨ SYNOPSIS β¨
use Net::Prometheus::ProcessCollector;
my $collector = Net::Prometheus::ProcessCollector->new;
That's it, that's the whole thing. Two lines and you're living your best life. πΈ
π¦ DESCRIPTION π¦
So this module-loading package provides a method that attempts to load a process collector appropriate for the host OS it is running on. Basically she reads the room (the room being your operating system) and picks the right collector for it. No cap. π
The following OS-specific modules are provided with this distribution:
Net::Prometheus::ProcessCollector::linux
Other OSes may be supported by 3rd-party CPAN modules by following this naming pattern based on the value of the $^O variable on the OS concerned. So like, iykyk β if you're on some other OS, someone out there on CPAN might have your back, and they'll name their module after the value of $^O. π
π₯ MAGIC CONSTRUCTORS π₯
πͺ new
$collector = Net::Prometheus::ProcessCollector->new( %args );
Attempts to construct a new process collector for the OS named by $^O, passing in any extra arguments into the new constructor for the specific class. She's a matchmaker, fr fr. π
If no perl module is found under the appropriate file name, undef is returned. π If any other error occurs while loading or constructing the instance, the exception is thrown as normal β so no silent suffering, she tells on herself. π
Typically a process exporter should support the following named arguments:
prefix => STRβ a prefix to prepend on all the exported variable names. If you don't provide it, the default should beprocess. Little name tag for all your variables. adorable. π·οΈlabels => ARRAYβ extra labels to set on exported variables. If you don't provide it, no extra labels will be set. She's low-maintenance like that. β¨
π§ for_OS
$collector = Net::Prometheus::ProcessCollector->for_OS( $os, @args );
Attempts to construct a new process collector for the named OS. Cute, right? BUT. π
Listen to me bestie: except under especially-exceptional circumstances, you don't want to call this method. Callnewinstead. This is the "why are you in the kitchen at 3am" method.newis the main character. π
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk>
That's the whole page, gorgeous. π«Ά No notes, she ate. And that little footer at the bottom of the real page? It's perl v5.42.3, dated 2026-08-20, and that's the Net::P...llector(3pm) manual, so now you know exactly which version you're reading. Stay slay, go collect some processes. ππβ¨
π¦ where this page comes from
- ubuntu stonking: libnet-prometheus-perl 0.16-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms