1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #include "db_ido/dbquery.hpp"
4 #include "base/configobject.hpp"
11 abstract class DbConnection : ConfigObject
13 [config] String table_prefix {
14 default {{{ return "icinga_"; }}}
17 [config, required] Dictionary::Ptr cleanup {
18 default {{{ return new Dictionary(); }}}
21 [config] Array::Ptr categories {
26 "DbCatAcknowledgement",
38 [no_user_view, no_user_modify] int categories_filter_real (CategoryFilter);
40 [config] bool enable_ha {
41 default {{{ return true; }}}
44 [config] double failover_timeout {
45 default {{{ return 30; }}}
48 [state, no_user_modify] double last_failover;
50 [no_user_modify] String schema_version;
51 [no_user_modify] bool connected;
52 [no_user_modify] bool should_connect {
53 default {{{ return true; }}}
58 validator DbConnection {
60 Number acknowledgements_age;
61 Number commenthistory_age;
62 Number contactnotifications_age;
63 Number contactnotificationmethods_age;
64 Number downtimehistory_age;
65 Number eventhandlers_age;
66 Number externalcommands_age;
67 Number flappinghistory_age;
68 Number hostchecks_age;
69 Number logentries_age;
70 Number notifications_age;
71 Number processevents_age;
72 Number statehistory_age;
73 Number servicechecks_age;
74 Number systemcommands_age;