Skip to content

Config file, toggleable Livestatus, NagiosSpoolfile and NagfluxSpoolfile modules#7

Merged
sni merged 9 commits intomasterfrom
config-toggleable-backends
Jan 14, 2026
Merged

Config file, toggleable Livestatus, NagiosSpoolfile and NagfluxSpoolfile modules#7
sni merged 9 commits intomasterfrom
config-toggleable-backends

Conversation

@inqrphl
Copy link

@inqrphl inqrphl commented Jan 13, 2026

add "Enabled" option to the [Livestatus] config section, add [NagiosSpoolfile] section with "Enabled,Folder,WorkerCount" options, add [NagfluxSpoolfile] section with "Enabled,Folder" sections. Only the enablement toggles are new, the other options previously had values found inside [Main] section.

The older options for these are simply deprecated. Write a function that uses reflection to discover the final parsed config struct and take the preferred option if its available, which also reports the older deprecated paths under the [Main] section.

Update the example config and test configs embedded in the test files to the newer config standard.

Use another function to exit the program if the parsed config does not result in any watchers/listeners/spoolers being activated. This behavior was tested to work.

Also update the code that it passes the newer linter checks on the latest golangci. This includes moving some files around, renaming packages to avoid conflicts with the standard library, preallocations on dynamic arrays, unhandled errors, functions that always return nil on an error etc.

Another test disabled livestatus, NagiosSpoolfile and NagfluxSpoolfile only left the ModGearman perfdata listener. Worker was still created and consumed the gearman queue.

Ahmet Oeztuerk added 9 commits January 13, 2026 11:52
make livestatus, nagios spoolfile and nagflux spoolfile inputs toggleable. Add a new config section for them, and deprecate some options that were in the main section of the config file.

the deprecated options may still be used, but will complain in the log about being deprecated. Add helper functions that use code relection to get a config value given the primary path and older deprecated paths.

Depending on the enablement, dont construct and use the modules for livestatus, nagios spoolfile collector and nagflux spoolfile collector
@sni sni merged commit ecadc12 into master Jan 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants