Nagios::Config::File(3pm)

Nagios::Config::File3pm

Base class for nagios configuration files

Usage

  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" ;

Overview

"Nagios::Config::File" is the base class for all Nagios configuration files. You should not need to create these yourself.

Constructor

new ([FILE])

Creates a "Nagios::Config::File".

Methods

get ([NAME], [SPLIT])

Returns the value of the attribute "NAME" for the current file. If "SPLIT" is true, returns a list of all the values split on /\s*,\s*/. This is useful for attributes that can have more that one value.

filename()

Returns the filename for the current object.

dump ()

Returns a scalar with the full configuration text ready to parse again.

Releases

10 releases since Debian 4.0 (Etch); the text changed 7 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9–10
  7. 11
  8. 12–13

Author

Patrick LeBoutillier, [email protected]

Al Tobey, [email protected]

From libnagios-object-perl 0.21.20-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.