summaryrefslogtreecommitdiffstats
path: root/library/Icingadb/Model
diff options
context:
space:
mode:
Diffstat (limited to 'library/Icingadb/Model')
-rw-r--r--library/Icingadb/Model/AcknowledgementHistory.php16
-rw-r--r--library/Icingadb/Model/ActionUrl.php5
-rw-r--r--library/Icingadb/Model/Behavior/FlattenedObjectVars.php29
-rw-r--r--library/Icingadb/Model/Checkcommand.php11
-rw-r--r--library/Icingadb/Model/CheckcommandArgument.php17
-rw-r--r--library/Icingadb/Model/CheckcommandCustomvar.php6
-rw-r--r--library/Icingadb/Model/CheckcommandEnvvar.php8
-rw-r--r--library/Icingadb/Model/Comment.php19
-rw-r--r--library/Icingadb/Model/CommentHistory.php18
-rw-r--r--library/Icingadb/Model/Customvar.php7
-rw-r--r--library/Icingadb/Model/CustomvarFlat.php25
-rw-r--r--library/Icingadb/Model/Downtime.php27
-rw-r--r--library/Icingadb/Model/DowntimeHistory.php25
-rw-r--r--library/Icingadb/Model/Endpoint.php9
-rw-r--r--library/Icingadb/Model/Environment.php4
-rw-r--r--library/Icingadb/Model/Eventcommand.php11
-rw-r--r--library/Icingadb/Model/EventcommandArgument.php17
-rw-r--r--library/Icingadb/Model/EventcommandCustomvar.php6
-rw-r--r--library/Icingadb/Model/EventcommandEnvvar.php8
-rw-r--r--library/Icingadb/Model/FlappingHistory.php14
-rw-r--r--library/Icingadb/Model/History.php16
-rw-r--r--library/Icingadb/Model/Host.php40
-rw-r--r--library/Icingadb/Model/HostCustomvar.php6
-rw-r--r--library/Icingadb/Model/Hostgroup.php10
-rw-r--r--library/Icingadb/Model/HostgroupCustomvar.php6
-rw-r--r--library/Icingadb/Model/HostgroupMember.php6
-rw-r--r--library/Icingadb/Model/Hostgroupsummary.php29
-rw-r--r--library/Icingadb/Model/HoststateSummary.php14
-rw-r--r--library/Icingadb/Model/IconImage.php5
-rw-r--r--library/Icingadb/Model/Instance.php16
-rw-r--r--library/Icingadb/Model/NotesUrl.php5
-rw-r--r--library/Icingadb/Model/Notification.php18
-rw-r--r--library/Icingadb/Model/NotificationCustomvar.php6
-rw-r--r--library/Icingadb/Model/NotificationHistory.php16
-rw-r--r--library/Icingadb/Model/NotificationUser.php6
-rw-r--r--library/Icingadb/Model/NotificationUsergroup.php6
-rw-r--r--library/Icingadb/Model/Notificationcommand.php11
-rw-r--r--library/Icingadb/Model/NotificationcommandArgument.php17
-rw-r--r--library/Icingadb/Model/NotificationcommandCustomvar.php6
-rw-r--r--library/Icingadb/Model/NotificationcommandEnvvar.php8
-rw-r--r--library/Icingadb/Model/Service.php38
-rw-r--r--library/Icingadb/Model/ServiceCustomvar.php6
-rw-r--r--library/Icingadb/Model/ServiceState.php5
-rw-r--r--library/Icingadb/Model/Servicegroup.php10
-rw-r--r--library/Icingadb/Model/ServicegroupCustomvar.php6
-rw-r--r--library/Icingadb/Model/ServicegroupMember.php6
-rw-r--r--library/Icingadb/Model/ServicegroupSummary.php23
-rw-r--r--library/Icingadb/Model/ServicestateSummary.php18
-rw-r--r--library/Icingadb/Model/State.php7
-rw-r--r--library/Icingadb/Model/StateHistory.php20
-rw-r--r--library/Icingadb/Model/Timeperiod.php11
-rw-r--r--library/Icingadb/Model/TimeperiodCustomvar.php6
-rw-r--r--library/Icingadb/Model/TimeperiodOverrideExclude.php6
-rw-r--r--library/Icingadb/Model/TimeperiodOverrideInclude.php6
-rw-r--r--library/Icingadb/Model/TimeperiodRange.php7
-rw-r--r--library/Icingadb/Model/User.php16
-rw-r--r--library/Icingadb/Model/UserCustomvar.php6
-rw-r--r--library/Icingadb/Model/Usergroup.php10
-rw-r--r--library/Icingadb/Model/UsergroupCustomvar.php6
-rw-r--r--library/Icingadb/Model/UsergroupMember.php6
-rw-r--r--library/Icingadb/Model/Zone.php11
61 files changed, 747 insertions, 12 deletions
diff --git a/library/Icingadb/Model/AcknowledgementHistory.php b/library/Icingadb/Model/AcknowledgementHistory.php
index 549d2ff..edbcc83 100644
--- a/library/Icingadb/Model/AcknowledgementHistory.php
+++ b/library/Icingadb/Model/AcknowledgementHistory.php
@@ -4,6 +4,7 @@
namespace Icinga\Module\Icingadb\Model;
+use DateTime;
use Icinga\Module\Icingadb\Model\Behavior\BoolCast;
use ipl\Orm\Behavior\Binary;
use ipl\Orm\Behavior\MillisecondTimestamp;
@@ -16,6 +17,21 @@ use ipl\Orm\Relations;
*
* Please note that using this model will fetch history entries for decommissioned services. To avoid this, the query
* needs a `acknowledgement_history.service_id IS NULL OR acknowledgement_history_service.id IS NOT NULL` where.
+ *
+ * @property string $id
+ * @property string $environment_id
+ * @property ?string $endpoint_id
+ * @property string $object_type
+ * @property string $host_id
+ * @property ?string $service_id
+ * @property DateTime $set_time
+ * @property ?DateTime $clear_time
+ * @property ?string $author
+ * @property ?string $cleared_by
+ * @property ?string $comment
+ * @property ?DateTime $expire_time
+ * @property ?bool $is_sticky
+ * @property ?bool $is_persistent
*/
class AcknowledgementHistory extends Model
{
diff --git a/library/Icingadb/Model/ActionUrl.php b/library/Icingadb/Model/ActionUrl.php
index e0b092e..928ce35 100644
--- a/library/Icingadb/Model/ActionUrl.php
+++ b/library/Icingadb/Model/ActionUrl.php
@@ -10,6 +10,11 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string[] $action_url
+ * @property string $environment_id
+ */
class ActionUrl extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Behavior/FlattenedObjectVars.php b/library/Icingadb/Model/Behavior/FlattenedObjectVars.php
index b1c308a..8b110e0 100644
--- a/library/Icingadb/Model/Behavior/FlattenedObjectVars.php
+++ b/library/Icingadb/Model/Behavior/FlattenedObjectVars.php
@@ -32,11 +32,30 @@ class FlattenedObjectVars implements RewriteColumnBehavior, QueryAwareBehavior
$column = $condition->metaData()->get('columnName');
if ($column !== null) {
$relation = substr($relation, 0, -5) . 'customvar_flat.';
- $nameFilter = Filter::like($relation . 'flatname', $column);
- $class = get_class($condition);
- $valueFilter = new $class($relation . 'flatvalue', $condition->getValue());
-
- return Filter::all($nameFilter, $valueFilter);
+ $condition->metaData()
+ ->set('requiresTransformation', true)
+ ->set('columnPath', $relation . $column)
+ ->set('relationPath', substr($relation, 0, -1));
+
+ // The ORM's FilterProcessor only optimizes filter conditions that are in the same level (chain).
+ // Previously, this behavior transformed a single condition to an ALL chain and hence the semantics
+ // of the level changed, since the FilterProcessor interpreted the conditions separately from there on.
+ // To not change the semantics of the condition it is required to delay the transformation of the condition
+ // until the subquery is created. Though, since this is about custom variables, and such can contain dots,
+ // the FilterProcessor then continues traversing the parts of the column's path, which then would include
+ // the dot-separated parts of the custom variable name. To prevent this, we have to signal that what we
+ // return a replacement here, that should be used as-is and not processed further.
+ $condition->metaData()->set('forceResolved', true);
+
+ // But to make it even worse: If we do that, (not transforming the condition) the FilterProcessor sees
+ // multiple conditions as targeting different columns, as it doesn't know that the *columns* are in fact
+ // custom variables. It then attempts to combine the conditions with an AND, which is not possible, since
+ // they refer to the same columns (flatname and flatvalue) after being transformed. So we have to make
+ // the condition refer to a different column, which is totally irrelevant, but since it's always the same
+ // column, the FilterProcessor won't attempt to combine the conditions. The literal icing on the cake.
+ $condition->setColumn('always_the_same_but_totally_irrelevant');
+
+ return $condition;
}
}
diff --git a/library/Icingadb/Model/Checkcommand.php b/library/Icingadb/Model/Checkcommand.php
index 400a24b..7f55c0d 100644
--- a/library/Icingadb/Model/Checkcommand.php
+++ b/library/Icingadb/Model/Checkcommand.php
@@ -10,6 +10,17 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property ?string $zone_id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $command
+ * @property int $timeout
+ */
class Checkcommand extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/CheckcommandArgument.php b/library/Icingadb/Model/CheckcommandArgument.php
index 3fb4ad5..155f6da 100644
--- a/library/Icingadb/Model/CheckcommandArgument.php
+++ b/library/Icingadb/Model/CheckcommandArgument.php
@@ -9,6 +9,22 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $checkcommand_id
+ * @property string $argument_key
+ * @property string $environment_id
+ * @property string $properties_checksum
+ * @property ?string $argument_value
+ * @property ?int $argument_order
+ * @property ?string $description
+ * @property ?string $argument_key_override
+ * @property string $repeat_key
+ * @property string $required
+ * @property ?string $set_if
+ * @property ?string $separator
+ * @property string $skip_key
+ */
class CheckcommandArgument extends Model
{
public function getTableName()
@@ -35,6 +51,7 @@ class CheckcommandArgument extends Model
'repeat_key',
'required',
'set_if',
+ 'separator',
'skip_key'
];
}
diff --git a/library/Icingadb/Model/CheckcommandCustomvar.php b/library/Icingadb/Model/CheckcommandCustomvar.php
index 0a834b5..5382689 100644
--- a/library/Icingadb/Model/CheckcommandCustomvar.php
+++ b/library/Icingadb/Model/CheckcommandCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $checkcommand_id
+ * @property string $customvar_id
+ * @property string $environment_id
+ */
class CheckcommandCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/CheckcommandEnvvar.php b/library/Icingadb/Model/CheckcommandEnvvar.php
index 517a45f..05cdeed 100644
--- a/library/Icingadb/Model/CheckcommandEnvvar.php
+++ b/library/Icingadb/Model/CheckcommandEnvvar.php
@@ -9,6 +9,14 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $checkcommand_id
+ * @property string $envvar_key
+ * @property string $environment_id
+ * @property string $properties_checksum
+ * @property string $envvar_value
+ */
class CheckcommandEnvvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Comment.php b/library/Icingadb/Model/Comment.php
index bcdd5e0..bdfcaf0 100644
--- a/library/Icingadb/Model/Comment.php
+++ b/library/Icingadb/Model/Comment.php
@@ -4,6 +4,7 @@
namespace Icinga\Module\Icingadb\Model;
+use DateTime;
use Icinga\Module\Icingadb\Model\Behavior\BoolCast;
use Icinga\Module\Icingadb\Model\Behavior\ReRoute;
use ipl\Orm\Behavior\Binary;
@@ -12,6 +13,24 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $object_type
+ * @property string $host_id
+ * @property ?string $service_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $author
+ * @property string $text
+ * @property string $entry_type
+ * @property DateTime $entry_time
+ * @property bool $is_persistent
+ * @property bool $is_sticky
+ * @property ?DateTime $expire_time
+ * @property ?string $zone_id
+ */
class Comment extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/CommentHistory.php b/library/Icingadb/Model/CommentHistory.php
index 5f03e68..1cb02e3 100644
--- a/library/Icingadb/Model/CommentHistory.php
+++ b/library/Icingadb/Model/CommentHistory.php
@@ -4,6 +4,7 @@
namespace Icinga\Module\Icingadb\Model;
+use DateTime;
use Icinga\Module\Icingadb\Model\Behavior\BoolCast;
use ipl\Orm\Behavior\Binary;
use ipl\Orm\Behavior\MillisecondTimestamp;
@@ -16,6 +17,23 @@ use ipl\Orm\Relations;
*
* Please note that using this model will fetch history entries for decommissioned services. To avoid this,
* the query needs a `comment_history.service_id IS NULL OR comment_history_service.id IS NOT NULL` where.
+ *
+ * @property string $comment_id
+ * @property string $environment_id
+ * @property ?string $endpoint_id
+ * @property string $object_type
+ * @property string $host_id
+ * @property ?string $service_id
+ * @property DateTime $entry_time
+ * @property string $author
+ * @property ?string $removed_by
+ * @property string $comment
+ * @property string $entry_type
+ * @property bool $is_persistent
+ * @property bool $is_sticky
+ * @property ?DateTime $expire_time
+ * @property ?DateTime $remove_time
+ * @property bool $has_been_removed
*/
class CommentHistory extends Model
{
diff --git a/library/Icingadb/Model/Customvar.php b/library/Icingadb/Model/Customvar.php
index e043229..70fb709 100644
--- a/library/Icingadb/Model/Customvar.php
+++ b/library/Icingadb/Model/Customvar.php
@@ -9,6 +9,13 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $name
+ * @property string $value
+ */
class Customvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/CustomvarFlat.php b/library/Icingadb/Model/CustomvarFlat.php
index 99d8aca..e7a0459 100644
--- a/library/Icingadb/Model/CustomvarFlat.php
+++ b/library/Icingadb/Model/CustomvarFlat.php
@@ -6,11 +6,22 @@ namespace Icinga\Module\Icingadb\Model;
use ipl\Orm\Behavior\Binary;
use ipl\Orm\Behaviors;
+use ipl\Orm\Contract\RewriteFilterBehavior;
use ipl\Orm\Model;
use ipl\Orm\Query;
use ipl\Orm\Relations;
+use ipl\Stdlib\Filter;
+use ipl\Stdlib\Filter\Condition;
use Traversable;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $customvar_id
+ * @property string $flatname_checksum
+ * @property string $flatname
+ * @property ?string $flatvalue
+ */
class CustomvarFlat extends Model
{
public function getTableName()
@@ -42,6 +53,20 @@ class CustomvarFlat extends Model
'customvar_id',
'flatname_checksum'
]));
+ $behaviors->add(new class implements RewriteFilterBehavior {
+ public function rewriteCondition(Condition $condition, $relation = null)
+ {
+ if ($condition->metaData()->has('requiresTransformation')) {
+ /** @var string $columnName */
+ $columnName = $condition->metaData()->get('columnName');
+ $nameFilter = Filter::like($relation . 'flatname', $columnName);
+ $class = get_class($condition);
+ $valueFilter = new $class($relation . 'flatvalue', $condition->getValue());
+
+ return Filter::all($nameFilter, $valueFilter);
+ }
+ }
+ });
}
public function createRelations(Relations $relations)
diff --git a/library/Icingadb/Model/Downtime.php b/library/Icingadb/Model/Downtime.php
index 7f600e9..b2ba617 100644
--- a/library/Icingadb/Model/Downtime.php
+++ b/library/Icingadb/Model/Downtime.php
@@ -4,6 +4,7 @@
namespace Icinga\Module\Icingadb\Model;
+use DateTime;
use Icinga\Module\Icingadb\Model\Behavior\BoolCast;
use Icinga\Module\Icingadb\Model\Behavior\ReRoute;
use ipl\Orm\Behavior\Binary;
@@ -12,6 +13,32 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property ?string $triggered_by_id
+ * @property ?string $parent_id
+ * @property string $object_type
+ * @property string $host_id
+ * @property ?string $service_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $author
+ * @property string $comment
+ * @property DateTime $entry_time
+ * @property DateTime $scheduled_start_time
+ * @property DateTime $scheduled_end_time
+ * @property int $scheduled_duration
+ * @property bool $is_flexible
+ * @property int $flexible_duration
+ * @property bool $is_in_effect
+ * @property ?DateTime $start_time
+ * @property ?DateTime $end_time
+ * @property int $duration
+ * @property ?string $scheduled_by
+ * @property ?string $zone_id
+ */
class Downtime extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/DowntimeHistory.php b/library/Icingadb/Model/DowntimeHistory.php
index 7ba992f..b69a097 100644
--- a/library/Icingadb/Model/DowntimeHistory.php
+++ b/library/Icingadb/Model/DowntimeHistory.php
@@ -4,6 +4,7 @@
namespace Icinga\Module\Icingadb\Model;
+use DateTime;
use Icinga\Module\Icingadb\Model\Behavior\BoolCast;
use ipl\Orm\Behavior\Binary;
use ipl\Orm\Behavior\MillisecondTimestamp;
@@ -16,6 +17,29 @@ use ipl\Orm\Relations;
*
* Please note that using this model will fetch history entries for decommissioned services. To avoid this,
* the query needs a `downtime_history.service_id IS NULL OR downtime_history_service.id IS NOT NULL` where.
+ *
+ * @property string $id
+ * @property string $environment_id
+ * @property ?string $endpoint_id
+ * @property ?string $triggered_by_id
+ * @property ?string $parent_id
+ * @property string $object_type
+ * @property string $host_id
+ * @property ?string $service_id
+ * @property DateTime $entry_time
+ * @property string $author
+ * @property ?string $cancelled_by
+ * @property string $comment
+ * @property bool $is_flexible
+ * @property int $flexible_duration
+ * @property DateTime $scheduled_start_time
+ * @property DateTime $scheduled_end_time
+ * @property DateTime $start_time
+ * @property DateTime $end_time
+ * @property ?string $scheduled_by
+ * @property bool $has_been_cancelled
+ * @property DateTime $trigger_time
+ * @property ?DateTime $cancel_time
*/
class DowntimeHistory extends Model
{
@@ -49,6 +73,7 @@ class DowntimeHistory extends Model
'scheduled_end_time',
'start_time',
'end_time',
+ 'scheduled_by',
'has_been_cancelled',
'trigger_time',
'cancel_time'
diff --git a/library/Icingadb/Model/Endpoint.php b/library/Icingadb/Model/Endpoint.php
index 257001b..f8a9b8c 100644
--- a/library/Icingadb/Model/Endpoint.php
+++ b/library/Icingadb/Model/Endpoint.php
@@ -9,6 +9,15 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $zone_id
+ */
class Endpoint extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Environment.php b/library/Icingadb/Model/Environment.php
index 919ca1c..cd82082 100644
--- a/library/Icingadb/Model/Environment.php
+++ b/library/Icingadb/Model/Environment.php
@@ -9,6 +9,10 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $name
+ */
class Environment extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Eventcommand.php b/library/Icingadb/Model/Eventcommand.php
index ad18e22..68c1c06 100644
--- a/library/Icingadb/Model/Eventcommand.php
+++ b/library/Icingadb/Model/Eventcommand.php
@@ -10,6 +10,17 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property ?string $zone_id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $command
+ * @property int $timeout
+ */
class Eventcommand extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/EventcommandArgument.php b/library/Icingadb/Model/EventcommandArgument.php
index 485e5d3..1f60ac2 100644
--- a/library/Icingadb/Model/EventcommandArgument.php
+++ b/library/Icingadb/Model/EventcommandArgument.php
@@ -9,6 +9,22 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $eventcommand_id
+ * @property string $argument_key
+ * @property string $environment_id
+ * @property string $properties_checksum
+ * @property ?string $argument_value
+ * @property ?int $argument_order
+ * @property ?string $description
+ * @property ?string $argument_key_override
+ * @property string $repeat_key
+ * @property string $required
+ * @property ?string $set_if
+ * @property ?string $separator
+ * @property string $skip_key
+ */
class EventcommandArgument extends Model
{
public function getTableName()
@@ -35,6 +51,7 @@ class EventcommandArgument extends Model
'repeat_key',
'required',
'set_if',
+ 'separator',
'skip_key'
];
}
diff --git a/library/Icingadb/Model/EventcommandCustomvar.php b/library/Icingadb/Model/EventcommandCustomvar.php
index 3d1fa48..0da010b 100644
--- a/library/Icingadb/Model/EventcommandCustomvar.php
+++ b/library/Icingadb/Model/EventcommandCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $eventcommand_id
+ * @property string $customvar_id
+ * @property string $environment_id
+ */
class EventcommandCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/EventcommandEnvvar.php b/library/Icingadb/Model/EventcommandEnvvar.php
index 3883bef..2eb8acf 100644
--- a/library/Icingadb/Model/EventcommandEnvvar.php
+++ b/library/Icingadb/Model/EventcommandEnvvar.php
@@ -9,6 +9,14 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $eventcommand_id
+ * @property string $envvar_key
+ * @property string $environment_id
+ * @property string $properties_checksum
+ * @property string $envvar_value
+ */
class EventcommandEnvvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/FlappingHistory.php b/library/Icingadb/Model/FlappingHistory.php
index 69711eb..e060ca6 100644
--- a/library/Icingadb/Model/FlappingHistory.php
+++ b/library/Icingadb/Model/FlappingHistory.php
@@ -4,6 +4,7 @@
namespace Icinga\Module\Icingadb\Model;
+use DateTime;
use ipl\Orm\Behavior\Binary;
use ipl\Orm\Behavior\MillisecondTimestamp;
use ipl\Orm\Behaviors;
@@ -15,6 +16,19 @@ use ipl\Orm\Relations;
*
* Please note that using this model will fetch history entries for decommissioned services. To avoid this,
* the query needs a `flapping_history.service_id IS NULL OR flapping_history_service.id IS NOT NULL` where.
+ *
+ * @property string $id
+ * @property string $environment_id
+ * @property ?string $endpoint_id
+ * @property string $object_type
+ * @property string $host_id
+ * @property ?string $service_id
+ * @property DateTime $start_time
+ * @property ?DateTime $end_time
+ * @property ?float $percent_state_change_start
+ * @property ?float $percent_state_change_end
+ * @property float $flapping_threshold_low
+ * @property float $flapping_threshold_high
*/
class FlappingHistory extends Model
{
diff --git a/library/Icingadb/Model/History.php b/library/Icingadb/Model/History.php
index a34b3bd..3643a22 100644
--- a/library/Icingadb/Model/History.php
+++ b/library/Icingadb/Model/History.php
@@ -4,6 +4,7 @@
namespace Icinga\Module\Icingadb\Model;
+use DateTime;
use Icinga\Module\Icingadb\Model\Behavior\ReRoute;
use ipl\Orm\Behavior\Binary;
use ipl\Orm\Behavior\MillisecondTimestamp;
@@ -16,6 +17,21 @@ use ipl\Orm\Relations;
*
* Please note that using this model will fetch history entries for decommissioned services. To avoid
* this, the query needs a `history.service_id IS NULL OR history_service.id IS NOT NULL` where.
+ *
+ * @property string $id
+ * @property string $environment_id
+ * @property ?string $endpoint_id
+ * @property string $object_type
+ * @property string $host_id
+ * @property ?string $service_id
+ * @property ?string $comment_history_id
+ * @property ?string $downtime_history_id
+ * @property ?string $flapping_history_id
+ * @property ?string $notification_history_id
+ * @property ?string $acknowledgement_history_id
+ * @property ?string $state_history_id
+ * @property string $event_type
+ * @property DateTime $event_time
*/
class History extends Model
{
diff --git a/library/Icingadb/Model/Host.php b/library/Icingadb/Model/Host.php
index e1296c8..c697983 100644
--- a/library/Icingadb/Model/Host.php
+++ b/library/Icingadb/Model/Host.php
@@ -16,6 +16,46 @@ use ipl\Orm\ResultSet;
/**
* Host model.
+ *
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $display_name
+ * @property string $address
+ * @property string $address6
+ * @property ?string $address_bin
+ * @property ?string $address6_bin
+ * @property string $checkcommand_name
+ * @property string $checkcommand_id
+ * @property int $max_check_attempts
+ * @property string $check_timeperiod_name
+ * @property ?string $check_timeperiod_id
+ * @property ?int $check_timeout
+ * @property int $check_interval
+ * @property int $check_retry_interval
+ * @property bool $active_checks_enabled
+ * @property bool $passive_checks_enabled
+ * @property bool $event_handler_enabled
+ * @property bool $notifications_enabled
+ * @property bool $flapping_enabled
+ * @property float $flapping_threshold_low
+ * @property float $flapping_threshold_high
+ * @property bool $perfdata_enabled
+ * @property string $eventcommand_name
+ * @property ?string $eventcommand_id
+ * @property bool $is_volatile
+ * @property ?string $action_url_id
+ * @property ?string $notes_url_id
+ * @property string $notes
+ * @property ?string $icon_image_id
+ * @property string $icon_image_alt
+ * @property string $zone_name
+ * @property ?string $zone_id
+ * @property string $command_endpoint_name
+ * @property ?string $command_endpoint_id
*/
class Host extends Model
{
diff --git a/library/Icingadb/Model/HostCustomvar.php b/library/Icingadb/Model/HostCustomvar.php
index 9f7df26..bda786b 100644
--- a/library/Icingadb/Model/HostCustomvar.php
+++ b/library/Icingadb/Model/HostCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $host_id
+ * @property string $customvar_id
+ * @property string $environment_id
+ */
class HostCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Hostgroup.php b/library/Icingadb/Model/Hostgroup.php
index 97930fa..1ff6f0f 100644
--- a/library/Icingadb/Model/Hostgroup.php
+++ b/library/Icingadb/Model/Hostgroup.php
@@ -10,6 +10,16 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $display_name
+ * @property ?string $zone_id
+ */
class Hostgroup extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/HostgroupCustomvar.php b/library/Icingadb/Model/HostgroupCustomvar.php
index 41272d1..d3dd09b 100644
--- a/library/Icingadb/Model/HostgroupCustomvar.php
+++ b/library/Icingadb/Model/HostgroupCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $hostgroup_id
+ * @property string $customvar_id
+ * @property string $environment_id
+ */
class HostgroupCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/HostgroupMember.php b/library/Icingadb/Model/HostgroupMember.php
index 3660e71..e03db73 100644
--- a/library/Icingadb/Model/HostgroupMember.php
+++ b/library/Icingadb/Model/HostgroupMember.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $host_id
+ * @property string $hostgroup_id
+ * @property string $environment_id
+ */
class HostgroupMember extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Hostgroupsummary.php b/library/Icingadb/Model/Hostgroupsummary.php
index a9295bb..172413e 100644
--- a/library/Icingadb/Model/Hostgroupsummary.php
+++ b/library/Icingadb/Model/Hostgroupsummary.php
@@ -13,6 +13,27 @@ use ipl\Sql\Connection;
use ipl\Sql\Expression;
use ipl\Sql\Select;
+/**
+ * @property string $id
+ * @property string $display_name
+ * @property string $name_ci
+ * @property string $name
+ * @property int $hosts_down_handled
+ * @property int $hosts_down_unhandled
+ * @property int $hosts_pending
+ * @property int $hosts_total
+ * @property int $hosts_up
+ * @property int $hosts_severity
+ * @property int $services_critical_handled
+ * @property int $services_critical_unhandled
+ * @property int $services_ok
+ * @property int $services_pending
+ * @property int $services_total
+ * @property int $services_unknown_handled
+ * @property int $services_unknown_unhandled
+ * @property int $services_warning_handled
+ * @property int $services_warning_unhandled
+ */
class Hostgroupsummary extends UnionModel
{
public static function on(Connection $db)
@@ -55,6 +76,8 @@ class Hostgroupsummary extends UnionModel
public function getColumns()
{
return [
+ 'name' => 'hostgroup_name',
+ 'name_ci' => 'hostgroup_name_ci',
'display_name' => 'hostgroup_display_name',
'hosts_down_handled' => new Expression(
'SUM(CASE WHEN host_state = 1'
@@ -74,7 +97,6 @@ class Hostgroupsummary extends UnionModel
'SUM(CASE WHEN host_state = 0 THEN 1 ELSE 0 END)'
),
'hosts_severity' => new Expression('MAX(host_severity)'),
- 'name' => 'hostgroup_name',
'services_critical_handled' => new Expression(
'SUM(CASE WHEN service_state = 2'
. ' AND (service_handled = \'y\' OR service_reachable = \'n\') THEN 1 ELSE 0 END)'
@@ -113,7 +135,7 @@ class Hostgroupsummary extends UnionModel
public function getSearchColumns()
{
- return ['display_name'];
+ return ['name_ci', 'display_name'];
}
public function getDefaultSort()
@@ -133,6 +155,7 @@ class Hostgroupsummary extends UnionModel
[
'hostgroup_id' => 'hostgroup.id',
'hostgroup_name' => 'hostgroup.name',
+ 'hostgroup_name_ci' => 'hostgroup.name_ci',
'hostgroup_display_name' => 'hostgroup.display_name',
'host_id' => 'host.id',
'host_state' => 'state.soft_state',
@@ -154,6 +177,7 @@ class Hostgroupsummary extends UnionModel
[
'hostgroup_id' => 'hostgroup.id',
'hostgroup_name' => 'hostgroup.name',
+ 'hostgroup_name_ci' => 'hostgroup.name_ci',
'hostgroup_display_name' => 'hostgroup.display_name',
'host_id' => new Expression('NULL'),
'host_state' => new Expression('NULL'),
@@ -172,6 +196,7 @@ class Hostgroupsummary extends UnionModel
[
'hostgroup_id' => 'hostgroup.id',
'hostgroup_name' => 'hostgroup.name',
+ 'hostgroup_name_ci' => 'hostgroup.name_ci',
'hostgroup_display_name' => 'hostgroup.display_name',
'host_id' => new Expression('NULL'),
'host_state' => new Expression('NULL'),
diff --git a/library/Icingadb/Model/HoststateSummary.php b/library/Icingadb/Model/HoststateSummary.php
index 93268f3..3184c28 100644
--- a/library/Icingadb/Model/HoststateSummary.php
+++ b/library/Icingadb/Model/HoststateSummary.php
@@ -7,6 +7,20 @@ namespace Icinga\Module\Icingadb\Model;
use ipl\Sql\Connection;
use ipl\Sql\Expression;
+/**
+ * @property int $hosts_acknowledged
+ * @property int $hosts_active_checks_enabled
+ * @property int $hosts_passive_checks_enabled
+ * @property int $hosts_down_handled
+ * @property int $hosts_down_unhandled
+ * @property int $hosts_event_handler_enabled
+ * @property int $hosts_flapping_enabled
+ * @property int $hosts_notifications_enabled
+ * @property int $hosts_pending
+ * @property int $hosts_problems_unacknowledged
+ * @property int $hosts_total
+ * @property int $hosts_up
+ */
class HoststateSummary extends Host
{
public function getSummaryColumns()
diff --git a/library/Icingadb/Model/IconImage.php b/library/Icingadb/Model/IconImage.php
index 212234a..58f0be6 100644
--- a/library/Icingadb/Model/IconImage.php
+++ b/library/Icingadb/Model/IconImage.php
@@ -9,6 +9,11 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $icon_image
+ * @property string $environment_id
+ */
class IconImage extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Instance.php b/library/Icingadb/Model/Instance.php
index 73db565..716d23d 100644
--- a/library/Icingadb/Model/Instance.php
+++ b/library/Icingadb/Model/Instance.php
@@ -4,6 +4,7 @@
namespace Icinga\Module\Icingadb\Model;
+use DateTime;
use Icinga\Module\Icingadb\Model\Behavior\BoolCast;
use ipl\Orm\Behavior\Binary;
use ipl\Orm\Behavior\MillisecondTimestamp;
@@ -11,6 +12,21 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property ?string $endpoint_id
+ * @property DateTime $heartbeat
+ * @property bool $responsible
+ * @property bool $icinga2_active_host_checks_enabled
+ * @property bool $icinga2_active_service_checks_enabled
+ * @property bool $icinga2_event_handlers_enabled
+ * @property bool $icinga2_flap_detection_enabled
+ * @property bool $icinga2_notifications_enabled
+ * @property bool $icinga2_performance_data_enabled
+ * @property DateTime $icinga2_start_time
+ * @property string $icinga2_version
+ */
class Instance extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/NotesUrl.php b/library/Icingadb/Model/NotesUrl.php
index 5865c52..138eaba 100644
--- a/library/Icingadb/Model/NotesUrl.php
+++ b/library/Icingadb/Model/NotesUrl.php
@@ -10,6 +10,11 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string[] $notes_url
+ * @property string $environment_id
+ */
class NotesUrl extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Notification.php b/library/Icingadb/Model/Notification.php
index 8d42301..4c15d2e 100644
--- a/library/Icingadb/Model/Notification.php
+++ b/library/Icingadb/Model/Notification.php
@@ -11,6 +11,24 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $host_id
+ * @property ?string $service_id
+ * @property string $notificationcommand_id
+ * @property ?int $times_begin
+ * @property ?int $times_end
+ * @property int $notification_interval
+ * @property ?string $timeperiod_id
+ * @property string[] $states
+ * @property string[] $types
+ * @property ?string $zone_id
+ */
class Notification extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/NotificationCustomvar.php b/library/Icingadb/Model/NotificationCustomvar.php
index 620ae5c..655d1de 100644
--- a/library/Icingadb/Model/NotificationCustomvar.php
+++ b/library/Icingadb/Model/NotificationCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $notification_id
+ * @property string $customvar_id
+ * @property string $environment_id
+ */
class NotificationCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/NotificationHistory.php b/library/Icingadb/Model/NotificationHistory.php
index c635dbb..08903ad 100644
--- a/library/Icingadb/Model/NotificationHistory.php
+++ b/library/Icingadb/Model/NotificationHistory.php
@@ -4,6 +4,7 @@
namespace Icinga\Module\Icingadb\Model;
+use DateTime;
use Icinga\Module\Icingadb\Model\Behavior\ReRoute;
use ipl\Orm\Behavior\Binary;
use ipl\Orm\Behavior\MillisecondTimestamp;
@@ -16,6 +17,21 @@ use ipl\Orm\Relations;
*
* Please note that using this model will fetch history entries for decommissioned services. To avoid this, the
* query needs a `notification_history.service_id IS NULL OR notification_history_service.id IS NOT NULL` where.
+ *
+ * @property string $id
+ * @property string $environment_id
+ * @property ?string $endpoint_id
+ * @property string $object_type
+ * @property string $host_id
+ * @property ?string $service_id
+ * @property string $notification_id
+ * @property string $type
+ * @property DateTime $send_time
+ * @property int $state
+ * @property int $previous_hard_state
+ * @property string $author
+ * @property string $text
+ * @property int $users_notified
*/
class NotificationHistory extends Model
{
diff --git a/library/Icingadb/Model/NotificationUser.php b/library/Icingadb/Model/NotificationUser.php
index ab23ad4..efb779c 100644
--- a/library/Icingadb/Model/NotificationUser.php
+++ b/library/Icingadb/Model/NotificationUser.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $notification_id
+ * @property string $user_id
+ * @property string $environment_id
+ */
class NotificationUser extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/NotificationUsergroup.php b/library/Icingadb/Model/NotificationUsergroup.php
index bd60fae..a503337 100644
--- a/library/Icingadb/Model/NotificationUsergroup.php
+++ b/library/Icingadb/Model/NotificationUsergroup.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $notification_id
+ * @property string $usergroup_id
+ * @property string $environment_id
+ */
class NotificationUsergroup extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Notificationcommand.php b/library/Icingadb/Model/Notificationcommand.php
index 6ee2a21..c170aae 100644
--- a/library/Icingadb/Model/Notificationcommand.php
+++ b/library/Icingadb/Model/Notificationcommand.php
@@ -10,6 +10,17 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property ?string $zone_id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $command
+ * @property int $timeout
+ */
class Notificationcommand extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/NotificationcommandArgument.php b/library/Icingadb/Model/NotificationcommandArgument.php
index e855022..e3a5e67 100644
--- a/library/Icingadb/Model/NotificationcommandArgument.php
+++ b/library/Icingadb/Model/NotificationcommandArgument.php
@@ -9,6 +9,22 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $notificationcommand_id
+ * @property string $argument_key
+ * @property string $environment_id
+ * @property string $properties_checksum
+ * @property ?string $argument_value
+ * @property ?int $argument_order
+ * @property ?string $description
+ * @property ?string $argument_key_override
+ * @property string $repeat_key
+ * @property string $required
+ * @property ?string $set_if
+ * @property ?string $separator
+ * @property string $skip_key
+ */
class NotificationcommandArgument extends Model
{
public function getTableName()
@@ -35,6 +51,7 @@ class NotificationcommandArgument extends Model
'repeat_key',
'required',
'set_if',
+ 'separator',
'skip_key'
];
}
diff --git a/library/Icingadb/Model/NotificationcommandCustomvar.php b/library/Icingadb/Model/NotificationcommandCustomvar.php
index bd103f7..f541927 100644
--- a/library/Icingadb/Model/NotificationcommandCustomvar.php
+++ b/library/Icingadb/Model/NotificationcommandCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $notificationcommand_id
+ * @property string $customvar_id
+ * @property string $environment_id
+ */
class NotificationcommandCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/NotificationcommandEnvvar.php b/library/Icingadb/Model/NotificationcommandEnvvar.php
index 09f77b0..0180be6 100644
--- a/library/Icingadb/Model/NotificationcommandEnvvar.php
+++ b/library/Icingadb/Model/NotificationcommandEnvvar.php
@@ -9,6 +9,14 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $notificationcommand_id
+ * @property string $envvar_key
+ * @property string $environment_id
+ * @property string $properties_checksum
+ * @property string $envvar_value
+ */
class NotificationcommandEnvvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Service.php b/library/Icingadb/Model/Service.php
index c57b6ba..1d97b96 100644
--- a/library/Icingadb/Model/Service.php
+++ b/library/Icingadb/Model/Service.php
@@ -14,6 +14,44 @@ use ipl\Orm\Model;
use ipl\Orm\Relations;
use ipl\Orm\ResultSet;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $host_id
+ * @property string $name
+ * @property string $name_ci
+ * @property string $display_name
+ * @property string $checkcommand_name
+ * @property string $checkcommand_id
+ * @property int $max_check_attempts
+ * @property string $check_timeperiod_name
+ * @property ?string $check_timeperiod_id
+ * @property ?int $check_timeout
+ * @property int $check_interval
+ * @property int $check_retry_interval
+ * @property bool $active_checks_enabled
+ * @property bool $passive_checks_enabled
+ * @property bool $event_handler_enabled
+ * @property bool $notifications_enabled
+ * @property bool $flapping_enabled
+ * @property float $flapping_threshold_low
+ * @property float $flapping_threshold_high
+ * @property bool $perfdata_enabled
+ * @property string $eventcommand_name
+ * @property ?string $eventcommand_id
+ * @property bool $is_volatile
+ * @property ?string $action_url_id
+ * @property ?string $notes_url_id
+ * @property string $notes
+ * @property ?string $icon_image_id
+ * @property string $icon_image_alt
+ * @property string $zone_name
+ * @property ?string $zone_id
+ * @property string $command_endpoint_name
+ * @property ?string $command_endpoint_id
+ */
class Service extends Model
{
use Auth;
diff --git a/library/Icingadb/Model/ServiceCustomvar.php b/library/Icingadb/Model/ServiceCustomvar.php
index 07ee84c..ba462f1 100644
--- a/library/Icingadb/Model/ServiceCustomvar.php
+++ b/library/Icingadb/Model/ServiceCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $service_id
+ * @property string $customvar_id
+ * @property string $environment_id
+ */
class ServiceCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/ServiceState.php b/library/Icingadb/Model/ServiceState.php
index c5daa08..1d7dc31 100644
--- a/library/Icingadb/Model/ServiceState.php
+++ b/library/Icingadb/Model/ServiceState.php
@@ -7,6 +7,11 @@ namespace Icinga\Module\Icingadb\Model;
use Icinga\Module\Icingadb\Common\ServiceStates;
use ipl\Orm\Relations;
+/**
+ * Service state model.
+ *
+ * @property string $service_id
+ */
class ServiceState extends State
{
public function getTableName()
diff --git a/library/Icingadb/Model/Servicegroup.php b/library/Icingadb/Model/Servicegroup.php
index 0da92fb..2e4b847 100644
--- a/library/Icingadb/Model/Servicegroup.php
+++ b/library/Icingadb/Model/Servicegroup.php
@@ -10,6 +10,16 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $display_name
+ * @property ?string $zone_id
+ */
class Servicegroup extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/ServicegroupCustomvar.php b/library/Icingadb/Model/ServicegroupCustomvar.php
index 23e536b..01479ee 100644
--- a/library/Icingadb/Model/ServicegroupCustomvar.php
+++ b/library/Icingadb/Model/ServicegroupCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $servicegroup_id
+ * @property string $customvar_id
+ * @property string $environment_id
+ */
class ServicegroupCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/ServicegroupMember.php b/library/Icingadb/Model/ServicegroupMember.php
index 5da537a..80a5054 100644
--- a/library/Icingadb/Model/ServicegroupMember.php
+++ b/library/Icingadb/Model/ServicegroupMember.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $service_id
+ * @property string $servicegroup_id
+ * @property string $environment_id
+ */
class ServicegroupMember extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/ServicegroupSummary.php b/library/Icingadb/Model/ServicegroupSummary.php
index 89a0953..c15ef07 100644
--- a/library/Icingadb/Model/ServicegroupSummary.php
+++ b/library/Icingadb/Model/ServicegroupSummary.php
@@ -13,6 +13,22 @@ use ipl\Sql\Connection;
use ipl\Sql\Expression;
use ipl\Sql\Select;
+/**
+ * @property string $id
+ * @property string $display_name
+ * @property string $name_ci
+ * @property string $name
+ * @property int $services_critical_handled
+ * @property int $services_critical_unhandled
+ * @property int $services_ok
+ * @property int $services_pending
+ * @property int $services_total
+ * @property int $services_unknown_handled
+ * @property int $services_unknown_unhandled
+ * @property int $services_warning_handled
+ * @property int $services_warning_unhandled
+ * @property int $services_severity
+ */
class ServicegroupSummary extends UnionModel
{
public static function on(Connection $db)
@@ -55,8 +71,9 @@ class ServicegroupSummary extends UnionModel
public function getColumns()
{
return [
- 'display_name' => 'servicegroup_display_name',
'name' => 'servicegroup_name',
+ 'name_ci' => 'servicegroup_name_ci',
+ 'display_name' => 'servicegroup_display_name',
'services_critical_handled' => new Expression(
'SUM(CASE WHEN service_state = 2'
. ' AND (service_handled = \'y\' OR service_reachable = \'n\') THEN 1 ELSE 0 END)'
@@ -96,7 +113,7 @@ class ServicegroupSummary extends UnionModel
public function getSearchColumns()
{
- return ['display_name'];
+ return ['name_ci', 'display_name'];
}
public function getDefaultSort()
@@ -116,6 +133,7 @@ class ServicegroupSummary extends UnionModel
[
'servicegroup_id' => 'servicegroup.id',
'servicegroup_name' => 'servicegroup.name',
+ 'servicegroup_name_ci' => 'servicegroup.name_ci',
'servicegroup_display_name' => 'servicegroup.display_name',
'service_id' => 'service.id',
'service_state' => 'state.soft_state',
@@ -130,6 +148,7 @@ class ServicegroupSummary extends UnionModel
[
'servicegroup_id' => 'servicegroup.id',
'servicegroup_name' => 'servicegroup.name',
+ 'servicegroup_name_ci' => 'servicegroup.name_ci',
'servicegroup_display_name' => 'servicegroup.display_name',
'service_id' => new Expression('NULL'),
'service_state' => new Expression('NULL'),
diff --git a/library/Icingadb/Model/ServicestateSummary.php b/library/Icingadb/Model/ServicestateSummary.php
index b1364f7..daf3bec 100644
--- a/library/Icingadb/Model/ServicestateSummary.php
+++ b/library/Icingadb/Model/ServicestateSummary.php
@@ -7,6 +7,24 @@ namespace Icinga\Module\Icingadb\Model;
use ipl\Sql\Connection;
use ipl\Sql\Expression;
+/**
+ * @property int $services_acknowledged
+ * @property int $services_active_checks_enabled
+ * @property int $services_passive_checks_enabled
+ * @property int $services_critical_handled
+ * @property int $services_critical_unhandled
+ * @property int $services_event_handler_enabled
+ * @property int $services_flapping_enabled
+ * @property int $services_notifications_enabled
+ * @property int $services_ok
+ * @property int $services_pending
+ * @property int $services_problems_unacknowledged
+ * @property int $services_total
+ * @property int $services_unknown_handled
+ * @property int $services_unknown_unhandled
+ * @property int $services_warning_handled
+ * @property int $services_warning_unhandled
+ */
class ServicestateSummary extends Service
{
public function getSummaryColumns()
diff --git a/library/Icingadb/Model/State.php b/library/Icingadb/Model/State.php
index 2d242a8..4529c9b 100644
--- a/library/Icingadb/Model/State.php
+++ b/library/Icingadb/Model/State.php
@@ -16,6 +16,7 @@ use ipl\Web\Widget\Icon;
/**
* Base class for the {@link HostState} and {@link ServiceState} models providing common columns.
*
+ * @property string $id
* @property string $environment_id The environment id
* @property string $state_type The state type (hard or soft)
* @property int $soft_state The current soft state code (0 = OK, 1 = WARNING, 2 = CRITICAL, 3 = UNKNOWN)
@@ -44,9 +45,9 @@ use ipl\Web\Widget\Icon;
* @property ?string $check_source The name of the node that executes the check
* @property ?string $scheduling_source The name of the node that schedules the check
* @property ?DateTime $last_update The time when the node was last updated
- * @property ?DateTime $last_state_change The time when the node last got a status change
- * @property ?DateTime $next_check The time when the node will execute the next check
- * @property ?DateTime $next_update The time when the next check of the node is expected to end
+ * @property DateTime $last_state_change The time when the node last got a status change
+ * @property DateTime $next_check The time when the node will execute the next check
+ * @property DateTime $next_update The time when the next check of the node is expected to end
*/
abstract class State extends Model
{
diff --git a/library/Icingadb/Model/StateHistory.php b/library/Icingadb/Model/StateHistory.php
index 9d80cb2..35d0115 100644
--- a/library/Icingadb/Model/StateHistory.php
+++ b/library/Icingadb/Model/StateHistory.php
@@ -4,6 +4,7 @@
namespace Icinga\Module\Icingadb\Model;
+use DateTime;
use ipl\Orm\Behavior\Binary;
use ipl\Orm\Behavior\MillisecondTimestamp;
use ipl\Orm\Behaviors;
@@ -15,6 +16,25 @@ use ipl\Orm\Relations;
*
* Please note that using this model will fetch history entries for decommissioned services. To avoid this,
* the query needs a `state_history.service_id IS NULL OR state_history_service.id IS NOT NULL` where.
+ *
+ * @property string $id
+ * @property string $environment_id
+ * @property ?string $endpoint_id
+ * @property string $object_type
+ * @property string $host_id
+ * @property ?string $service_id
+ * @property DateTime $event_time
+ * @property string $state_type
+ * @property int $soft_state
+ * @property int $hard_state
+ * @property int $check_attempt
+ * @property int $previous_soft_state
+ * @property int $previous_hard_state
+ * @property ?string $output
+ * @property ?string $long_output
+ * @property int $max_check_attempts
+ * @property ?string $check_source
+ * @property ?string $scheduling_source
*/
class StateHistory extends Model
{
diff --git a/library/Icingadb/Model/Timeperiod.php b/library/Icingadb/Model/Timeperiod.php
index 26dd722..e166410 100644
--- a/library/Icingadb/Model/Timeperiod.php
+++ b/library/Icingadb/Model/Timeperiod.php
@@ -10,6 +10,17 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $display_name
+ * @property string $prefer_includes
+ * @property ?string $zone_id
+ */
class Timeperiod extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/TimeperiodCustomvar.php b/library/Icingadb/Model/TimeperiodCustomvar.php
index 614a312..2931068 100644
--- a/library/Icingadb/Model/TimeperiodCustomvar.php
+++ b/library/Icingadb/Model/TimeperiodCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $timeperiod_id
+ * @property string $customvar_id
+ * @property string $environment_id
+ */
class TimeperiodCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/TimeperiodOverrideExclude.php b/library/Icingadb/Model/TimeperiodOverrideExclude.php
index c33df77..2764dfb 100644
--- a/library/Icingadb/Model/TimeperiodOverrideExclude.php
+++ b/library/Icingadb/Model/TimeperiodOverrideExclude.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $timeperiod_id
+ * @property string $override_id
+ * @property string $environment_id
+ */
class TimeperiodOverrideExclude extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/TimeperiodOverrideInclude.php b/library/Icingadb/Model/TimeperiodOverrideInclude.php
index 5418596..b92e9ee 100644
--- a/library/Icingadb/Model/TimeperiodOverrideInclude.php
+++ b/library/Icingadb/Model/TimeperiodOverrideInclude.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $timeperiod_id
+ * @property string $override_id
+ * @property string $environment_id
+ */
class TimeperiodOverrideInclude extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/TimeperiodRange.php b/library/Icingadb/Model/TimeperiodRange.php
index 62e87f8..af94573 100644
--- a/library/Icingadb/Model/TimeperiodRange.php
+++ b/library/Icingadb/Model/TimeperiodRange.php
@@ -9,6 +9,13 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $timeperiod_id
+ * @property string $range_key
+ * @property string $environment_id
+ * @property string $range_value
+ */
class TimeperiodRange extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/User.php b/library/Icingadb/Model/User.php
index 91d0d71..1218de9 100644
--- a/library/Icingadb/Model/User.php
+++ b/library/Icingadb/Model/User.php
@@ -11,6 +11,22 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $display_name
+ * @property string $email
+ * @property string $pager
+ * @property string $notifications_enabled
+ * @property ?string $timeperiod_id
+ * @property string[] $states
+ * @property string[] $types
+ * @property ?string $zone_id
+ */
class User extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/UserCustomvar.php b/library/Icingadb/Model/UserCustomvar.php
index a702b68..883858b 100644
--- a/library/Icingadb/Model/UserCustomvar.php
+++ b/library/Icingadb/Model/UserCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $customvar_id
+ * @property string $user_id
+ * @property string $environment_id
+ */
class UserCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Usergroup.php b/library/Icingadb/Model/Usergroup.php
index 34b0647..281c9ce 100644
--- a/library/Icingadb/Model/Usergroup.php
+++ b/library/Icingadb/Model/Usergroup.php
@@ -10,6 +10,16 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $display_name
+ * @property ?string $zone_id
+ */
class Usergroup extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/UsergroupCustomvar.php b/library/Icingadb/Model/UsergroupCustomvar.php
index ab97273..cdc79bc 100644
--- a/library/Icingadb/Model/UsergroupCustomvar.php
+++ b/library/Icingadb/Model/UsergroupCustomvar.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $usergroup_id
+ * @property string $customvar_id
+ * @property string $environment_id
+ */
class UsergroupCustomvar extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/UsergroupMember.php b/library/Icingadb/Model/UsergroupMember.php
index 7c61d67..7abd5c8 100644
--- a/library/Icingadb/Model/UsergroupMember.php
+++ b/library/Icingadb/Model/UsergroupMember.php
@@ -9,6 +9,12 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $usergroup_id
+ * @property string $user_id
+ * @property string $environment_id
+ */
class UsergroupMember extends Model
{
public function getTableName()
diff --git a/library/Icingadb/Model/Zone.php b/library/Icingadb/Model/Zone.php
index aaf3bbf..04d63ce 100644
--- a/library/Icingadb/Model/Zone.php
+++ b/library/Icingadb/Model/Zone.php
@@ -9,6 +9,17 @@ use ipl\Orm\Behaviors;
use ipl\Orm\Model;
use ipl\Orm\Relations;
+/**
+ * @property string $id
+ * @property string $environment_id
+ * @property string $name_checksum
+ * @property string $properties_checksum
+ * @property string $name
+ * @property string $name_ci
+ * @property string $is_global
+ * @property ?string $parent_id
+ * @property int $depth
+ */
class Zone extends Model
{
public function getTableName()