sni / lmd

Livestatus Multitool Daemon - Create livestatus federation from multiple sources
https://labs.consol.de/omd/packages/lmd/
GNU General Public License v3.0
42 stars 31 forks source link

Add custom variables support for contacts #101

Closed sjoegren closed 4 years ago

sjoegren commented 4 years ago

This will sync the columns custom_variable_names and custom_variable_values for the contacts table and construct custom_variables map from those. This is done the same way as for hosts and services.

Signed-off-by: Aksel Sjögren asjogren@itrsgroup.com

sni commented 4 years ago

Looks good, the only thing which worries me a bit, is that this change turns the contacts from a fetch once static table into a dynamic table which will be regularly synchronized because this change introduces the first dynamic column for the contacts table. And contacts usually tend to change not very often but may be huge in numbers. Especially since the contact has no last_update timestamp to reduce the number of updates.

jacobbaungard commented 4 years ago

Perhaps we could add a last_update to the contacts table - until then maybe we just sync the values statically ?

sni commented 4 years ago

that would be a good approach

sni commented 4 years ago

let me double check that. Setting it to static should make the table fetched once on startup and after reloads. Settings it to dynamic should update that table every couple of seconds.

sni commented 4 years ago

ok, i was wrong. Only a few tables are synchronized regularly: Status, Hosts, Services, Downtimes and Comments. Only every FullUpdateInterval all dynamic tables are synchronized.

sni commented 4 years ago

Thanks, i merged it manually.