Uninett / zino

Zino 2.0 - Network state monitor for research networks
Apache License 2.0
3 stars 4 forks source link

Add a generic Zino configuration file #224

Closed lunkwill42 closed 8 hours ago

lunkwill42 commented 1 month ago

Zino 1 features a config file for some generic settings (whereas the current Zino 2 beta hardcodes everything that isn't configurable through a command line option).

The original configuration file is (of course) plain Tcl, and looks something like this:

set persist_file "save-state.tcl"
set eventid_file "eventid"
set persist_period 300

set old_events "old-events"

set pollfile "../conf/polldevs.cf"
set conf_check 60

set zino_secrets "secrets"
set authTacacs 1
set Tacping "/local/traffic/bin/tacping"
set Tachost "hegre.uninett.no"
set authClearTextPasswords 1
set OpenServerAccess 0

While some of these options aren't relevant for Zino 2 (because of features that have intentionally been dropped), several of them should be supported in a Zino 2 config file.

There is no reason to keep the original format (as Zino 2 is not written in Tcl): The config file is small and should be easy to port by hand. In keeping with some of our other recent projects, I would suggest a TOML configuration file (zino.toml). Existing Zino 2 features (at the time of this writing) that should be configurable would be:

Since we're redefining the config file, it's okay to group thing into TOML sections where applicable.

runborg commented 4 weeks ago

eventid_file: Not quite sure what this is, it should be checked

eventid_file is just there to tell zino1 what the last used eventid is. This is a state it belongs to the persist_file instead in zino2. As of this i do not think its needed in zino2

as checked in zino1 production with the last created eventid 178449 as checked with curitz client

--> $ cat eventid
178449
runborg commented 4 weeks ago

The original zino1 code does not use a consistent naming scheme. In the reimplementation try to be more consistent on this.

Also please add a descriptive example config file lots of comments with default values for each option