ipfixcol2 icon indicating copy to clipboard operation
ipfixcol2 copied to clipboard

Test xml configuration and exit

Open crossto opened this issue 3 years ago • 1 comments

Is there a way to validate xml configuration file other than ipfixcol2 -c <FILE>? I'm running timeout 1s ipfixcol2 -c <FILE> and catching RC 124 but that seems inelegant and prone to errors (slow read due to hdd spin up comes to mind).

crossto avatar Mar 14 '22 13:03 crossto

Hi,

I took a quick peek at the code, but I couldn't think of a more elegant way. Unfortunately, this is not even easy to implement, because the part when plugins process their configuration is an integral part of their initialization, during which they perform other activities (e.g. creating sockets, etc.).

Therefore, even your proposed solution fails when the plugin that is part of the configuration needs to use some exclusive resource. For example, if you are running a collector that listens on TCP port 4739, and you want to test the new configuration with the same port at the same time, even the correct configuration will end up failing because the required port is already busy.

Lukas

Lukas955 avatar Mar 14 '22 14:03 Lukas955