Documentation
¶
Index ¶
- type Agent
- type Agents
- type Console
- type ConsolePages
- type Consoles
- type Endpoint
- type Endpoints
- type Engine
- type Engines
- type ErrorResponse
- type HTTPError
- type Lab
- type Labs
- type ManagementClient
- func (c *ManagementClient) AddAgentToLab(labID, agentID int) error
- func (c *ManagementClient) AddEndpointToEngine(engineID, endpointID int) error
- func (c *ManagementClient) AddEngineToAgent(agentID, engineID int) error
- func (c *ManagementClient) AddSelectorToAgent(agentID, selectorID int) (Agent, error)
- func (c *ManagementClient) AddTagToAgent(agentID, tagID int) error
- func (c *ManagementClient) AddTagToEndpoint(endpointID, tagID int) error
- func (c *ManagementClient) AddTagToEngine(engineID, tagID int) error
- func (c *ManagementClient) AddTagToLab(labID, tagID int) error
- func (c *ManagementClient) AddTagToUser(userID, tagID int) error
- func (c *ManagementClient) AddUserToEngine(engineID, userID int) error
- func (c *ManagementClient) CreateAgent(name, dataDir string) (Agent, error)
- func (c *ManagementClient) CreateAgentWithTag(name, dataDir string, tagID int) (Agent, error)
- func (c *ManagementClient) CreateEndpoint(name, address, protocol string) (Endpoint, error)
- func (c *ManagementClient) CreateEndpointWithTag(name, address, protocol string, tagID int) (Endpoint, error)
- func (c *ManagementClient) CreateEngine(name, engineID string) (Engine, error)
- func (c *ManagementClient) CreateEngineWithTag(name, engineID string, tagID int) (Engine, error)
- func (c *ManagementClient) CreateLab(name string) (Lab, error)
- func (c *ManagementClient) CreateLabWithTag(name string, tagID int) (Lab, error)
- func (c *ManagementClient) CreateSelector(comment, template string) (Selector, error)
- func (c *ManagementClient) CreateTag(name, description string) (Tag, error)
- func (c *ManagementClient) CreateUser(user, name, authKey, authProto, privKey, privProto string) (User, error)
- func (c *ManagementClient) CreateUserWithTag(user, name, authKey, authProto, privKey, privProto string, tagID int) (User, error)
- func (c *ManagementClient) DeleteAgent(id int) error
- func (c *ManagementClient) DeleteAllObjectsWithTag(tagID int) (Tag, error)
- func (c *ManagementClient) DeleteEndpoint(id int) error
- func (c *ManagementClient) DeleteEngine(id int) error
- func (c *ManagementClient) DeleteLab(id int) error
- func (c *ManagementClient) DeleteRecordFile(remotePath string) error
- func (c *ManagementClient) DeleteSelector(id int) error
- func (c *ManagementClient) DeleteTag(id int) error
- func (c *ManagementClient) DeleteUser(id int) error
- func (c *ManagementClient) GetAgent(id int) (Agent, error)
- func (c *ManagementClient) GetAgents(filters map[string]string) (Agents, error)
- func (c *ManagementClient) GetEndpoint(id int) (Endpoint, error)
- func (c *ManagementClient) GetEndpoints(filters map[string]string) (Endpoints, error)
- func (c *ManagementClient) GetEngine(id int) (Engine, error)
- func (c *ManagementClient) GetEngines(filter map[string]string) (Engines, error)
- func (c *ManagementClient) GetLab(id int) (Lab, error)
- func (c *ManagementClient) GetLabs(filter map[string]string) (Labs, error)
- func (c *ManagementClient) GetRecordFile(remotePath string) (string, error)
- func (c *ManagementClient) GetRecordFiles() (Recordings, error)
- func (c *ManagementClient) GetSelector(id int) (Selector, error)
- func (c *ManagementClient) GetSelectors() (Selectors, error)
- func (c *ManagementClient) GetTag(id int) (Tag, error)
- func (c *ManagementClient) GetTags(filters map[string]string) (Tags, error)
- func (c *ManagementClient) GetUser(id int) (User, error)
- func (c *ManagementClient) GetUsers(filters map[string]string) (Users, error)
- func (c *ManagementClient) RemoveAgentFromLab(labID, agentID int) error
- func (c *ManagementClient) RemoveEndpointFromEngine(engineID, endpointID int) error
- func (c *ManagementClient) RemoveEngineFromAgent(agentID, engineID int) error
- func (c *ManagementClient) RemoveSelectorFromAgent(agentID, selectorID int) (Agent, error)
- func (c *ManagementClient) RemoveTagFromAgent(agentID, tagID int) error
- func (c *ManagementClient) RemoveTagFromEndpoint(endpointID, tagID int) error
- func (c *ManagementClient) RemoveTagFromEngine(engineID, tagID int) error
- func (c *ManagementClient) RemoveTagFromLab(labID, tagID int) error
- func (c *ManagementClient) RemoveTagFromUser(userID, tagID int) error
- func (c *ManagementClient) RemoveUserFromEngine(engineID, userID int) error
- func (c *ManagementClient) SetLabPower(labID int, power bool) error
- func (c *ManagementClient) SetTimeout(timeout time.Duration)
- func (c *ManagementClient) SetUsernameAndPassword(username, password string) error
- func (c *ManagementClient) UploadRecordFile(localPath, remotePath string) error
- func (c *ManagementClient) UploadRecordFileString(recordContents *string, remotePath string) error
- type MessageFilters
- type MessageMetrics
- type MetricsClient
- func (c *MetricsClient) GetMessageFilters() (MessageFilters, error)
- func (c *MetricsClient) GetMessages(filters map[string]string) (MessageMetrics, error)
- func (c *MetricsClient) GetPacketFilters() (PacketFilters, error)
- func (c *MetricsClient) GetPackets(filters map[string]string) (PacketMetrics, error)
- func (c *MetricsClient) GetPossibleValuesForMessageFilter(filter string) ([]string, error)
- func (c *MetricsClient) GetPossibleValuesForPacketFilter(filter string) ([]string, error)
- func (c *MetricsClient) GetProcess(id int) (ProcessMetrics, error)
- func (c *MetricsClient) GetProcessConsolePage(processID int, pageID int) (Console, error)
- func (c *MetricsClient) GetProcessConsolePages(processID int) (Consoles, error)
- func (c *MetricsClient) GetProcessEndpoint(processID int, endpointID int) (ProcessEndpoint, error)
- func (c *MetricsClient) GetProcessEndpoints(id int) (ProcessEndpoints, error)
- func (c *MetricsClient) GetProcesses(filters map[string]string) (ProcessesMetrics, error)
- func (c *MetricsClient) SetTimeout(timeout time.Duration)
- func (c *MetricsClient) SetUsernameAndPassword(username, password string) error
- type NotValidError
- type PacketFilters
- type PacketMetrics
- type ProcessEndpoint
- type ProcessEndpoints
- type ProcessLifeCycle
- type ProcessMetrics
- type ProcessesMetrics
- type Recording
- type Recordings
- type Selector
- type Selectors
- type Supervisor
- type Tag
- type Tags
- type User
- type Users
- type Variation
- type Variations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { ID int `json:"id"` Name string `json:"name"` DataDir string `json:"data_dir"` Engines Engines `json:"engines"` Selectors Selectors `json:"selectors"` Tags Tags `json:"tags"` }
Agent - Represents SNMP agent. Consists of SNMP engine and transport endpoints it binds.
type Console ¶
type Console struct { ID int `json:"id"` Timestamp string `json:"timestamp"` Text string `json:"text"` }
Console - contains information regarding the console
type ConsolePages ¶
ConsolePages - contains information regarding snmpsim consoles
type Endpoint ¶
type Endpoint struct { ID int `json:"id"` Name string `json:"name"` Protocol string `json:"protocol"` Address string `json:"address"` Tags Tags `json:"tags"` }
Endpoint - SNMP transport endpoint object. Each SNMP engine can bind one or more transport endpoints. Each transport endpoint can only be bound by one SNMP engine.
type Engine ¶
type Engine struct { ID int `json:"id"` Name string `json:"name"` EngineID string `json:"engine_id"` Endpoints Endpoints `json:"endpoints"` Users Users `json:"users"` Tags Tags `json:"tags"` }
Engine - Represents a unique, independent and fully operational SNMP engine, though not yet attached to any transport endpoints.
type ErrorResponse ¶
ErrorResponse contains error information.
type HTTPError ¶
type HTTPError struct { StatusCode int Status string Body *ErrorResponse }
HTTPError represents an http error returned by the api.
type Lab ¶
type Lab struct { ID int `json:"id"` Name string `json:"name"` Power string `json:"power"` Agents Agents `json:"agents"` Tags Tags `json:"tags"` }
Lab - Group of SNMP agents belonging to the same virtual laboratory. Some operations can be applied to them all at once.
type ManagementClient ¶
type ManagementClient struct {
// contains filtered or unexported fields
}
ManagementClient is a client for communicating with the management api.
func NewManagementClient ¶
func NewManagementClient(baseURL string) (*ManagementClient, error)
NewManagementClient creates a new ManagementClient.
func (*ManagementClient) AddAgentToLab ¶
func (c *ManagementClient) AddAgentToLab(labID, agentID int) error
AddAgentToLab adds an Agent to a Lab.
func (*ManagementClient) AddEndpointToEngine ¶
func (c *ManagementClient) AddEndpointToEngine(engineID, endpointID int) error
AddEndpointToEngine adds an Endpoint to an Engine.
func (*ManagementClient) AddEngineToAgent ¶
func (c *ManagementClient) AddEngineToAgent(agentID, engineID int) error
AddEngineToAgent adds an Engine to an Agent.
func (*ManagementClient) AddSelectorToAgent ¶
func (c *ManagementClient) AddSelectorToAgent(agentID, selectorID int) (Agent, error)
AddSelectorToAgent adds a Selector to an Agent.
func (*ManagementClient) AddTagToAgent ¶
func (c *ManagementClient) AddTagToAgent(agentID, tagID int) error
AddTagToAgent adds a tag to a agent.
func (*ManagementClient) AddTagToEndpoint ¶
func (c *ManagementClient) AddTagToEndpoint(endpointID, tagID int) error
AddTagToEndpoint adds a tag to a endpoint.
func (*ManagementClient) AddTagToEngine ¶
func (c *ManagementClient) AddTagToEngine(engineID, tagID int) error
AddTagToEngine adds a tag to a engine.
func (*ManagementClient) AddTagToLab ¶
func (c *ManagementClient) AddTagToLab(labID, tagID int) error
AddTagToLab adds a tag to a lab.
func (*ManagementClient) AddTagToUser ¶
func (c *ManagementClient) AddTagToUser(userID, tagID int) error
AddTagToUser adds a tag to a user.
func (*ManagementClient) AddUserToEngine ¶
func (c *ManagementClient) AddUserToEngine(engineID, userID int) error
AddUserToEngine adds an User to an Engine
func (*ManagementClient) CreateAgent ¶
func (c *ManagementClient) CreateAgent(name, dataDir string) (Agent, error)
CreateAgent creates a new agent.
func (*ManagementClient) CreateAgentWithTag ¶
func (c *ManagementClient) CreateAgentWithTag(name, dataDir string, tagID int) (Agent, error)
CreateAgentWithTag creates a new agent tagged with the given tag.
func (*ManagementClient) CreateEndpoint ¶
func (c *ManagementClient) CreateEndpoint(name, address, protocol string) (Endpoint, error)
CreateEndpoint creates a new endpoint.
func (*ManagementClient) CreateEndpointWithTag ¶
func (c *ManagementClient) CreateEndpointWithTag(name, address, protocol string, tagID int) (Endpoint, error)
CreateEndpointWithTag creates a new endpoint tagged with the given tag.
func (*ManagementClient) CreateEngine ¶
func (c *ManagementClient) CreateEngine(name, engineID string) (Engine, error)
CreateEngine creates a new engine.
func (*ManagementClient) CreateEngineWithTag ¶
func (c *ManagementClient) CreateEngineWithTag(name, engineID string, tagID int) (Engine, error)
CreateEngineWithTag creates a new engine tagged with the given tag.
func (*ManagementClient) CreateLab ¶
func (c *ManagementClient) CreateLab(name string) (Lab, error)
CreateLab creates a new lab.
func (*ManagementClient) CreateLabWithTag ¶
func (c *ManagementClient) CreateLabWithTag(name string, tagID int) (Lab, error)
CreateLabWithTag creates a new lab tagged with the given tag.
func (*ManagementClient) CreateSelector ¶
func (c *ManagementClient) CreateSelector(comment, template string) (Selector, error)
CreateSelector creates a new selector.
func (*ManagementClient) CreateTag ¶
func (c *ManagementClient) CreateTag(name, description string) (Tag, error)
CreateTag creates a new tag.
func (*ManagementClient) CreateUser ¶
func (c *ManagementClient) CreateUser(user, name, authKey, authProto, privKey, privProto string) (User, error)
CreateUser creates a new user.
func (*ManagementClient) CreateUserWithTag ¶
func (c *ManagementClient) CreateUserWithTag(user, name, authKey, authProto, privKey, privProto string, tagID int) (User, error)
CreateUserWithTag creates a new user tagged with the given tag.
func (*ManagementClient) DeleteAgent ¶
func (c *ManagementClient) DeleteAgent(id int) error
DeleteAgent deletes the agent with the given id.
func (*ManagementClient) DeleteAllObjectsWithTag ¶
func (c *ManagementClient) DeleteAllObjectsWithTag(tagID int) (Tag, error)
DeleteAllObjectsWithTag deletes all objects with the given tag.
func (*ManagementClient) DeleteEndpoint ¶
func (c *ManagementClient) DeleteEndpoint(id int) error
DeleteEndpoint the Lab with the given id.
func (*ManagementClient) DeleteEngine ¶
func (c *ManagementClient) DeleteEngine(id int) error
DeleteEngine deletes the engine with the given id.
func (*ManagementClient) DeleteLab ¶
func (c *ManagementClient) DeleteLab(id int) error
DeleteLab deletes the Lab with the given id.
func (*ManagementClient) DeleteRecordFile ¶
func (c *ManagementClient) DeleteRecordFile(remotePath string) error
DeleteRecordFile deletes the record file at the given path.
func (*ManagementClient) DeleteSelector ¶
func (c *ManagementClient) DeleteSelector(id int) error
DeleteSelector deletes the selector with the given id.
func (*ManagementClient) DeleteTag ¶
func (c *ManagementClient) DeleteTag(id int) error
DeleteTag deletes the tag with the given id.
func (*ManagementClient) DeleteUser ¶
func (c *ManagementClient) DeleteUser(id int) error
DeleteUser deletes the user with the given id.
func (*ManagementClient) GetAgent ¶
func (c *ManagementClient) GetAgent(id int) (Agent, error)
GetAgent returns the agent with the given id.
func (*ManagementClient) GetAgents ¶
func (c *ManagementClient) GetAgents(filters map[string]string) (Agents, error)
GetAgents returns a list of agents, optionally filtered.
func (*ManagementClient) GetEndpoint ¶
func (c *ManagementClient) GetEndpoint(id int) (Endpoint, error)
GetEndpoint returns the endpoint with the given id.
func (*ManagementClient) GetEndpoints ¶
func (c *ManagementClient) GetEndpoints(filters map[string]string) (Endpoints, error)
GetEndpoints returns a list of endpoints, optionally filtered.
func (*ManagementClient) GetEngine ¶
func (c *ManagementClient) GetEngine(id int) (Engine, error)
GetEngine returns the engine with the given id.
func (*ManagementClient) GetEngines ¶
func (c *ManagementClient) GetEngines(filter map[string]string) (Engines, error)
GetEngines returns a list of all engines.
func (*ManagementClient) GetLab ¶
func (c *ManagementClient) GetLab(id int) (Lab, error)
GetLab returns the lab with the given id.
func (*ManagementClient) GetLabs ¶
func (c *ManagementClient) GetLabs(filter map[string]string) (Labs, error)
GetLabs returns a list of labs, optionally filtered.
func (*ManagementClient) GetRecordFile ¶
func (c *ManagementClient) GetRecordFile(remotePath string) (string, error)
GetRecordFile returns the record file at the given path.
func (*ManagementClient) GetRecordFiles ¶
func (c *ManagementClient) GetRecordFiles() (Recordings, error)
GetRecordFiles returns a list of all record files.
func (*ManagementClient) GetSelector ¶
func (c *ManagementClient) GetSelector(id int) (Selector, error)
GetSelector returns the selector with the given id.
func (*ManagementClient) GetSelectors ¶
func (c *ManagementClient) GetSelectors() (Selectors, error)
GetSelectors returns a list of all selectors.
func (*ManagementClient) GetTag ¶
func (c *ManagementClient) GetTag(id int) (Tag, error)
GetTag returns the lab with the given id.
func (*ManagementClient) GetTags ¶
func (c *ManagementClient) GetTags(filters map[string]string) (Tags, error)
GetTags returns a list of users, optionally filtered.
func (*ManagementClient) GetUser ¶
func (c *ManagementClient) GetUser(id int) (User, error)
GetUser returns the user with the given id.
func (*ManagementClient) GetUsers ¶
func (c *ManagementClient) GetUsers(filters map[string]string) (Users, error)
GetUsers returns a list of users, optionally filtered.
func (*ManagementClient) RemoveAgentFromLab ¶
func (c *ManagementClient) RemoveAgentFromLab(labID, agentID int) error
RemoveAgentFromLab removes an Agent from a Lab.
func (*ManagementClient) RemoveEndpointFromEngine ¶
func (c *ManagementClient) RemoveEndpointFromEngine(engineID, endpointID int) error
RemoveEndpointFromEngine removes an Endpoint from an Engine.
func (*ManagementClient) RemoveEngineFromAgent ¶
func (c *ManagementClient) RemoveEngineFromAgent(agentID, engineID int) error
RemoveEngineFromAgent removes an Engine from an Agent.
func (*ManagementClient) RemoveSelectorFromAgent ¶
func (c *ManagementClient) RemoveSelectorFromAgent(agentID, selectorID int) (Agent, error)
RemoveSelectorFromAgent removes a Selector from an Agent.
func (*ManagementClient) RemoveTagFromAgent ¶
func (c *ManagementClient) RemoveTagFromAgent(agentID, tagID int) error
RemoveTagFromAgent removes a tag from a agent.
func (*ManagementClient) RemoveTagFromEndpoint ¶
func (c *ManagementClient) RemoveTagFromEndpoint(endpointID, tagID int) error
RemoveTagFromEndpoint removes a tag from a endpoint.
func (*ManagementClient) RemoveTagFromEngine ¶
func (c *ManagementClient) RemoveTagFromEngine(engineID, tagID int) error
RemoveTagFromEngine removes a tag from a engine.
func (*ManagementClient) RemoveTagFromLab ¶
func (c *ManagementClient) RemoveTagFromLab(labID, tagID int) error
RemoveTagFromLab removes a tag from a lab.
func (*ManagementClient) RemoveTagFromUser ¶
func (c *ManagementClient) RemoveTagFromUser(userID, tagID int) error
RemoveTagFromUser removes a tag from a user.
func (*ManagementClient) RemoveUserFromEngine ¶
func (c *ManagementClient) RemoveUserFromEngine(engineID, userID int) error
RemoveUserFromEngine removes an User from an Engine.
func (*ManagementClient) SetLabPower ¶
func (c *ManagementClient) SetLabPower(labID int, power bool) error
SetLabPower activates or deactivates a lab.
func (*ManagementClient) SetTimeout ¶
SetTimeout can be used to set a timeout for requests raised from client.
func (*ManagementClient) SetUsernameAndPassword ¶
SetUsernameAndPassword is used to set a username and password for https auth
func (*ManagementClient) UploadRecordFile ¶
func (c *ManagementClient) UploadRecordFile(localPath, remotePath string) error
UploadRecordFile uploads the given record file to the api and saves it at the given remote path inside of the data dir.
func (*ManagementClient) UploadRecordFileString ¶
func (c *ManagementClient) UploadRecordFileString(recordContents *string, remotePath string) error
UploadRecordFileString uploads the given record data to the api and saves it as a .snmprec file at the given remote path inside of the data dir.
type MessageFilters ¶
type MessageFilters filters
MessageFilters resembles the response structure of GetMessageFilters
type MessageMetrics ¶
type MessageMetrics struct { FirstHit *int `json:"first_hit"` LastHit *int `json:"last_hit"` Pdus *int64 `json:"pdus"` VarBinds *int64 `json:"var_binds"` Failures *int64 `json:"failures"` Variations Variations `json:"variations"` }
MessageMetrics - SNMP message level metrics.
type MetricsClient ¶
type MetricsClient struct {
// contains filtered or unexported fields
}
MetricsClient is a client for communicating with the metrics api.
func NewMetricsClient ¶
func NewMetricsClient(baseURL string) (*MetricsClient, error)
NewMetricsClient creates a new NewMetricsClient.
func (*MetricsClient) GetMessageFilters ¶
func (c *MetricsClient) GetMessageFilters() (MessageFilters, error)
GetMessageFilters returns all message filters.
func (*MetricsClient) GetMessages ¶
func (c *MetricsClient) GetMessages(filters map[string]string) (MessageMetrics, error)
GetMessages returns message metrics.
func (*MetricsClient) GetPacketFilters ¶
func (c *MetricsClient) GetPacketFilters() (PacketFilters, error)
GetPacketFilters returns all packet filters.
func (*MetricsClient) GetPackets ¶
func (c *MetricsClient) GetPackets(filters map[string]string) (PacketMetrics, error)
GetPackets returns packet metrics.
func (*MetricsClient) GetPossibleValuesForMessageFilter ¶
func (c *MetricsClient) GetPossibleValuesForMessageFilter(filter string) ([]string, error)
GetPossibleValuesForMessageFilter returns a list of all values that can be used for the given filter.
func (*MetricsClient) GetPossibleValuesForPacketFilter ¶
func (c *MetricsClient) GetPossibleValuesForPacketFilter(filter string) ([]string, error)
GetPossibleValuesForPacketFilter returns a list of all values that can be used for the given filter.
func (*MetricsClient) GetProcess ¶
func (c *MetricsClient) GetProcess(id int) (ProcessMetrics, error)
GetProcess returns the process with the given id.
func (*MetricsClient) GetProcessConsolePage ¶
func (c *MetricsClient) GetProcessConsolePage(processID int, pageID int) (Console, error)
GetProcessConsolePage returns the console-pages for the given process- and console-page-id.
func (*MetricsClient) GetProcessConsolePages ¶
func (c *MetricsClient) GetProcessConsolePages(processID int) (Consoles, error)
GetProcessConsolePages returns an array of console-pages for the given process-id.
func (*MetricsClient) GetProcessEndpoint ¶
func (c *MetricsClient) GetProcessEndpoint(processID int, endpointID int) (ProcessEndpoint, error)
GetProcessEndpoint returns the endpoint for the given process- and endpoint-id.
func (*MetricsClient) GetProcessEndpoints ¶
func (c *MetricsClient) GetProcessEndpoints(id int) (ProcessEndpoints, error)
GetProcessEndpoints returns an array of endpoints for the given process-id.
func (*MetricsClient) GetProcesses ¶
func (c *MetricsClient) GetProcesses(filters map[string]string) (ProcessesMetrics, error)
GetProcesses returns process metrics.
func (*MetricsClient) SetTimeout ¶
SetTimeout can be used to set a timeout for requests raised from client.
func (*MetricsClient) SetUsernameAndPassword ¶
SetUsernameAndPassword is used to set a username and password for https auth
type NotValidError ¶
type NotValidError struct{}
NotValidError is returned when the client was not initialized properly with the NewManagementClient() func
func (*NotValidError) Error ¶
func (m *NotValidError) Error() string
type PacketFilters ¶
type PacketFilters filters
PacketFilters resembles the response structure of GetPacketFilters
type PacketMetrics ¶
type PacketMetrics struct { FirstHit *int `json:"first_hit"` LastHit *int `json:"last_hit"` Total *int64 `json:"total"` ParseFailures *int64 `json:"parse_failures"` AuthFailures *int64 `json:"auth_failures"` ContextFailures *int64 `json:"context_failures"` }
PacketMetrics - Transport endpoint related activity. Includes raw network packet counts as well as SNMP messages failed to get processed at the later stages.
type ProcessEndpoint ¶
type ProcessEndpoint struct { ID int `json:"id"` Protocol string `json:"protocol"` Address string `json:"address"` Process ProcessMetrics `json:"process"` }
ProcessEndpoint - SNMP transport endpoint object. Each SNMP process can bind one or more transport endpoints. Each transport endpoint can only be bound by one SNMP process.
type ProcessEndpoints ¶
type ProcessEndpoints []ProcessEndpoint
ProcessEndpoints is an array of process-endpoint
type ProcessLifeCycle ¶
ProcessLifeCycle - How this process has being doing.
type ProcessMetrics ¶
type ProcessMetrics struct { ID int `json:"id"` Path string `json:"path"` Runtime int `json:"runtime"` CPU int `json:"cpu"` Memory int `json:"memory"` Files int `json:"files"` Exits int `json:"exits"` Changes int `json:"changes"` UpdateInterval int `json:"update_interval"` LastUpdate string `json:"last_update"` ConsolePages ConsolePages `json:"console_pages"` Supervisor Supervisor `json:"supervisor"` }
ProcessMetrics - SNMP simulator system is composed of many running processes. This object describes common properties of a process.
Cmdline *string `json:"cmdline"` Uptime *int `json:"uptime"` Owner *string `json:"owner"` LifeCycle *ProcessLifeCycle `json:"lifecycle"`
type ProcessesMetrics ¶
type ProcessesMetrics []ProcessMetrics
ProcessesMetrics is an array of ProcessMetrics.
type Recording ¶
Recording - Represents a single simulation data file residing by path under simulation data root.
type Selector ¶
type Selector struct { ID int `json:"id"` Comment string `json:"comment"` Template string `json:"template"` Tags Tags `json:"tags"` }
Selector - Each selector should end up being a path to a simulation data file relative to the command responder's data directory. The value of the selector can be static or, more likely, it contains templates that are expanded at run time. Each template can expand into some property of the inbound request. Known templates include:
${context-engine-id} ${context-name} ${endpoint-id} ${source-address}
type Supervisor ¶
Supervisor - contains information regarding the supervisor
type Tag ¶
type Tag struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` Agents Agents `json:"agents"` Endpoints Endpoints `json:"endpoints"` Engines Engines `json:"engines"` Labs Labs `json:"labs"` Selectors Selectors `json:"selectors"` Users Users `json:"users"` }
Tag - tags a collection of SNMP simulator control plane resources
type User ¶
type User struct { ID int `json:"id"` Name string `json:"name"` User string `json:"user"` AuthKey string `json:"auth_key"` AuthProto string `json:"auth_proto"` PrivKey string `json:"priv_key"` PrivProto string `json:"priv_proto"` Tags Tags `json:"tags"` }
User - SNMPv3 USM user object. Contains SNMPv3 credentials grouped by user name.