Nagios...::File(3pm)
π Nagios::Config::File π
okay bestie, welcome to Nagios...::File(3pm) β which is actually just Nagios::Config::File, the base class for every Nagios config file out there. she's the momager of the config world, and honestly? iconic. π
β¨ NAME β¨
Nagios::Config::File β the base class for Nagios configuration files. that's it, that's the whole identity. lowkey powerful. π
πΈ SYNOPSIS πΈ
here's the vibe, fr fr:
use Nagios::Config ;
my $nc = new Nagios::Config("/usr/local/nagios/etc/nagios.cfg") ;
my $resource = $nc->get_resource_cfg() ;
print $resource->get_attr('$USER1$') . "\n" ;
likeβ¦ look at her go. she's fetching a resource config and printing out $USER1$. we love a working example. π¦
π DESCRIPTION π
Nagios::Config::File is the base class for all Nagios configuration files. that's the whole family tree. she's the blueprint, the main character energy from which everything else spawns. π
bestie listen. you should NOT need to create these yourself. seriously. put the constructor down. this is a base class, not a DIY project. the subclasses handle it, iykyk. π
π§ CONSTRUCTOR π§
new ([FILE])β creates aNagios::Config::File. that's the whole job description. give her aFILE, get an object. slay. β¨
π METHODS π
get ([NAME], [SPLIT])β returns the value of the attributeNAMEfor the current file. and ifSPLITis true? she returns a list of all the values split on/\s*,\s*/. literally so useful when an attribute can have more than one value β you get the whole squad instead of just one bestie. πfilename()β returns the filename for the current object. yes she knows where she lives. πdump ()β returns a scalar with the full configuration text, ready to parse again. it's giving "save file, reload, we go again". π₯
π AUTHOR π
- Patrick LeBoutillier,
patl@cpan.org - Al Tobey,
tobeya@cpan.org
two legends, one manpage. we stan. π«Ά
β SEE ALSO β
go read these next, bestie, the lore continues:
Nagios::ConfigNagios::Config::Object
perl v5.34.0 Β· 2022-06-16 Β· Nagios...::File(3pm)
and that's the whole page, babes π that was Nagios::Config::File(3pm), documented in perl v5.34.0 and dated 2022-06-16 β go forth and configure responsibly, and remember: don't instantiate the base class. periodt. π
β¨π
π¦ where this page comes from
- debian bookworm: libnagios-object-perl 0.21.20-3 Β· GPL-2.0-or-later
- debian trixie: libnagios-object-perl 0.21.20-3 Β· GPL-2.0-or-later
- ubuntu noble: libnagios-object-perl 0.21.20-3 Β· GPL-2.0-or-later
- ubuntu resolute: libnagios-object-perl 0.21.20-3 Β· GPL-2.0-or-later
- ubuntu stonking: libnagios-object-perl 0.21.20-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms