Munin:...:Utils(3pm)
π Munin::Master::Utils(3pm) β or, the User Contributed Perl Documentation era of Munin:...:Utils(3pm) π
okay bestie, buckle up β this is Munin::Master::Utils, and she is literally the utility drawer of the Munin master. The NAME line says it plain: Exports a lot of utility functions. That's it. That's the whole pitch. And honestly? Iconic. No notes. π
β¨ SYNOPSIS β¨
Like every good Perl module she slides in with one line, no drama:
use Munin::Master::Utils;
and suddenly you have access to the entire drawer of functions. slay. π«Ά
πΈ SUBROUTINES πΈ
okay so here's the whole crew, one by one. I'm not skipping a single one β not even the mysterious silent ones. nobody gets left behind at this party. π
π₯ munin_category_status
Gets the current status of a category. simple as that, bestie.
Parameters:
$hashβ a ref to the hash node whose children we're checking π$limitsβ a ref to the root node of the limits tree$categoryβ the category to review$check_drawβ [optional] ignore undrawn fields
Returns:
- Success: the status of the field β¨
- Failure:
undefπ
π¦ munin_readconfig_base
Reads the configuration file, includes the dir files, and initializes the important default values that are optional. she's the setup queen fr fr.
Parameters:
$fileβ themunin.conffilename. If you omit it, the default filename gets used. (she'll pick for you, she has taste π )
Returns:
- Success: the
$confighash (also cached in the module π§)
π munin_copy_node
Copy hash node. short and sweet.
Parameters:
$fromβ hash node to copy$toβ where to copy it to
Returns:
- Success:
$to - Failure:
undefπ
β munin_copy_node_toloc
Copy hash node at. (yes, "at" β that's what she says, don't @ me)
Parameters:
$fromβ hash node to copy$toβ where to copy it to$locβ path to node under$to
Returns:
- Success:
$to - Failure:
undef
π munin_createlock
no description on this one, bestie β she's mysterious. lowkey main character energy: shows up in the list, says nothing, leaves. π
π munin_delete
also no description. she's giving silent-but-deadly. just know she deletes. the name ate. periodt.
π munin_draw_field
Checks whether a field will actually be visible in the graph or not. the vibe check for your fields, basically β¨
Parameters:
$hashβ a ref to the hash node for the field
Returns:
- Success: Boolean;
trueif the field will be graphed,falseif not - Failure:
undef
π munin_field_status
Gets the current status of a field.
Parameters:
$hashβ a ref to the field hash node$limitsβ a ref to the root node of the limits tree$check_drawβ [optional] ignore undrawn fields
Returns:
- Success: the status of the field
- Failure:
undef
π munin_find_field
Searches a hash to find hash nodes with $field defined. detective mode activated π΅οΈββοΈ
Parameters:
$hashβ a hash ref to search$fieldβ the name of the field to search for, or a regex π$avoidβ [optional] stop traversing further down if this field is found
Returns:
- Success: a ref to an array of the hash nodes containing
$field - Failure:
undef
πΈ munin_get
Get variable. the simplest little getter in the world.
Parameters:
$hashβ ref to hash node$fieldβ name of field to get$defaultβ [optional] value to return if$fieldisn't set
Returns:
- Success: field contents
- Failure:
$defaultif defined, elseundef
π«Ά munin_get_bool
Get boolean variable. she's munin_get's more decisive sister.
Parameters:
$hashβ ref to hash node$fieldβ name of field to get$defaultβ [optional] value to return if$fieldisn't set
Returns:
- Success:
1or0(true or false) β β - Failure:
$defaultif defined, elseundef
π§ munin_get_bool_val
no description, no parameters listed, no returns listed. she simply is. the mystery of it all π
π munin_get_children
Get all child hash nodes. family reunion time.
Parameters:
$hashβ a hash ref to the parent node
Returns:
- Success: a ref to an array of the child nodes
- Failure:
undef
π munin_get_field_order
Get the field order in a graph. somebody has to decide who goes first, and it's her.
Parameters:
$hashβ a hash ref to the service
Returns:
- Success: a ref to an array of the field names
- Failure:
undef
π munin_get_filename
Get the rrd filename for a field, without any bells or whistles. Used by munin-update to figure out which file to update. she's the no-frills one, the "we have food at home" of filename getters π
Parameters:
$hashβ ref to hash field
Returns:
- Success: full path to rrd file
- Failure:
undef
π· munin_get_html_filename
Get the full path-name of an html file.
Parameters:
$hashβ a ref to the service hash node
Returns:
- Success: the file name with full path
- Failure:
undef
β¨ munin_get_max_label_length
Get the length of the longest label in a graph. she's measuring, she's comparing, she's judging (lovingly).
Parameters:
$hashβ the graph in question$orderβ a ref to an array of fields (graph_order)
Returns:
- Success: the length of the longest label in the graph
- Failure:
undef
π¦ munin_get_node
Gets a node by loc.
Parameters:
$hashβ a ref to the hash to set the variable in$locβ a ref to an array with the full path of the node
Returns:
- Success: the node ref found by
$loc - Failure:
undef
π munin_get_node_loc
Get the location array for a hash node. the receipts of where this node lives.
Parameters:
$hashβ a ref to the node
Returns:
- Success: ref to an array with the full path of the variable
- Failure:
undef
π munin_get_node_name
Returns the name of the hash node you hand her. just the name. that's the whole job.
Parameters:
$hashβ a ref to the hash node
Returns:
- Success: the name of the node
π munin_get_node_partialpath
Gets a node from a partial path β the relative-address queen π
Parameters:
$hashβ a ref to the "current" location in the hash tree$varβ a path string with relative location (from the$hash)
Returns:
- Success: the node
- Failure:
undef
π«Ά munin_get_parent
Get the parent node of a hash. go up one level, say hi to mom.
Parameters:
$hashβ a ref to the node
Returns:
- Success: ref to an parent (yes, "an parent" β we love her, we keep her words π₯Ή)
- Failure:
undef
π§ munin_get_parent_name
Returns the name of the parent of the hash node supplied.
Parameters:
$hashβ a ref to the hash node
Returns:
- Success: the name of the parent node
- Failure: if no parent node exists, the string
"none"is returned. she's polite about it π
π munin_get_picture_filename
Get the full path + name of a picture file. graph pics, for the grid.
Parameters:
$hashβ a ref to the service hash node$scaleβ [optional] the scale (day,week,year,month)$sumβ [optional] Boolean value, whether it's a sum graph or not
Returns:
- Success: the file name with full path
- Failure:
undef
β munin_get_picture_loc
Get the location array for a hash node, for picture purposes. And here's the tea: it differs from munin_get_node_loc in that it honors #%#origin metadata πβ¨
Parameters:
$hashβ a ref to the node
Returns:
- Success: ref to an array with the full path of the variable
- Failure:
undef
π munin_get_root_node
Get the root node of the hash tree. go all the way up. touch grass. π±
Parameters:
$hashβ a hash node to traverse up from
Returns:
- Success: a ref to the root hash node
- Failure:
undef
π₯ munin_get_rrd_filename
Get the name of the rrd file corresponding to a field. Checks for lots of bells and whistles. This is the correct one to use when you're figuring out where to fetch data from β she said what she said, bestie. use this one. π
Parameters:
$fieldβ the hash object of the field$pathβ [optional] the path to the field (as given ingraph_order/sum/stack/et al)
Returns:
- Success: a string with the filename of the rrd file
- Failure:
undef
πΈ munin_get_separated_node
Copy a node to a separate node without "specials". the stripped-down, de-influenced version of your node π§ββοΈ
Parameters:
$hashβ the node to copy
Returns:
- Success: a ref to a new node without
"#%#"-fields - Failure:
undef
π munin_get_var_path
no description given. she's a vibe, not a documentation page. moving on π
π munin_getlock
also undocumented in this page. the lock-getting sister of munin_createlock. mysterious. powerful. silent. π«Ά
π¦ munin_graph_column_headers
no description. she handles column headers. that's all we're told and honestly that's enough. β¨
π munin_has_subservices
okay this one actually has a little example, look at her go:
munin_has_subservices($hash);
Checks whether the service represented by $hash has subservices (multigraph), and returns the result. very "are you a mom or not" energy.
Parameters:
$hashβ hash reference pointing to a service
Returns:
trueβ if the hash is indeed a service, and said service has got subservices πfalseβ otherwise
π munin_mkdir_p
another one with a tiny example, we love a demo:
munin_mkdir_p('/a/path/', oct('777'));
Make a directory β and recursively any nonexistent directory in the path to it. she builds the whole road, not just the destination. π£οΈβ¨
π munin_node_status
no description in the source. she's a status function for nodes and she's keeping it to herself. respect the privacy. π
π munin_nscasend
no description. nsca sending, by the name of her. that's all we get, bestie. π«Ά
β munin_overwrite
Take the contents of one config-namespace and replace/insert the instances needed. she's not here to negotiate, she's here to overwrite. π
π munin_parse_config
no description. she parses config. the name is the documentation. iykyk. β¨
π munin_path_to_loc
Returns a loc array from a path string. the reverse of what you'd expect and somehow exactly what you needed.
Parameters:
$pathβ a path string
Returns:
- Success: a ref to an array with the loc
- Failure:
undef
π§ munin_readconfig_part
Read a partial configuration. she does not need the whole thing, she just needs a part. queen of moderation. π΅
Parameters:
$whatβ name of the part that should be loaded (datafileorlimits)
Returns:
- Success: a
$configwith the$specifiedpart, but overwritten by$config
π«Ά munin_removelock
no description. she removes the lock. the yin to munin_createlock's yang. πβ¨
πΈ munin_runlock
no description. yes, "runlock". yes, we're all thinking it. no, we're not going to say it. (okay maybe we are: she's the run-lock one.) πββοΈπ
π munin_service_status
Gets the current status of a service.
Parameters:
$hashβ a ref to the field hash node$limitsβ a ref to the root node of the limits tree$check_drawβ [optional] ignore undrawn fields
Returns:
- Success: the status of the field
- Failure:
undef
π munin_set
Sets a variable in a hash. the setter to munin_get's getter. they're a matching set, your honor. π
Parameters:
$hashβ a ref to the hash to set the variable in$varβ the name of the variable$valβ the value to set the variable to
Returns:
- Success: the
$hashwe were handed (she gives it right back π«Ά) - Failure:
undef
π munin_set_var_loc
Sets a variable in a hash β but, like, by location. same energy, more coordinates.
Parameters:
$hashβ a ref to the hash to set the variable in$locβ a ref to an array with the full path of the variable$valβ the value to set the variable to
Returns:
- Success: the
$hashwe were handed - Failure:
undef
π¦ munin_set_var_path
Sets a variable in a hash β this time with a full path string. she's the third sister and honestly the most dramatic one. π
Parameters:
$hashβ a ref to the hash to set the variable in$varβ a string with the full path of the variable$valβ the value to set the variable to
Returns:
- Success: the
$hashwe were handed - Failure: the
$hashwe were handed β yes bestie, on failure she still hands you back the hash. read it again. that's what it says. we report, we don't explain. πβ¨
π munin_writeconfig
no description listed. she writes config. the name is doing a lot of heavy lifting and honestly it's slaying. π
π munin_writeconfig_loop
no description either. she's the loop version of munin_writeconfig. they're a duo. a little config-writing duo. π«Ά
π COPYING π
Okay bestie, legal time, but make it cute. π
Copyright (C) 2003-2007 Jimmy Olsen, Audun Ytterdal
These two iconic kings wrote this and we stan. π
Now the actual license stuff, no cap:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Like, it might be great, it might be a whole mess, and nobody's promising anything π. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Fr fr, if you're missing it, go ask them, they have spares π.
And that's the whole page, bestie! π¦ This one's from perl v5.42.0, dated 2026-09-14, and the page itself is Munin:...:Utils(3pm). Go forth and read your logs, you gorgeous main character πΈβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: munin 2.0.76+git14.68213d60-bp160.1.1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms