Nagios...::File(3pm)

πŸ“¦
version 0.21.20 Β· 2 versions
  • 0.21.20 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.21.20 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 a Nagios::Config::File. that's the whole job description. give her a FILE, get an object. slay. ✨

πŸ“ METHODS πŸ“

  • get ([NAME], [SPLIT]) β€” returns the value of the attribute NAME for the current file. and if SPLIT is 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::Config
  • Nagios::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. πŸ’…βœ¨πŸŽ€