Software / code / prosody
Annotate
tools/cfgdump.lua @ 11523:5f15ab7c6ae5
Statistics: Rewrite statistics backends to use OpenMetrics
The metric subsystem of Prosody has had some shortcomings from
the perspective of the current state-of-the-art in metric
observability.
The OpenMetrics standard [0] is a formalization of the data
model (and serialization format) of the well-known and
widely-used Prometheus [1] software stack.
The previous stats subsystem of Prosody did not map well to that
format (see e.g. [2] and [3]); the key reason is that it was
trying to do too much math on its own ([2]) while lacking
first-class support for "families" of metrics ([3]) and
structured metric metadata (despite the `extra` argument to
metrics, there was no standard way of representing common things
like "tags" or "labels").
Even though OpenMetrics has grown from the Prometheus world of
monitoring, it maps well to other popular monitoring stacks
such as:
- InfluxDB (labels can be mapped to tags and fields as necessary)
- Carbon/Graphite (labels can be attached to the metric name with
dot-separation)
- StatsD (see graphite when assuming that graphite is used as
backend, which is the default)
The util.statsd module has been ported to use the OpenMetrics
model as a proof of concept. An implementation which exposes
the util.statistics backend data as Prometheus metrics is
ready for publishing in prosody-modules (most likely as
mod_openmetrics_prometheus to avoid breaking existing 0.11
deployments).
At the same time, the previous measure()-based API had one major
advantage: It is really simple and easy to use without requiring
lots of knowledge about OpenMetrics or similar concepts. For that
reason as well as compatibility with existing code, it is preserved
and may even be extended in the future.
However, code relying on the `stats-updated` event as well as
`get_stats` from `statsmanager` will break because the data
model has changed completely; in case of `stats-updated`, the
code will simply not run (as the event was renamed in order
to avoid conflicts); the `get_stats` function has been removed
completely (so it will cause a traceback when it is attempted
to be used).
Note that the measure_*_event methods have been removed from
the module API. I was unable to find any uses or documentation
and thus deemed they should not be ported. Re-implementation is
possible when necessary.
[0]: https://openmetrics.io/
[1]: https://prometheus.io/
[2]: #959
[3]: #960
| author | Jonas Schäfer <jonas@wielicki.name> |
|---|---|
| date | Sun, 18 Apr 2021 11:47:41 +0200 |
| parent | 11192:11f285a439a4 |
| child | 11569:08dab7df152b |
| rev | line source |
|---|---|
|
11192
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 #!/usr/bin/env lua |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 -- cfgdump.lua prosody.cfg.lua [[host] option] |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 local s_format, print = string.format, print; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 local printf = function(fmt, ...) return print(s_format(fmt, ...)); end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 local serialization = require"util.serialization"; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 local serialize = serialization.new and serialization.new({ unquoted = true }) or serialization.serialize; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 local configmanager = require"core.configmanager"; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 local startup = require "util.startup"; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 startup.set_function_metatable(); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 local config_filename, onlyhost, onlyoption = ...; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 local ok, _, err = configmanager.load(config_filename or "./prosody.cfg.lua", "lua"); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 assert(ok, err); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 if onlyhost then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 if not onlyoption then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 onlyhost, onlyoption = "*", onlyhost; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
22 if onlyhost ~= "*" then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
23 local component_module = configmanager.get(onlyhost, "component_module"); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
24 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
25 if component_module == "component" then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
26 printf("Component %q", onlyhost); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
27 elseif component_module then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
28 printf("Component %q %q", onlyhost, component_module); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
29 else |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
30 printf("VirtualHost %q", onlyhost); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
31 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
32 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
33 printf("%s = %s", onlyoption or "?", serialize(configmanager.get(onlyhost, onlyoption))); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
34 return; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
35 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
36 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
37 local config = configmanager.getconfig(); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
38 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
39 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
40 for host, hostcfg in pairs(config) do |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
41 local fixed = {}; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
42 for option, value in pairs(hostcfg) do |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
43 fixed[option] = value; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
44 if option:match("ports?$") or option:match("interfaces?$") then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
45 if option:match("s$") then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
46 if type(value) ~= "table" then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
47 fixed[option] = { value }; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
48 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
49 else |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
50 if type(value) == "table" and #value > 1 then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
51 fixed[option] = nil; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
52 fixed[option.."s"] = value; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
53 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
54 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
55 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
56 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
57 config[host] = fixed; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
58 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
59 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
60 local globals = config["*"]; config["*"] = nil; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
61 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
62 local function printsection(section) |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
63 local out, n = {}, 1; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
64 for k,v in pairs(section) do |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
65 out[n], n = s_format("%s = %s", k, serialize(v)), n + 1; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
66 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
67 table.sort(out); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
68 print(table.concat(out, "\n")); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
69 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
70 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
71 print("-------------- Prosody Exported Configuration File -------------"); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
72 print(); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
73 print("------------------------ Global section ------------------------"); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
74 print(); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
75 printsection(globals); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
76 print(); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
77 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
78 local has_components = nil; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
79 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
80 print("------------------------ Virtual hosts -------------------------"); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
81 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
82 for host, hostcfg in pairs(config) do |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
83 setmetatable(hostcfg, nil); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
84 hostcfg.defined = nil; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
85 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
86 if hostcfg.component_module == nil then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
87 print(); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
88 printf("VirtualHost %q", host); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
89 printsection(hostcfg); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
90 else |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
91 has_components = true |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
92 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
93 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
94 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
95 print(); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
96 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
97 if has_components then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
98 print("------------------------- Components ---------------------------"); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
99 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
100 for host, hostcfg in pairs(config) do |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
101 local component_module = hostcfg.component_module; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
102 hostcfg.component_module = nil; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
103 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
104 if component_module then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
105 print(); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
106 if component_module == "component" then |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
107 printf("Component %q", host); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
108 else |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
109 printf("Component %q %q", host, component_module); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
110 hostcfg.component_module = nil; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
111 hostcfg.load_global_modules = nil; |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
112 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
113 printsection(hostcfg); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
114 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
115 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
116 end |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
117 |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
118 print() |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
119 print("------------------------- End of File --------------------------"); |
|
11f285a439a4
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
120 |