199 lines
5.6 KiB
Elixir
199 lines
5.6 KiB
Elixir
defmodule Towerops.Agent.AgentConfig do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.AgentConfig",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :version, 1, type: :string
|
|
field :poll_interval_seconds, 2, type: :uint32, json_name: "pollIntervalSeconds"
|
|
field :equipment, 3, repeated: true, type: Towerops.Agent.Equipment
|
|
end
|
|
|
|
defmodule Towerops.Agent.Equipment do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.Equipment",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :id, 1, type: :string
|
|
field :name, 2, type: :string
|
|
field :ip_address, 3, type: :string, json_name: "ipAddress"
|
|
field :snmp, 4, type: Towerops.Agent.SnmpConfig
|
|
field :poll_interval_seconds, 5, type: :uint32, json_name: "pollIntervalSeconds"
|
|
field :sensors, 6, repeated: true, type: Towerops.Agent.Sensor
|
|
field :interfaces, 7, repeated: true, type: Towerops.Agent.Interface
|
|
end
|
|
|
|
defmodule Towerops.Agent.SnmpConfig do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.SnmpConfig",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :enabled, 1, type: :bool
|
|
field :version, 2, type: :string
|
|
field :community, 3, type: :string
|
|
field :port, 4, type: :uint32
|
|
end
|
|
|
|
defmodule Towerops.Agent.Sensor.MetadataEntry do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.Sensor.MetadataEntry",
|
|
map: true,
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :key, 1, type: :string
|
|
field :value, 2, type: :string
|
|
end
|
|
|
|
defmodule Towerops.Agent.Sensor do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.Sensor",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :id, 1, type: :string
|
|
field :type, 2, type: :string
|
|
field :oid, 3, type: :string
|
|
field :divisor, 4, type: :double
|
|
field :unit, 5, type: :string
|
|
field :metadata, 6, repeated: true, type: Towerops.Agent.Sensor.MetadataEntry, map: true
|
|
end
|
|
|
|
defmodule Towerops.Agent.Interface do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.Interface",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :id, 1, type: :string
|
|
field :if_index, 2, type: :uint32, json_name: "ifIndex"
|
|
field :if_name, 3, type: :string, json_name: "ifName"
|
|
end
|
|
|
|
defmodule Towerops.Agent.MetricBatch do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.MetricBatch",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :metrics, 1, repeated: true, type: Towerops.Agent.Metric
|
|
end
|
|
|
|
defmodule Towerops.Agent.Metric do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.Metric",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
oneof(:metric_type, 0)
|
|
|
|
field :sensor_reading, 1,
|
|
type: Towerops.Agent.SensorReading,
|
|
json_name: "sensorReading",
|
|
oneof: 0
|
|
|
|
field :interface_stat, 2,
|
|
type: Towerops.Agent.InterfaceStat,
|
|
json_name: "interfaceStat",
|
|
oneof: 0
|
|
|
|
field :neighbor_discovery, 3,
|
|
type: Towerops.Agent.NeighborDiscovery,
|
|
json_name: "neighborDiscovery",
|
|
oneof: 0
|
|
end
|
|
|
|
defmodule Towerops.Agent.SensorReading do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.SensorReading",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :sensor_id, 1, type: :string, json_name: "sensorId"
|
|
field :value, 2, type: :double
|
|
field :status, 3, type: :string
|
|
field :timestamp, 4, type: :int64
|
|
end
|
|
|
|
defmodule Towerops.Agent.InterfaceStat do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.InterfaceStat",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :interface_id, 1, type: :string, json_name: "interfaceId"
|
|
field :if_in_octets, 2, type: :int64, json_name: "ifInOctets"
|
|
field :if_out_octets, 3, type: :int64, json_name: "ifOutOctets"
|
|
field :if_in_errors, 4, type: :int64, json_name: "ifInErrors"
|
|
field :if_out_errors, 5, type: :int64, json_name: "ifOutErrors"
|
|
field :if_in_discards, 6, type: :int64, json_name: "ifInDiscards"
|
|
field :if_out_discards, 7, type: :int64, json_name: "ifOutDiscards"
|
|
field :timestamp, 8, type: :int64
|
|
end
|
|
|
|
defmodule Towerops.Agent.NeighborDiscovery do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.NeighborDiscovery",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :interface_id, 1, type: :string, json_name: "interfaceId"
|
|
field :protocol, 2, type: :string
|
|
field :remote_chassis_id, 3, type: :string, json_name: "remoteChassisId"
|
|
field :remote_system_name, 4, type: :string, json_name: "remoteSystemName"
|
|
field :remote_system_description, 5, type: :string, json_name: "remoteSystemDescription"
|
|
field :remote_platform, 6, type: :string, json_name: "remotePlatform"
|
|
field :remote_port_id, 7, type: :string, json_name: "remotePortId"
|
|
field :remote_port_description, 8, type: :string, json_name: "remotePortDescription"
|
|
field :remote_address, 9, type: :string, json_name: "remoteAddress"
|
|
field :remote_capabilities, 10, repeated: true, type: :string, json_name: "remoteCapabilities"
|
|
field :timestamp, 11, type: :int64
|
|
end
|
|
|
|
defmodule Towerops.Agent.HeartbeatMetadata do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.HeartbeatMetadata",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :version, 1, type: :string
|
|
field :hostname, 2, type: :string
|
|
field :uptime_seconds, 3, type: :uint64, json_name: "uptimeSeconds"
|
|
end
|
|
|
|
defmodule Towerops.Agent.HeartbeatResponse do
|
|
@moduledoc false
|
|
|
|
use Protobuf,
|
|
full_name: "towerops.agent.HeartbeatResponse",
|
|
protoc_gen_elixir_version: "0.16.0",
|
|
syntax: :proto3
|
|
|
|
field :status, 1, type: :string
|
|
end
|