Create a new configuration object. If Version is not specified, the already weak
validation will be weakened further to allow mixing of Nagios 1.0 and 2.0 configurations.
For now, the minor numbers of Version are ignored. Do not specify any letters as in 2.0a1.
To enable regular expression matching, use either the regexp_matching or true_regexp_matching arguments to new(). See enable_regexp_matching() and enable_true_regexp_matching() below.
Parse a nagios object configuration file into memory. Although Nagios::Objects will be created, they are not really usable until the register() method is called.
Search through the list of objects names and return the first match.
The second argument is optional. Always using it can considerably reduce
the size of the list to be searched, so it is recommended.
Search through the list of objects names and return all the matches.
The second argument is required.
Search through the list of objects names and return a list of matches.
The first argument will be evaluated as a regular expression. The second
argument is required and specifies what kind of object to search for.
The regular expressions are created by translating the * to .*? and ? to .. For now (v0.9), this code completely ignores Nagioss use_regexp_matching and use_true_regexp_matching and does full RE matching all the time.
Obtain a reference to all objects of the specified Nagios object type.
Usage: $objects = all_objects_for_type($object_type)
Returns an arrayref with all objects parsed from the config in it.
Search through the objects parsed thus far, looking for a particular textual name. When found, return that object. If called with two arguments, it will search through all objects currently loaded until a match is found. A third argument may specify the type of object to search for, which may speed up the search considerably.
Resolve the template for the specified object. Templates will not work until this has been done.
Examine all attributes of an object and link all of its references to other Nagios objects to their respective perl objects. If this isnt called, some methods will return the textual name instead of a perl object.
Resolve all objects currently loaded into memory. This can be called any number of times without corruption.
Same deal as resolve_objects(), but as youd guess, it registers all objects currently loaded into memory.
This correlates to the use_regexp_matching option in nagios.cfg.
When this option is enabled, Nagios::Object::Config will translate * to .*? and ? to . and
evaluate the result as a perl RE, anchored at both ends for any value that can point to multiple
other objects (^ and $ are added to either end).
This correlates to the use_true_regexp_matching option in nagios.cfg. This is very similar to
the enable_regexp_matching() option, but matches more data and allows more powerful RE syntax.
These modules will allow you the full power of perl REs - this is probably more than is available
in Nagios, so dont blame me if something works here but not in Nagios (its usually the other way
The generated REs have the same translation as above, but do not have the anchors to ^ and $.
This option always supercedes enable_regexp_matching.
|list_hosts(), list_hostgroups(), etc.||
Returns an array/arrayref of objects of the given type.
Al Tobey <email@example.com> Contributions From:
Lynne Lawrence (API & bugs)
|perl v5.20.3||NAGIOS::OBJECT::CONFIG (3)||2016-04-03|