Splitting innreport.conf into 2 files?
eagle at eyrie.org
Sat Sep 25 19:11:02 UTC 2021
Julien ÉLIE <julien at trigofacile.com> writes:
> innreport.conf consists of about 50 lines of general parameters and then
> of about 2400 lines for configuring what to display in the report. I
> believe most users do not need to configure the display. Having it in
> innreport.conf does not permit fixing possible bugs or improving it
> during an INN update.
I think this is an excellent idea.
> Couldn't <pathetc>/innreport.conf be split into:
> - <pathetc>/innreport.conf for general parameters only
> - <path???>/innreport-display.conf (or any better name) for the rest
<pathlib>/innreport-display.conf would put it alongside innreport_inn.pm,
which feels correct to me.
The entire innreport implementation is unfortunately very difficult to
maintain since the separation of concerns between code and data is
ill-defined and there's no way to overlay or select specific changes to
the display layer. (It's also written in a fairly old dialect of Perl.)
I tried to rewrite it once and ended up with a different system that had
different problems, which was never released outside of Stanford.
One of the difficulties with the current implementation is that the
configuration file is essentially written in a DSL that's a subset of
Perl, so a backward-compatible replacement requires writing a parser and
execution layer for that DSL. (See EvalExpr in the innreport script.)
Ideally it would get a complete redesign, but I am doubtful anyone will
have time and inclination to do that work. The modern way of achieving
the same result is to feed all the relevant data into Prometheus or some
other generic monitoring system and then use Grafana or similar software
to generate reports and graphs. (Also quite a lot of work!)
> Of course, a new parameter should be added in innreport.conf to specify
> an alternate display file (display_conf_file "" related to <pathetc>
> this time).
I think this is the right way to handle local modifications.
Russ Allbery (eagle at eyrie.org) <https://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers