Documentation ¶
Index ¶
- Constants
- type Custom
- type Logics
- func (lgc *Logics) AddDevice(header http.Header, deviceInfo meta.NetcollectDevice) (meta.AddDeviceResult, error)
- func (lgc *Logics) AddProperty(pHeader http.Header, propertyInfo meta.NetcollectProperty) (meta.AddNetPropertyResult, error)
- func (lgc *Logics) BatchCreateDevice(pHeader http.Header, deviceInfoList []meta.NetcollectDevice) ([]meta.BatchAddDeviceResult, bool)
- func (lgc *Logics) BatchCreateProperty(pHeader http.Header, propertyInfoList []meta.NetcollectProperty) ([]meta.BatchAddNetPropertyResult, bool)
- func (lgc *Logics) ConfirmReport(header http.Header, reports []metadata.NetcollectReport) *metadata.RspNetcollectConfirm
- func (lgc *Logics) ConvertStringToID(stringID string) (int64, error)
- func (lgc *Logics) DeleteDevice(pHeader http.Header, netDeviceID uint64) error
- func (lgc *Logics) DeleteProperty(pHeader http.Header, netPropertyID uint64) error
- func (lgc *Logics) DiscoverNetDevice(header http.Header, configs []metadata.Netcollector) error
- func (lgc *Logics) SearchCollector(header http.Header, cond metadata.ParamNetcollectorSearch) (int64, []metadata.Netcollector, error)
- func (lgc *Logics) SearchDevice(pHeader http.Header, params *meta.NetCollSearchParams) (meta.SearchNetDevice, error)
- func (lgc *Logics) SearchHistory(header http.Header, param metadata.ParamSearchNetcollectReport) (uint64, []metadata.NetcollectHistory, error)
- func (lgc *Logics) SearchProperty(pHeader http.Header, params *meta.NetCollSearchParams) (*meta.SearchNetProperty, error)
- func (lgc *Logics) SearchReport(header http.Header, param metadata.ParamSearchNetcollectReport) (uint64, []metadata.NetcollectReport, error)
- func (lgc *Logics) SearchReportSummary(header http.Header, param metadata.ParamSearchNetcollectReport) ([]*metadata.NetcollectReportSummary, error)
- func (lgc *Logics) UpdateCollector(header http.Header, config metadata.Netcollector) error
- func (lgc *Logics) UpdateDevice(pHeader http.Header, netDeviceID uint64, deviceInfo meta.NetcollectDevice) error
- func (lgc *Logics) UpdateProperty(pHeader http.Header, netPropertyID uint64, ...) error
- type NetDeviceConfig
- type Report
- type SnmpConfig
- type Version
Constants ¶
View Source
const INVALIDID uint64 = 0
INVALIDID invalid id used as return value
View Source
const Netdevicebeat = "netdevicebeat"
Netdevicebeat netdevicebeat collector name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Custom ¶
type Custom struct { DeviceModel string `yaml:"device_model,omitempty"` ObjectID string `yaml:"bk_obj_id,omitempty"` BkVendor string `yaml:"bk_vendor,omitempty"` PropertyID string `json:"bk_property_id" bson:"bk_property_id,omitempty"` Method string `yaml:"method,omitempty"` Period string `yaml:"period,omitempty"` OID string `yaml:"oid,omitempty"` }
type Logics ¶
type Logics struct { *backbone.Engine ESB esbserver.EsbClientInterface // contains filtered or unexported fields }
Logics framwork need
func (*Logics) AddDevice ¶
func (lgc *Logics) AddDevice(header http.Header, deviceInfo meta.NetcollectDevice) (meta.AddDeviceResult, error)
AddDevice create new net device
func (*Logics) AddProperty ¶
func (lgc *Logics) AddProperty( pHeader http.Header, propertyInfo meta.NetcollectProperty) (meta.AddNetPropertyResult, error)
AddProperty create new net property
func (*Logics) BatchCreateDevice ¶
func (lgc *Logics) BatchCreateDevice(pHeader http.Header, deviceInfoList []meta.NetcollectDevice) ([]meta.BatchAddDeviceResult, bool)
BatchCreateDevice batch create or update net devices
func (*Logics) BatchCreateProperty ¶
func (lgc *Logics) BatchCreateProperty( pHeader http.Header, propertyInfoList []meta.NetcollectProperty) ([]meta.BatchAddNetPropertyResult, bool)
BatchCreateProperty bacth create or update net propertys
func (*Logics) ConfirmReport ¶
func (lgc *Logics) ConfirmReport(header http.Header, reports []metadata.NetcollectReport) *metadata.RspNetcollectConfirm
func (*Logics) ConvertStringToID ¶
ConvertStringToID check param ID is a num string and convert to num
func (*Logics) DeleteDevice ¶
func (*Logics) DeleteProperty ¶
func (*Logics) DiscoverNetDevice ¶
func (*Logics) SearchCollector ¶
func (lgc *Logics) SearchCollector(header http.Header, cond metadata.ParamNetcollectorSearch) (int64, []metadata.Netcollector, error)
func (*Logics) SearchDevice ¶
func (lgc *Logics) SearchDevice(pHeader http.Header, params *meta.NetCollSearchParams) (meta.SearchNetDevice, error)
SearchDevice get net devices by conditions
func (*Logics) SearchHistory ¶
func (lgc *Logics) SearchHistory(header http.Header, param metadata.ParamSearchNetcollectReport) (uint64, []metadata.NetcollectHistory, error)
func (*Logics) SearchProperty ¶
func (lgc *Logics) SearchProperty(pHeader http.Header, params *meta.NetCollSearchParams) (*meta.SearchNetProperty, error)
SearchProperty get net devices by conditions
func (*Logics) SearchReport ¶
func (lgc *Logics) SearchReport(header http.Header, param metadata.ParamSearchNetcollectReport) (uint64, []metadata.NetcollectReport, error)
func (*Logics) SearchReportSummary ¶
func (lgc *Logics) SearchReportSummary(header http.Header, param metadata.ParamSearchNetcollectReport) ([]*metadata.NetcollectReportSummary, error)
func (*Logics) UpdateCollector ¶
func (*Logics) UpdateDevice ¶
func (*Logics) UpdateProperty ¶
type NetDeviceConfig ¶
type NetDeviceConfig struct { DataID int64 `yaml:"dataid,omitempty"` CloudID int64 `yaml:"bk_cloud_id,omitempty"` OwnerID string `yaml:"bk_supplier_account"` ScanRange []string `yaml:"scan_range,omitempty"` Snmp SnmpConfig `yaml:"snmp,omitempty"` PingTimeout int `yaml:"ping_timeout,omitempty"` PingRetry int `yaml:"ping_retry,omitempty"` Worker int `yaml:"worker,omitempty"` Period string `yaml:"period,omitempty"` Customs []Custom `yaml:"customs,omitempty"` Report Report `yaml:"report,omitempty"` }
type SnmpConfig ¶
type SnmpConfig struct { // Target is an ipv4 address Target string `yaml:"target,omitempty"` // Port is a udp port Port int `yaml:"port,omitempty"` // Community is an SNMP Community string Community string `yaml:"community,omitempty"` // Version is an SNMP Version Version Version `yaml:"version,omitempty"` // Timeout is the timeout for the SNMP Query Timeout int `yaml:"timeout,omitempty"` // Set the number of retries to attempt within timeout. Retries int `yaml:"retries,omitempty"` // MaxOids is the maximum number of oids allowed in a Get() // (default: 10) MaxOids int `yaml:"max_oids,omitempty"` }
SnmpConfig snmp config
Click to show internal directories.
Click to hide internal directories.