07 Jan 2022 15:41:12 UTC
- Distribution: Net-Prometheus
- Module version: 0.12
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (3)
- Testers (341 / 5 / 1)
- KwaliteeBus factor: 1
- 89.65% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity24 month
- Download (41.31KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Net::Prometheus::ProcessCollector- obtain a process collector for the OS
use Net::Prometheus::ProcessCollector; my $collector = Net::Prometheus::ProcessCollector->new;
This module-loading package provides a method that attempts to load a process collector appropriate for the host OS it is running on.
The following OS-specific modules are provided with this distribution:
Other OSes may be supported by 3rd-party CPAN modules by following this naming pattern based on the value of the
$^Ovariable on the OS concerned.
$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
newconstructor for the specific class.
If no perl module is found under the appropriate file name,
undefis returned. If any other error occurs while loading or constructing the instance, the exception is thrown as normal.
Typically a process exporter should support the following named arguments:
- prefix => STR
A prefix to prepend on all the exported variable names. If not provided, the default should be
- labels => ARRAY
Additional labels to set on exported variables. If not provided, no extra labels will be set.
$collector = Net::Prometheus::ProcessCollector->for_OS( $os, @args )
Attempts to construct a new process collector for the named OS. Except under especially-exceptional circumstances, you don't want to call this method. Call "new" instead.
Module Install Instructions
To install Net::Prometheus, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Net::Prometheus
For more information on module installation, please visit the detailed CPAN module installation guide.