Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Ok SwStatus OkMsg = "OK" OkExit = 0 // Warning SwStatus WarMsg = "WARNING" WarExit = 1 // Critial SwStatus CriMsg = "CRITICAL" CriExit = 2 // Unknown SwStatus UnkMsg = "UNKNOWN" UnkExit = 3 )
noinspection ALL
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSHTools ¶
type SSHTools struct { Stdout string // contains filtered or unexported fields }
func NewSSHTools ¶
func NewSSHTools(host string, username string, password string, identity string, port int) (*SSHTools, error)
NewSSHTools establish SSH connection to a server and return SSHTools object or nil if an error occurs
func (*SSHTools) CleanStdOutBuffer ¶
func (ict *SSHTools) CleanStdOutBuffer()
func CleanStdOutBuffer Remove consecutive blank char and newline of Stdout
func (*SSHTools) SendSSH ¶
func SendSSH Send command to remote SSH server and save Output in Stdout noinspection GoUnhandledErrorResult
func (*SSHTools) SendSSHhasPTY ¶
SendSSHhasPTY send multiple command to remote SSH session simulating a "human" ssh connection SendSSH must be preferred as SendSSHhasPTY, if prompt is misconfigured function will block noinspection GoUnhandledErrorResult
type SwitchInterface ¶
type SwitchInterfaceStatus ¶
type SwitchInterfaceStatus struct { Port string Name string Status string Vlan string Duplex string Speed string Type string }
Start Definition for switch monitoring
func (SwitchInterfaceStatus) String ¶
func (sws SwitchInterfaceStatus) String() string
String to display/print Switch
type SwitchStatus ¶
type SwitchStatus struct { Name string SwStatus []SwitchInterfaceStatus }
Click to show internal directories.
Click to hide internal directories.