.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Munin::Master::Config 3pm" .TH Munin::Master::Config 3pm 2023-11-05 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Munin::Master::Config \- Holds the master configuration. .SH METHODS .IX Header "METHODS" .IP \fBinstance\fR 4 .IX Item "instance" .Vb 1 \& my $config = Munin::Master::Config\->instance; .Ve .Sp Returns the (possibly newly created) singleton configuration instance. .IP \fBset_value\fR 4 .IX Item "set_value" .Vb 1 \& $config\->set_value($longkey, $value); .Ve .Sp Set a value in the config, where \f(CW$longkey\fR is the full ;:. separated value. .IP \fBparse_config\fR 4 .IX Item "parse_config" .Vb 1 \& $config\->parse_config($io); .Ve .Sp Populates the fields of \f(CW$config\fR from the configuration file referred to by filehandle \f(CW$io\fR. .IP \fBlook_up\fR 4 .IX Item "look_up" .Vb 1 \& my $value = $config\->look_up($key); .Ve .Sp Look up a group/host by a key such as "localdomain;localhost" etc. If the path does not exist create it with correct class and so on. .Sp Lookup ends at host name. If something is missing along the way undef is returned. .IP \fBget_groups_and_hosts\fR 4 .IX Item "get_groups_and_hosts" .Vb 1 \& my $gah = $config\->get_groups_and_hosts(); .Ve .Sp Returns all the groups and hosts defined in the configuration. .IP \fBget_all_hosts\fR 4 .IX Item "get_all_hosts" .Vb 1 \& my $hosts = $config\->get_all_hosts(); .Ve .Sp Returns a list of all the hosts defined in the configuration. .IP \fBset\fR 4 .IX Item "set" .Vb 1 \& $config\->set(\e%attrs); .Ve .Sp Sets the keys and values in \f(CW$config\fR to those in \f(CW%attrs\fR.