Closed llange closed 3 years ago
the easiest workaround is probably to remove this column from lmd and rebuild it. Just uncomment this line: https://github.com/sni/lmd/blob/master/lmd/objects.go#L278 There might be more unknown columns.
I'll certainly try that approach, thanks, and list the other columns if any.
Is there any drawbacks in removing this column ? Loss of functionality ?
If so, as I have many other backends (more recent) on the same installation, I think it could be good to have a more "dynamic" detection (via Livestatus version for example) so that newer backends have the full capabilities.
There is a dynamic approach as well. Just have a look at that file. There is one based on the backend type, like naemon, icinga... and there is one based on a "GET tables" query to get all available tables and their columns.
I just pushed PR #117 implemented as you suggested. It "works for me", for both older and newer livestatus releases.
Tell me if any changes are needed.
Hello,
On some installations I'm stuck with and older release of livestatus (1.1.12p6 - the check_mk one, for Nagios3). The column
event_handler
was added to thehosts
table some releases after (I believe in 1.2.0).LMD tries to access this column at startup, and the error
Table 'hosts' has no column 'event_handler'
prevents a further use of these backends.Would it be possible to handle this special -legacy- case ?