Documentation ¶
Index ¶
- func GetCommunicator(ctx context.Context, baseRequest BaseRequest) (communicator.NetworkDeviceCommunicator, error)
- type BaseRequest
- type BaseResponse
- type CheckCPULoadRequest
- type CheckDeviceRequest
- type CheckHardwareHealthRequest
- type CheckIdentifyRequest
- type CheckIdentifyResponse
- type CheckInterfaceMetricsRequest
- type CheckMemoryUsageRequest
- type CheckRequest
- type CheckResponse
- type CheckSBCRequest
- type CheckSNMPRequest
- type CheckSNMPResponse
- type CheckTholaServerRequest
- type CheckThresholds
- type CheckUPSRequest
- type DeviceData
- type IdentifyExpectationResult
- type IdentifyRequest
- type IdentifyResponse
- type ReadAvailableComponentsRequest
- type ReadAvailableComponentsResponse
- type ReadCPULoadRequest
- type ReadCPULoadResponse
- type ReadCountInterfacesRequest
- type ReadCountInterfacesResponse
- type ReadHardwareHealthRequest
- type ReadHardwareHealthResponse
- type ReadInterfacesRequest
- type ReadInterfacesResponse
- type ReadMemoryUsageRequest
- type ReadMemoryUsageResponse
- type ReadRequest
- type ReadResponse
- type ReadSBCRequest
- type ReadSBCResponse
- type ReadUPSRequest
- type ReadUPSResponse
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCommunicator ¶
func GetCommunicator(ctx context.Context, baseRequest BaseRequest) (communicator.NetworkDeviceCommunicator, error)
GetCommunicator returns a NetworkDeviceCommunicator for the given device.
Types ¶
type BaseRequest ¶
type BaseRequest struct { // Date of the Device DeviceData DeviceData `json:"device_data" xml:"device_data"` // Timeout for the request (0 => no timeout) Timeout *int `json:"timeout" xml:"timeout"` }
BaseRequest is a generic request that is processed by thola
func (*BaseRequest) GetDeviceData ¶
func (r *BaseRequest) GetDeviceData() *DeviceData
GetDeviceData returns the device data of the request
type BaseResponse ¶
type BaseResponse struct { }
BaseResponse
BaseResponse defines attributes every response has.
swagger:model
func (*BaseResponse) GetExitCode ¶
func (b *BaseResponse) GetExitCode() int
GetExitCode returns the exit code of the response.
type CheckCPULoadRequest ¶ added in v0.1.3
type CheckCPULoadRequest struct { CheckDeviceRequest CPULoadThresholds CheckThresholds `json:"cpuLoadThresholds" xml:"cpuLoadThresholds"` }
CheckCPULoadRequest
CheckCPULoadRequest is a the request struct for the check cpu load request.
swagger:model
type CheckDeviceRequest ¶
type CheckDeviceRequest struct { BaseRequest CheckRequest }
CheckDeviceRequest
CheckDeviceRequest is a the request struct for the check device request.
swagger:model
type CheckHardwareHealthRequest ¶ added in v0.1.4
type CheckHardwareHealthRequest struct {
CheckDeviceRequest
}
CheckHardwareHealthRequest
CheckHardwareHealthRequest is a the request struct for the check sbc request.
swagger:model
type CheckIdentifyRequest ¶
type CheckIdentifyRequest struct { CheckDeviceRequest Expectations device.Device `yaml:"expectations" json:"expectations" xml:"expectations"` OsDiffWarning bool `yaml:"os_diff_warning" json:"os_diff_warning" xml:"os_diff_warning"` VendorDiffWarning bool `yaml:"vendor_diff_warning" json:"vendor_diff_warning" xml:"vendor_diff_warning"` ModelDiffWarning bool `yaml:"model_diff_warning" json:"model_diff_warning" xml:"model_diff_warning"` ModelSeriesDiffWarning bool `yaml:"model_series_diff_warning" json:"model_series_diff_warning" xml:"model_series_diff_warning"` OsVersionDiffWarning bool `yaml:"os_version_diff_warning" json:"os_version_diff_warning" xml:"os_version_diff_warning"` SerialNumberDiffWarning bool `yaml:"serial_number_diff_warning" json:"serial_number_diff_warning" xml:"serial_number_diff_warning"` // contains filtered or unexported fields }
CheckIdentifyRequest
CheckIdentifyRequest is a the request struct for the check identify request.
swagger:model
type CheckIdentifyResponse ¶
type CheckIdentifyResponse struct { CheckResponse IdentifyResult *device.Device `yaml:"identify_result" json:"identify_result" xml:"identify_result"` FailedExpectations map[string]IdentifyExpectationResult `yaml:"failed_expectations" json:"failed_expectations" xml:"failed_expectations"` }
CheckIdentifyResponse is a response struct for the check identify request.
type CheckInterfaceMetricsRequest ¶
type CheckInterfaceMetricsRequest struct { PrintInterfaces bool `yaml:"print_interfaces" json:"print_interfaces" xml:"print_interfaces"` Filter []string `yaml:"filter" json:"filter" xml:"filter"` CheckDeviceRequest }
CheckInterfaceMetricsRequest
CheckInterfaceRequest is a the request struct for the check interface metrics request.
swagger:model
type CheckMemoryUsageRequest ¶ added in v0.1.3
type CheckMemoryUsageRequest struct { CheckDeviceRequest MemoryUsageThresholds CheckThresholds `json:"memoryUsageThresholds" xml:"memoryUsageThresholds"` }
CheckMemoryUsageRequest
CheckMemoryUsageRequest is a the request struct for the check memory usage request.
swagger:model
type CheckRequest ¶
type CheckRequest struct { PrintPerformanceData bool `yaml:"print_performance_data" json:"print_performance_data" xml:"print_performance_data"` JSONMetrics bool `yaml:"json_metrics" json:"json_metrics" xml:"json_metrics"` // contains filtered or unexported fields }
CheckRequest
CheckRequest is a generic response struct for the check request.
swagger:model
type CheckResponse ¶
type CheckResponse struct {
monitoringplugin.ResponseInfo
}
CheckResponse
CheckResponse is a generic response struct for the check plugin format.
swagger:model
func (*CheckResponse) GetExitCode ¶
func (c *CheckResponse) GetExitCode() int
GetExitCode returns the exit code of the response.
func (*CheckResponse) ToCheckPluginOutput ¶
func (c *CheckResponse) ToCheckPluginOutput() ([]byte, error)
ToCheckPluginOutput returns the response in checkplugin format.
type CheckSBCRequest ¶ added in v0.1.4
type CheckSBCRequest struct {
CheckDeviceRequest
}
CheckSBCRequest
CheckSBCRequest is a the request struct for the check sbc request.
swagger:model
type CheckSNMPRequest ¶
type CheckSNMPRequest struct {
CheckDeviceRequest
}
CheckSNMPRequest
CheckSNMPRequest is a the request struct for the check snmp request.
swagger:model
type CheckSNMPResponse ¶
type CheckSNMPResponse struct { CheckResponse SuccessfulSnmpCredentials *network.SNMPCredentials `yaml:"successful_snmp_credentials" json:"successful_snmp_credentials" xml:"successful_snmp_credentials"` }
CheckSNMPResponse is a response struct for the check snmp request.
type CheckTholaServerRequest ¶
type CheckTholaServerRequest struct { CheckRequest Timeout *int `json:"timeout" xml:"timeout"` }
CheckTholaServerRequest
CheckTholaServerRequest is the request struct for the check thola server request.
swagger:model
func (*CheckTholaServerRequest) GetDeviceData ¶
func (r *CheckTholaServerRequest) GetDeviceData() *DeviceData
GetDeviceData returns the device data of the request.
type CheckThresholds ¶ added in v0.1.2
type CheckUPSRequest ¶
type CheckUPSRequest struct { CheckDeviceRequest BatteryCurrentThresholds CheckThresholds `json:"batteryCurrentThresholds" xml:"batteryCurrentThresholds"` BatteryTemperatureThresholds CheckThresholds `json:"batteryTemperatureThresholds" xml:"batteryTemperatureThresholds"` CurrentLoadThresholds CheckThresholds `json:"currentLoadThresholds" xml:"currentLoadThresholds"` RectifierCurrentThresholds CheckThresholds `json:"rectifierCurrentThresholds" xml:"rectifierCurrentThresholds"` SystemVoltageThresholds CheckThresholds `json:"systemVoltageThresholds" xml:"systemVoltageThresholds"` }
CheckUPSRequest
CheckUPSRequest is a the request struct for the check ups request.
swagger:model
type DeviceData ¶
type DeviceData struct { // The IP of the device // // example: 203.0.113.195 IPAddress string `json:"ip_address" xml:"ip_address"` // Data of the connection to the device ConnectionData network.ConnectionData `json:"connection_data" xml:"connection_data"` }
DeviceData
DeviceData includes all data that can be used to contact a device ¶
swagger:model
type IdentifyExpectationResult ¶
type IdentifyExpectationResult struct { Expected string `yaml:"expected" json:"expected" xml:"expected"` Got string `yaml:"got" json:"got" xml:"got"` }
IdentifyExpectationResult is a response struct for the check identify request.
type IdentifyRequest ¶
type IdentifyRequest struct {
BaseRequest
}
IdentifyRequest
IdentifyRequest is a the request struct for the identify request.
swagger:model
type IdentifyResponse ¶
type IdentifyResponse struct { device.Device `yaml:",inline"` BaseResponse `yaml:",inline"` }
IdentifyResponse
IdentifyResponse is the response struct that is for identify requests.
swagger:model
type ReadAvailableComponentsRequest ¶ added in v0.1.2
type ReadAvailableComponentsRequest struct {
ReadRequest
}
ReadAvailableComponentsRequest
ReadAvailableComponentsRequest is a the request struct for the read available-components request.
swagger:model
type ReadAvailableComponentsResponse ¶ added in v0.1.2
type ReadAvailableComponentsResponse struct { AvailableComponents []string `yaml:"availableComponents" json:"availableComponents" xml:"availableComponents"` ReadResponse }
ReadAvailableComponentsResponse
ReadAvailableComponentsResponse is a the response struct for the read available-components response.
swagger:model
type ReadCPULoadRequest ¶ added in v0.1.3
type ReadCPULoadRequest struct {
ReadRequest
}
ReadCPULoadRequest
ReadCPULoadRequest is a the request struct for the read cpu request.
swagger:model
type ReadCPULoadResponse ¶ added in v0.1.3
type ReadCPULoadResponse struct { CPULoad []float64 `yaml:"cpu_load" json:"cpu_load" xml:"cpu_load"` ReadResponse }
ReadCPULoadResponse
ReadCPULoadResponse is a the response struct for the read cpu response.
swagger:model
type ReadCountInterfacesRequest ¶
type ReadCountInterfacesRequest struct {
ReadRequest
}
ReadCountInterfacesRequest
ReadCountInterfacesRequest is a the request struct for the read count-interfaces request.
swagger:model
type ReadCountInterfacesResponse ¶
type ReadCountInterfacesResponse struct { Count int `yaml:"count" json:"count" xml:"count"` ReadResponse }
ReadCountInterfacesResponse
ReadCountInterfacesResponse is a the response struct for the read count-interfaces response.
swagger:model
type ReadHardwareHealthRequest ¶ added in v0.1.4
type ReadHardwareHealthRequest struct {
ReadRequest
}
ReadHardwareHealthRequest
ReadHardwareHealthRequest is a the request struct for the read hardware health request.
swagger:model
type ReadHardwareHealthResponse ¶ added in v0.1.4
type ReadHardwareHealthResponse struct { device.HardwareHealthComponent ReadResponse }
ReadHardwareHealthResponse
ReadHardwareHealthResponse is a the response struct for the read hardware health request.
swagger:model
type ReadInterfacesRequest ¶
type ReadInterfacesRequest struct {
ReadRequest
}
ReadInterfacesRequest
ReadInterfacesRequest is a the request struct for the read interfaces request.
swagger:model
type ReadInterfacesResponse ¶
type ReadInterfacesResponse struct { Interfaces []device.Interface `yaml:"interfaces" json:"interfaces" xml:"interfaces"` ReadResponse }
ReadInterfacesResponse
ReadInterfacesResponse is a the request struct for the read interfaces response.
swagger:model
type ReadMemoryUsageRequest ¶ added in v0.1.3
type ReadMemoryUsageRequest struct {
ReadRequest
}
ReadMemoryUsageRequest
ReadMemoryUsageRequest is a the request struct for the read memory usage request.
swagger:model
type ReadMemoryUsageResponse ¶ added in v0.1.3
type ReadMemoryUsageResponse struct { MemoryUsage float64 `yaml:"memory_usage" json:"memory_usage" xml:"memory_usage"` ReadResponse }
ReadMemoryUsageResponse
ReadMemoryUsageResponse is a the response struct for the read memory usage request.
swagger:model
type ReadRequest ¶
type ReadRequest struct {
BaseRequest
}
ReadRequest
ReadRequest is the response struct that is for read requests.
swagger:model
type ReadResponse ¶
type ReadResponse struct {
BaseResponse
}
ReadResponse
ReadResponse is the response struct that is for read requests.
swagger:model
type ReadSBCRequest ¶ added in v0.1.4
type ReadSBCRequest struct {
ReadRequest
}
ReadSBCRequest
ReadSBCRequest is a the request struct for the read sbc request.
swagger:model
type ReadSBCResponse ¶ added in v0.1.4
type ReadSBCResponse struct { SBC device.SBCComponent `yaml:"sbc" json:"sbc" xml:"sbc"` ReadResponse }
ReadSBCResponse
ReadSBCResponse is a the response struct for the read sbc response.
swagger:model
type ReadUPSRequest ¶
type ReadUPSRequest struct {
ReadRequest
}
ReadUPSRequest
ReadUPSRequest is a the request struct for the read ups request.
swagger:model
type ReadUPSResponse ¶
type ReadUPSResponse struct { UPS device.UPSComponent `yaml:"ups" json:"ups" xml:"ups"` ReadResponse }
ReadUPSResponse
ReadUPSResponse is a the response struct for the read ups response.
swagger:model
Source Files ¶
- base_request.go
- check_cpu_load.go
- check_cpu_load_process.go
- check_device_request.go
- check_hardware_health.go
- check_hardware_health_process.go
- check_identify_request.go
- check_identify_request_process.go
- check_interface_metrics_request.go
- check_interface_metrics_request_process.go
- check_memory_usage.go
- check_memory_usage_process.go
- check_request.go
- check_sbc_request.go
- check_sbc_request_process.go
- check_snmp_request.go
- check_snmp_request_process.go
- check_thola_server_request.go
- check_thola_server_request_process.go
- check_ups.go
- check_ups_process.go
- get_communicator.go
- identify_request.go
- identify_request_process.go
- process_request.go
- read_available_components.go
- read_available_components_process.go
- read_count_interfaces_request.go
- read_count_interfaces_request_process.go
- read_cpu_load.go
- read_cpu_load_process.go
- read_hardware_health_request.go
- read_hardware_health_request_process.go
- read_interfaces_request.go
- read_interfaces_request_process.go
- read_memory_usage.go
- read_memory_usage_process.go
- read_request.go
- read_sbc_request.go
- read_sbc_request_process.go
- read_ups_request.go
- read_ups_request_process.go
- request.go