Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split sap system database aggregates #2445

Merged
merged 10 commits into from
Mar 20, 2024
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Trento.SapSystems.Commands.DeregisterDatabaseInstance do
defmodule Trento.Databases.Commands.DeregisterDatabaseInstance do
@moduledoc """
Deregister (decommission) a database instance from the monitoring system.
"""
Expand All @@ -10,7 +10,7 @@ defmodule Trento.SapSystems.Commands.DeregisterDatabaseInstance do
defcommand do
field :instance_number, :string
field :host_id, Ecto.UUID
field :sap_system_id, Ecto.UUID
field :database_id, Ecto.UUID
field :deregistered_at, :utc_datetime_usec
end
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Trento.SapSystems.Commands.MarkDatabaseInstanceAbsent do
defmodule Trento.Databases.Commands.MarkDatabaseInstanceAbsent do
@moduledoc """
Mark a database instance as absent
"""
Expand All @@ -9,7 +9,7 @@ defmodule Trento.SapSystems.Commands.MarkDatabaseInstanceAbsent do
defcommand do
field :instance_number, :string
field :host_id, Ecto.UUID
field :sap_system_id, Ecto.UUID
field :database_id, Ecto.UUID
field :absent_at, :utc_datetime_usec
end
end
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
defmodule Trento.SapSystems.Commands.RegisterDatabaseInstance do
defmodule Trento.Databases.Commands.RegisterDatabaseInstance do
@moduledoc """
Register a database instance to the monitoring system.
"""

@required_fields [
:sap_system_id,
:database_id,
:sid,
:tenant,
:host_id,
Expand All @@ -20,7 +20,7 @@ defmodule Trento.SapSystems.Commands.RegisterDatabaseInstance do
require Trento.Enums.Health, as: Health

defcommand do
field :sap_system_id, Ecto.UUID
field :database_id, Ecto.UUID
field :sid, :string
field :tenant, :string
field :host_id, Ecto.UUID
Expand Down
Loading
Loading