Documentation
¶
Overview ¶
Package datastore : データ保存
Package datastore : データ保存
Package datastore : データ保存
Index ¶
- Constants
- Variables
- func AddBlueDevice(e *BlueDeviceEnt)
- func AddCert(c *CertEnt)
- func AddDNSQ(s *DNSQEnt)
- func AddDevice(d *DeviceEnt)
- func AddDrawItem(di *DrawItemEnt) error
- func AddEnvMonitor(e *EnvMonitorEnt)
- func AddEtherType(s *EtherTypeEnt)
- func AddEventLog(e *EventLogEnt)
- func AddFlow(f *FlowEnt)
- func AddIPReport(ip *IPReportEnt)
- func AddLine(l *LineEnt) error
- func AddMotionSensor(e *MotionSensorEnt)
- func AddNetwork(n *NetworkEnt) error
- func AddNode(n *NodeEnt) error
- func AddOTelMetric(m *OTelMetricEnt)
- func AddOrUpdateIcon(i *IconEnt) error
- func AddPolling(p *PollingEnt) error
- func AddPollingLog(p *PollingEnt) error
- func AddPollingWithDupCheck(p *PollingEnt) error
- func AddPowerMonitor(e *PowerMonitorEnt)
- func AddRADIUSFlow(f *RADIUSFlowEnt)
- func AddSdrPower(list []*SdrPowerEnt)
- func AddSensor(s *SensorEnt)
- func AddServer(s *ServerEnt)
- func AddTLSFlow(f *TLSFlowEnt)
- func AddUser(u *UserEnt)
- func AddWifiAP(e *WifiAPEnt)
- func AddWinAccount(e *WinAccountEnt)
- func AddWinEventID(e *WinEventIDEnt)
- func AddWinKerberos(e *WinKerberosEnt)
- func AddWinLogon(e *WinLogonEnt)
- func AddWinPrivilege(e *WinPrivilegeEnt)
- func AddWinProcess(e *WinProcessEnt)
- func AddWinTask(e *WinTaskEnt)
- func CheckCharCode(s string) string
- func CheckDBBackup()
- func CheckNodeAddress(ip, mac, oldmac string)
- func ClearAllLogOnDB(ds string) error
- func ClearCAData()
- func ClearPollingLog(pollingID string) error
- func ClearReport(r string) error
- func CloseDB()
- func CompactDB(ds, compact string) error
- func DeleteAIResult(id string) error
- func DeleteAllLogs()
- func DeleteAllOTelData() error
- func DeleteArp()
- func DeleteDrawItem(id string) error
- func DeleteGeoIP()
- func DeleteGrokEnt(id string) error
- func DeleteIcon(icon string) error
- func DeleteImage(path string) error
- func DeleteLine(lineID string) error
- func DeleteLogs(b string)
- func DeleteNetwok(id string) error
- func DeleteNode(nodeID string) error
- func DeleteNodeStateChanged(id string)
- func DeleteOTelMetric(m *OTelMetricEnt)
- func DeleteOldLogBatch(ds, t string)
- func DeleteOldSdrPower(delOld int64) error
- func DeletePollings(ids []string) error
- func DeleteReport(report string, ids []string) error
- func DeleteSdrPower(st int64, h string) error
- func DeleteUser(id string)
- func FindVendor(mac string) string
- func ForEachArp(f func(*ArpEnt) bool) error
- func ForEachBlueDevice(f func(*BlueDeviceEnt) bool)
- func ForEachCert(cb func(c *PKICertEnt) bool)
- func ForEachCerts(f func(*CertEnt) bool)
- func ForEachDNSQ(f func(*DNSQEnt) bool)
- func ForEachDevices(f func(*DeviceEnt) bool)
- func ForEachEnvMonitor(f func(*EnvMonitorEnt) bool)
- func ForEachEtherType(f func(*EtherTypeEnt) bool)
- func ForEachEventLog(st, et int64, f func(*EventLogEnt) bool) error
- func ForEachFlows(f func(*FlowEnt) bool)
- func ForEachGrokEnt(f func(*GrokEnt) bool)
- func ForEachIPReport(f func(*IPReportEnt) bool)
- func ForEachItems(f func(*DrawItemEnt) bool)
- func ForEachLastEventLog(last int64, f func(*EventLogEnt) bool) error
- func ForEachLastLog(t string, f func(*LogEnt) bool) error
- func ForEachLastPollingLog(pollingID string, f func(*PollingLogEnt) bool) error
- func ForEachLines(f func(*LineEnt) bool)
- func ForEachLog(st, et int64, t string, f func(*LogEnt) bool) error
- func ForEachMotionSensor(f func(*MotionSensorEnt) bool)
- func ForEachNetworks(f func(*NetworkEnt) bool)
- func ForEachNodes(f func(*NodeEnt) bool)
- func ForEachOTelMetric(f func(id string, m *OTelMetricEnt) bool)
- func ForEachOTelTrace(tbk string, f func(t *OTelTraceEnt) bool)
- func ForEachPollingLog(st, et int64, pollingID string, f func(*PollingLogEnt) bool) error
- func ForEachPollingTemplate(f func(*PollingTemplateEnt) bool)
- func ForEachPollings(f func(*PollingEnt) bool)
- func ForEachPowerMonitor(f func(*PowerMonitorEnt) bool)
- func ForEachRADIUSFlows(f func(*RADIUSFlowEnt) bool)
- func ForEachSdrPower(st int64, h string, f func(*SdrPowerEnt) bool) error
- func ForEachSensors(f func(*SensorEnt) bool)
- func ForEachServers(f func(*ServerEnt) bool)
- func ForEachStateChangedNodes(f func(string) bool)
- func ForEachTLSFlows(f func(*TLSFlowEnt) bool)
- func ForEachUsers(f func(*UserEnt) bool)
- func ForEachWifiAP(f func(*WifiAPEnt) bool)
- func ForEachWinAccount(f func(*WinAccountEnt) bool)
- func ForEachWinEventID(f func(*WinEventIDEnt) bool)
- func ForEachWinKerberos(f func(*WinKerberosEnt) bool)
- func ForEachWinLogon(f func(*WinLogonEnt) bool)
- func ForEachWinPrivilege(f func(*WinPrivilegeEnt) bool)
- func ForEachWinProcess(f func(*WinProcessEnt) bool)
- func ForEachWinTask(f func(*WinTaskEnt) bool)
- func GetBackImage() ([]byte, error)
- func GetCipherSuiteName(id string) (string, bool)
- func GetDataStorePath() string
- func GetImage(path string) ([]byte, error)
- func GetImageIcon(id string) ([]byte, error)
- func GetImageList() []string
- func GetLoc(sip string) string
- func GetMIBValueString(name string, variable *gosnmp.SnmpPDU, raw bool) string
- func GetNodeMemo(nodeID string) string
- func GetOTelTraceBucketList() []string
- func GetPrivateKey() string
- func GetServiceName(prot, port int) (string, bool)
- func GetSshdPublicKeys() string
- func HasLine(l1 *LineEnt, isNet bool) bool
- func Init(ctx context.Context, path string, fs http.FileSystem, wg *sync.WaitGroup) error
- func InitCAConf(req *CreateCAReq) error
- func InitInfluxdb() error
- func InitSecurityKey()
- func IsGlobalUnicast(ips string) bool
- func IsPrivateIP(ip net.IP) bool
- func LoadDefGrokEnt()
- func LoadMailTemplate(t string) string
- func LoadOTelMetric()
- func LoadReport() error
- func LoadReportConf() error
- func PrintDateAndTime(i interface{}) string
- func PrintHintedMIBIntVal(val int32, hint string, us bool) string
- func PrintIPAddress(i interface{}) string
- func PrintLLDPID(i interface{}) string
- func PrintMIBStringVal(i interface{}) string
- func ResetPassword(ds string) error
- func RestoreDB(ds, backup string) error
- func RevokeCert(cert *PKICertEnt) error
- func RevokeCertByID(id string) error
- func SaveAIResult(res *AIResult) error
- func SaveBackImage(img []byte) error
- func SaveBackup() error
- func SaveDiscoverConf() error
- func SaveImage(path string, img []byte) error
- func SaveInfluxdbConf() error
- func SaveLogBuffer(logBuffer []*LogEnt)
- func SaveMapConf() error
- func SaveMapData()
- func SaveNodeMemo(nodeID, memo string) error
- func SaveNotifyConf() error
- func SaveNotifySchedule() error
- func SaveOTelMetric()
- func SavePKIConf() error
- func SaveReport(last int64) error
- func SaveReportConf() error
- func SaveSshdPublicKeys(pk string) error
- func SendAIScoreToInfluxdb(pe *PollingEnt, res *AIResult) error
- func SendPollingLogToInfluxdb(pe *PollingEnt) error
- func SetBlueDeviceName(id, name string) bool
- func SetEnvMonitorName(id, name string) bool
- func SetMotionSensorName(id, name string) bool
- func SetNodeStateChanged(id string)
- func SetPanic(s string)
- func SetPowerMonitorName(id, name string) bool
- func StopBackup()
- func UpdateArpEnt(ip, mac string) error
- func UpdateCert(cert *PKICertEnt) error
- func UpdateDBStats()
- func UpdateGeoIP(path string) error
- func UpdateGrokEnt(g *GrokEnt) error
- func UpdateLine(l *LineEnt) error
- func UpdateNetwork(n *NetworkEnt) error
- func UpdateNode(n *NodeEnt) error
- func UpdateOTelTrace(list []*OTelTraceEnt) error
- func UpdatePolling(p *PollingEnt) error
- type AIResult
- type ArpEnt
- type BlueDeviceEnt
- type CertEnt
- type CreateCAReq
- type DBBackupEnt
- type DBStatsEnt
- type DBStatsLogEnt
- type DNSQEnt
- type DeviceEnt
- type DiscoverConfEnt
- type DrawItemEnt
- type DrawItemType
- type EnvDataEnt
- type EnvMonitorEnt
- type EtherTypeEnt
- type EventLogEnt
- type FlowEnt
- type GrokEnt
- type IPReportEnt
- type IconEnt
- type InfluxdbConfEnt
- type LineEnt
- type LogEnt
- type LogFilterEnt
- type MIBInfo
- type MIBModuleEnt
- type MIBTreeEnt
- type MIBTypeEnt
- type MapConfEnt
- type MonitorDataEnt
- type MotionSensorDataEnt
- type MotionSensorEnt
- type NetworkEnt
- type NodeEnt
- type NotifyConfEnt
- type OTelMetricDataPointEnt
- type OTelMetricEnt
- type OTelTraceEnt
- type OTelTraceSpanEnt
- type PKICertEnt
- type PKIConfEnt
- type PKIControlEnt
- type PollingEnt
- type PollingLogEnt
- type PollingTemplateEnt
- type PortEnt
- type PowerMonitorDataEnt
- type PowerMonitorEnt
- type RADIUSFlowEnt
- type RSSIEnt
- type ReportConfEnt
- type SFlowCounterEnt
- type SdrPowerEnt
- type SdrPowerKey
- type SensorEnt
- type SensorMonitorEnt
- type SensorStatsEnt
- type ServerEnt
- type TLSFlowEnt
- type UserClientEnt
- type UserEnt
- type WifiAPEnt
- type WinAccountEnt
- type WinEventIDEnt
- type WinKerberosEnt
- type WinLogonEnt
- type WinPrivilegeEnt
- type WinProcessEnt
- type WinTaskEnt
Constants ¶
const ( DrawItemTypeRect = iota DrawItemTypeEllipse DrawItemTypeText DrawItemTypeImage DrawItemTypePollingText DrawItemTypePollingGauge DrawItemTypePollingNewGauge DrawItemTypePollingBar DrawItemTypePollingLine )
const ( LogModeNone = iota LogModeAlways LogModeOnChange LogModeAI )
Variables ¶
var ( // Conf Data on Memory MapConf MapConfEnt NotifyConf NotifyConfEnt InfluxdbConf InfluxdbConfEnt DiscoverConf DiscoverConfEnt Backup DBBackupEnt DBStats DBStatsEnt DBStatsLog []DBStatsLogEnt Yasumi string // Restrt snmptrapd RestartSnmpTrapd bool // MIBDB *gomibdb.MIBDB // 拡張バックアップ BackupPath string CopyBackup bool // 通知除外スケジュール設定 NotifySchedule map[string]string // 画像アイコン ImageIcons []string // CA証明書 CACert string ClientCert string ClientKey string )
var ( ErrNoPayload = fmt.Errorf("no payload") ErrInvalidNode = fmt.Errorf("invalid node") ErrInvalidParams = fmt.Errorf("invald params") ErrDBNotOpen = fmt.Errorf("db not open") ErrInvalidID = fmt.Errorf("invalid id") )
Define errors
var CheckPollingLog = false
var LastPanic string
var MIBInfoMap = make(map[string]*MIBInfo)
var MIBModules = []*MIBModuleEnt{}
var MIBTree = []*MIBTreeEnt{}
var MIBTypeMap = make(map[string]MIBTypeEnt)
var MonitorDataes []*MonitorDataEnt
MonitorDataes : モニターデータ
var PanicCount int
Functions ¶
func AddBlueDevice ¶ added in v1.4.0
func AddBlueDevice(e *BlueDeviceEnt)
func AddDrawItem ¶ added in v1.20.0
func AddDrawItem(di *DrawItemEnt) error
func AddEnvMonitor ¶ added in v1.4.0
func AddEnvMonitor(e *EnvMonitorEnt)
func AddEtherType ¶ added in v1.3.0
func AddEtherType(s *EtherTypeEnt)
func AddEventLog ¶
func AddEventLog(e *EventLogEnt)
func AddIPReport ¶ added in v1.1.0
func AddIPReport(ip *IPReportEnt)
func AddMotionSensor ¶ added in v1.35.0
func AddMotionSensor(e *MotionSensorEnt)
func AddNetwork ¶ added in v1.40.0
func AddNetwork(n *NetworkEnt) error
func AddOTelMetric ¶ added in v1.54.0
func AddOTelMetric(m *OTelMetricEnt)
func AddOrUpdateIcon ¶ added in v1.8.0
func AddPollingLog ¶
func AddPollingLog(p *PollingEnt) error
func AddPollingWithDupCheck ¶ added in v1.46.0
func AddPollingWithDupCheck(p *PollingEnt) error
AddPollingWithDupCheck : 重複しないようにポーリングを追加する
func AddPowerMonitor ¶ added in v1.14.0
func AddPowerMonitor(e *PowerMonitorEnt)
func AddRADIUSFlow ¶ added in v1.3.0
func AddRADIUSFlow(f *RADIUSFlowEnt)
func AddSdrPower ¶ added in v1.14.0
func AddSdrPower(list []*SdrPowerEnt)
func AddTLSFlow ¶ added in v1.3.0
func AddTLSFlow(f *TLSFlowEnt)
func AddWinAccount ¶ added in v1.3.0
func AddWinAccount(e *WinAccountEnt)
func AddWinEventID ¶ added in v1.3.0
func AddWinEventID(e *WinEventIDEnt)
func AddWinKerberos ¶ added in v1.3.0
func AddWinKerberos(e *WinKerberosEnt)
func AddWinLogon ¶ added in v1.3.0
func AddWinLogon(e *WinLogonEnt)
func AddWinPrivilege ¶ added in v1.3.0
func AddWinPrivilege(e *WinPrivilegeEnt)
func AddWinProcess ¶ added in v1.3.0
func AddWinProcess(e *WinProcessEnt)
func AddWinTask ¶ added in v1.3.0
func AddWinTask(e *WinTaskEnt)
func CheckCharCode ¶ added in v1.40.0
func CheckDBBackup ¶
func CheckDBBackup()
func CheckNodeAddress ¶ added in v1.3.0
func CheckNodeAddress(ip, mac, oldmac string)
func ClearAllLogOnDB ¶ added in v1.47.0
ClearAllLogOnDB : コマンドからDBをオープンしてログとレーポートをすべて削除します。
func ClearCAData ¶ added in v1.50.0
func ClearCAData()
func ClearReport ¶ added in v1.1.0
func DeleteAIResult ¶
func DeleteAllLogs ¶
func DeleteAllLogs()
func DeleteAllOTelData ¶ added in v1.54.0
func DeleteAllOTelData() error
func DeleteDrawItem ¶ added in v1.20.0
func DeleteGrokEnt ¶
func DeleteIcon ¶ added in v1.8.0
func DeleteImage ¶ added in v1.46.0
func DeleteLine ¶
func DeleteLogs ¶ added in v1.39.0
func DeleteLogs(b string)
func DeleteNetwok ¶ added in v1.40.0
func DeleteNode ¶
func DeleteNodeStateChanged ¶
func DeleteNodeStateChanged(id string)
func DeleteOTelMetric ¶ added in v1.54.0
func DeleteOTelMetric(m *OTelMetricEnt)
func DeleteOldLogBatch ¶ added in v1.45.0
func DeleteOldLogBatch(ds, t string)
DeleteOldLogBatch : 古いログのバッチ削除
func DeleteOldSdrPower ¶ added in v1.35.0
DeleteOldSdrPower は古い電波強度レポートを削除します。
func DeletePollings ¶ added in v1.15.0
func DeleteReport ¶
func DeleteSdrPower ¶ added in v1.14.0
func DeleteUser ¶
func DeleteUser(id string)
func ForEachArp ¶
func ForEachBlueDevice ¶ added in v1.56.0
func ForEachBlueDevice(f func(*BlueDeviceEnt) bool)
func ForEachCert ¶ added in v1.50.0
func ForEachCert(cb func(c *PKICertEnt) bool)
func ForEachCerts ¶ added in v1.3.0
func ForEachDNSQ ¶ added in v1.3.0
func ForEachDevices ¶
func ForEachEnvMonitor ¶ added in v1.4.0
func ForEachEnvMonitor(f func(*EnvMonitorEnt) bool)
func ForEachEtherType ¶ added in v1.3.0
func ForEachEtherType(f func(*EtherTypeEnt) bool)
func ForEachEventLog ¶
func ForEachEventLog(st, et int64, f func(*EventLogEnt) bool) error
func ForEachFlows ¶
func ForEachGrokEnt ¶
func ForEachIPReport ¶ added in v1.1.0
func ForEachIPReport(f func(*IPReportEnt) bool)
func ForEachItems ¶ added in v1.20.0
func ForEachItems(f func(*DrawItemEnt) bool)
func ForEachLastEventLog ¶
func ForEachLastEventLog(last int64, f func(*EventLogEnt) bool) error
func ForEachLastPollingLog ¶ added in v1.58.0
func ForEachLastPollingLog(pollingID string, f func(*PollingLogEnt) bool) error
ForEachLastPollingLog iterates over the last polling log entries for a given pollingID.
func ForEachMotionSensor ¶ added in v1.35.0
func ForEachMotionSensor(f func(*MotionSensorEnt) bool)
func ForEachNetworks ¶ added in v1.40.0
func ForEachNetworks(f func(*NetworkEnt) bool)
ForEachNetworks : Network毎の処理
func ForEachNodes ¶
func ForEachOTelMetric ¶ added in v1.54.0
func ForEachOTelMetric(f func(id string, m *OTelMetricEnt) bool)
func ForEachOTelTrace ¶ added in v1.54.0
func ForEachOTelTrace(tbk string, f func(t *OTelTraceEnt) bool)
func ForEachPollingLog ¶
func ForEachPollingLog(st, et int64, pollingID string, f func(*PollingLogEnt) bool) error
func ForEachPollingTemplate ¶
func ForEachPollingTemplate(f func(*PollingTemplateEnt) bool)
func ForEachPowerMonitor ¶ added in v1.14.0
func ForEachPowerMonitor(f func(*PowerMonitorEnt) bool)
func ForEachRADIUSFlows ¶ added in v1.3.0
func ForEachRADIUSFlows(f func(*RADIUSFlowEnt) bool)
func ForEachSdrPower ¶ added in v1.14.0
func ForEachSdrPower(st int64, h string, f func(*SdrPowerEnt) bool) error
func ForEachSensors ¶ added in v1.3.0
func ForEachServers ¶
func ForEachTLSFlows ¶ added in v1.3.0
func ForEachTLSFlows(f func(*TLSFlowEnt) bool)
func ForEachUsers ¶
func ForEachWifiAP ¶ added in v1.4.0
func ForEachWinAccount ¶ added in v1.3.0
func ForEachWinAccount(f func(*WinAccountEnt) bool)
func ForEachWinEventID ¶ added in v1.3.0
func ForEachWinEventID(f func(*WinEventIDEnt) bool)
func ForEachWinKerberos ¶ added in v1.3.0
func ForEachWinKerberos(f func(*WinKerberosEnt) bool)
func ForEachWinLogon ¶ added in v1.3.0
func ForEachWinLogon(f func(*WinLogonEnt) bool)
func ForEachWinPrivilege ¶ added in v1.3.0
func ForEachWinPrivilege(f func(*WinPrivilegeEnt) bool)
func ForEachWinProcess ¶ added in v1.3.0
func ForEachWinProcess(f func(*WinProcessEnt) bool)
func ForEachWinTask ¶ added in v1.3.0
func ForEachWinTask(f func(*WinTaskEnt) bool)
func GetBackImage ¶
func GetCipherSuiteName ¶
func GetDataStorePath ¶ added in v1.2.0
func GetDataStorePath() string
GetDataStorePath returns the path to the data store.
func GetImageIcon ¶ added in v1.40.0
GetImageIcon returns the image icon for the given id.
func GetImageList ¶ added in v1.20.0
func GetImageList() []string
func GetMIBValueString ¶ added in v1.40.0
func GetNodeMemo ¶ added in v1.52.0
GetNodeMemo retrieves a memo related to the specified node.
func GetOTelTraceBucketList ¶ added in v1.54.0
func GetOTelTraceBucketList() []string
func GetPrivateKey ¶
func GetPrivateKey() string
func GetServiceName ¶
func GetSshdPublicKeys ¶ added in v1.36.0
func GetSshdPublicKeys() string
func InitCAConf ¶ added in v1.50.0
func InitCAConf(req *CreateCAReq) error
func InitInfluxdb ¶
func InitInfluxdb() error
func InitSecurityKey ¶ added in v1.22.0
func InitSecurityKey()
func IsGlobalUnicast ¶
func IsPrivateIP ¶
func LoadDefGrokEnt ¶ added in v1.3.0
func LoadDefGrokEnt()
func LoadMailTemplate ¶ added in v1.7.0
func LoadOTelMetric ¶ added in v1.54.0
func LoadOTelMetric()
func LoadReport ¶
func LoadReport() error
func PrintDateAndTime ¶ added in v1.34.0
func PrintDateAndTime(i interface{}) string
PrintDateAndTime formats SNMP DateAndTime values according to their type.
func PrintHintedMIBIntVal ¶ added in v1.33.0
func PrintIPAddress ¶ added in v1.34.0
func PrintIPAddress(i interface{}) string
func PrintLLDPID ¶ added in v1.53.0
func PrintLLDPID(i interface{}) string
func PrintMIBStringVal ¶ added in v1.34.0
func PrintMIBStringVal(i interface{}) string
func ResetPassword ¶ added in v1.39.0
ResetPassword : set user:password to twsnmp:twsnmp
func RevokeCert ¶ added in v1.50.0
func RevokeCert(cert *PKICertEnt) error
func RevokeCertByID ¶ added in v1.50.0
func SaveAIResult ¶
func SaveBackImage ¶
func SaveBackup ¶
func SaveBackup() error
func SaveDiscoverConf ¶
func SaveDiscoverConf() error
func SaveInfluxdbConf ¶
func SaveInfluxdbConf() error
func SaveLogBuffer ¶
func SaveLogBuffer(logBuffer []*LogEnt)
func SaveMapConf ¶
func SaveMapConf() error
func SaveMapData ¶ added in v1.15.0
func SaveMapData()
SaveMapData saves map data to the DB at specified intervals.
func SaveNodeMemo ¶ added in v1.52.0
SaveNodeMemo saves a memo related to the specified node.
func SaveNotifyConf ¶
func SaveNotifyConf() error
func SaveNotifySchedule ¶ added in v1.27.0
func SaveNotifySchedule() error
func SaveOTelMetric ¶ added in v1.54.0
func SaveOTelMetric()
SaveOTelMetric saves metrics to the database.
func SavePKIConf ¶ added in v1.50.0
func SavePKIConf() error
func SaveReport ¶
func SaveSshdPublicKeys ¶ added in v1.36.0
func SendAIScoreToInfluxdb ¶
func SendAIScoreToInfluxdb(pe *PollingEnt, res *AIResult) error
func SendPollingLogToInfluxdb ¶
func SendPollingLogToInfluxdb(pe *PollingEnt) error
func SetBlueDeviceName ¶ added in v1.35.0
func SetEnvMonitorName ¶ added in v1.35.0
func SetMotionSensorName ¶ added in v1.35.0
func SetPowerMonitorName ¶ added in v1.35.0
func StopBackup ¶ added in v1.2.0
func StopBackup()
func UpdateArpEnt ¶
func UpdateCert ¶ added in v1.50.0
func UpdateCert(cert *PKICertEnt) error
func UpdateDBStats ¶
func UpdateDBStats()
func UpdateLine ¶
func UpdateNetwork ¶ added in v1.40.0
func UpdateNetwork(n *NetworkEnt) error
func UpdateNode ¶
func UpdateOTelTrace ¶ added in v1.54.0
func UpdateOTelTrace(list []*OTelTraceEnt) error
func UpdatePolling ¶
func UpdatePolling(p *PollingEnt) error
Types ¶
type AIResult ¶
func GetAIReesult ¶
type BlueDeviceEnt ¶ added in v1.4.0
type BlueDeviceEnt struct { ID string // Host + Address Host string Address string Name string AddressType string RSSI []RSSIEnt Info string Vendor string Count int64 FirstTime int64 LastTime int64 }
BlueDeviceEnt represents a Bluetooth device entry.
func GetBlueDevice ¶ added in v1.4.0
func GetBlueDevice(id string) *BlueDeviceEnt
type CertEnt ¶ added in v1.3.0
type CreateCAReq ¶ added in v1.50.0
type CreateCAReq struct { RootCAKeyType string `json:"RootCAKeyType"` Name string `json:"Name"` SANs string `json:"SANs"` AcmePort int `json:"AcmePort"` HTTPBaseURL string `json:"HttpBaseURL"` AcmeBaseURL string `json:"AcmeBaseURL"` HTTPPort int `json:"HttpPort"` RootCATerm int `json:"RootCATerm"` CrlInterval int `json:"CrlInterval"` CertTerm int `json:"CertTerm"` }
CreateCAReq represents a request from the frontend.
type DBBackupEnt ¶
type DBStatsEnt ¶
type DBStatsLogEnt ¶
type DNSQEnt ¶ added in v1.3.0
type DeviceEnt ¶
type DiscoverConfEnt ¶
type DrawItemEnt ¶ added in v1.20.0
type DrawItemEnt struct { ID string Type DrawItemType X int Y int W int // Width H int // Higeht Color string Path string Text string Size int // Font Size | GaugeSize PollingID string // Polling ID VarName string // Pollingから取得する項目 Format string // 表示フォーマット Value float64 // Gauge,Barの値 Values []float64 // Lineの値 Scale float64 // 値の補正倍率 }
func GetDrawItem ¶ added in v1.20.0
func GetDrawItem(id string) *DrawItemEnt
type DrawItemType ¶ added in v1.20.0
type DrawItemType int
type EnvDataEnt ¶ added in v1.4.0
type EnvDataEnt struct { Time int64 RSSI int Temp float64 Humidity float64 Illuminance float64 BarometricPressure float64 Sound float64 ETVOC float64 ECo2 float64 Battery int }
EnvDataEnt represents environmental data from OMRON environment sensors. type=OMRONEnv,address=%s,name=%s,rssi=%d,seq=%d,temp=%.02f,hum=%.02f,lx=%d,press=%.02f,sound=%.02f,eTVOC=%d,eCO2=%d
type EnvMonitorEnt ¶ added in v1.4.0
type EnvMonitorEnt struct { ID string // Host + Address Host string Name string Address string EnvData []EnvDataEnt Count int64 FirstTime int64 LastTime int64 }
func GetEnvMonitor ¶ added in v1.4.0
func GetEnvMonitor(id string) *EnvMonitorEnt
type EtherTypeEnt ¶ added in v1.3.0
type EtherTypeEnt struct { ID string // ID Host:EtherType Host string Type string Name string Count int64 FirstTime int64 LastTime int64 }
func GetEtherType ¶ added in v1.3.0
func GetEtherType(id string) *EtherTypeEnt
type EventLogEnt ¶
type FlowEnt ¶
type FlowEnt struct { ID string // ID Client:Server Client string Server string Services map[string]int64 Count int64 Bytes int64 ClientName string ClientNodeID string ClientLoc string ServerName string ServerNodeID string ServerLoc string Score float64 ValidScore bool Penalty int64 FirstTime int64 LastTime int64 UpdateTime int64 }
type GrokEnt ¶
func GetGrokEnt ¶
type IPReportEnt ¶ added in v1.1.0
type IPReportEnt struct { IP string MAC string Name string NodeID string Loc string Vendor string Count int64 Change int64 Score float64 ValidScore bool Penalty int64 FirstTime int64 LastTime int64 UpdateTime int64 }
func GetIPReport ¶ added in v1.1.0
func GetIPReport(id string) *IPReportEnt
type InfluxdbConfEnt ¶
type LineEnt ¶
type LogFilterEnt ¶
type MIBInfo ¶ added in v1.16.0
type MIBInfo struct { OID string Status string Type string Enum string Defval string Units string Index string Description string EnumMap map[int]string Hint string }
func FindMIBInfo ¶ added in v1.16.0
type MIBModuleEnt ¶ added in v1.19.0
MIBModuleEnt represents an entry in the list of loaded MIB modules.
type MIBTreeEnt ¶
type MIBTreeEnt struct { OID string `json:"oid"` Name string `json:"name"` MIBInfo *MIBInfo Children []*MIBTreeEnt `json:"children"` }
type MIBTypeEnt ¶ added in v1.33.0
type MapConfEnt ¶
type MapConfEnt struct { MapName string BackImage backImage UserID string Password string PollInt int Timeout int Retry int LogDays int LogDispSize int LogTimeout int SnmpMode string Community string SnmpUser string SnmpPassword string PublicKey string PrivateKey string // TLSCert string EnableSyslogd bool EnableTrapd bool EnableNetflowd bool EnableArpWatch bool EnableSshd bool EnableSflowd bool EnableTcpd bool EnableOTel bool EnableMobileAPI bool AILevel string AIThreshold int AIMode string GeoIPInfo string FontSize int AutoCharCode bool DisableOperLog bool MapSize int IconSize int ArpWatchRange string OTelRetention int OTelFrom string }
MapConfEnt : マップ設定
type MonitorDataEnt ¶ added in v1.40.0
type MonitorDataEnt struct { CPU float64 Mem float64 MyCPU float64 MyMem float64 Swap float64 Disk float64 Load float64 Bytes float64 Net float64 Proc int Conn int HeapAlloc int64 Sys int64 NumGoroutine int At int64 }
MonitorDataEnt :
type MotionSensorDataEnt ¶ added in v1.35.0
type MotionSensorEnt ¶ added in v1.35.0
type MotionSensorEnt struct { ID string // Host + Address Host string Name string Address string Data []MotionSensorDataEnt Count int64 FirstTime int64 LastTime int64 }
func GetMotionSensor ¶ added in v1.35.0
func GetMotionSensor(id string) *MotionSensorEnt
type NetworkEnt ¶ added in v1.40.0
type NetworkEnt struct { ID string Name string Descr string IP string // 管理用IP SnmpMode string Community string User string Password string URL string ArpWatch bool Unmanaged bool HPorts int X int Y int W int H int SystemID string Error string LLDP bool Ports []PortEnt }
func FindNetwork ¶ added in v1.40.0
func FindNetwork(id, ip string) *NetworkEnt
FindNetwork : システムIDと管理IPでNetwrorkを検索する
func FindNetworkByIP ¶ added in v1.46.0
func FindNetworkByIP(ip string) *NetworkEnt
FindNetworkByIP : 管理IPでNetwrorkを検索する
func GetNetwork ¶ added in v1.40.0
func GetNetwork(id string) *NetworkEnt
type NodeEnt ¶
type NodeEnt struct { ID string Name string Descr string Icon string Image string State string X int Y int IP string IPv6 string MAC string SnmpMode string Community string User string Password string GNMIUser string GNMIPassword string GNMIEncoding string GNMIPort string PublicKey string URL string AddrMode string AutoAck bool }
func FindNodeFromIP ¶
func FindNodeFromMAC ¶
func FindNodeFromName ¶ added in v1.35.0
type NotifyConfEnt ¶
type NotifyConfEnt struct { MailServer string User string Password string InsecureSkipVerify bool MailTo string MailFrom string Subject string AddNodeName bool Interval int Level string Report bool CheckUpdate bool NotifyRepair bool NotifyLowScore bool NotifyNewInfo bool URL string HTMLMail bool ChatType string ChatWebhookURL string ExecCmd string // InsecureCipherSuites bool WebHookNotify string WebHookReport string }
type OTelMetricDataPointEnt ¶ added in v1.54.0
type OTelMetricDataPointEnt struct { Start int64 `json:"Start"` Time int64 `json:"Time"` Attributes []string `json:"Attributes"` // Histogram Count uint64 `json:"Count"` BucketCounts []uint64 `json:"BucketCounts"` ExplicitBounds []float64 `json:"ExplicitBounds"` Sum float64 `json:"Sum"` Min float64 `json:"Min"` Max float64 `json:"Max"` // Gauge Gauge float64 `json:"Gauge"` // ExponentialHistogram Positive []uint64 `json:"Positive"` Negative []uint64 `json:"Negative"` Scale int64 `json:"Scale"` ZeroCount int64 `json:"ZeroCount"` ZeroThreshold float64 `json:"ZeroThreshold"` // Index Index int `json:"Index"` }
type OTelMetricEnt ¶ added in v1.54.0
type OTelMetricEnt struct { Host string `json:"Host"` Service string `json:"Service"` Scope string `json:"Scope"` Name string `json:"Name"` Type string `json:"Type"` Description string `json:"Description"` Unit string `json:"Unit"` DataPoints []*OTelMetricDataPointEnt `json:"DataPoints"` Count int `json:"Count"` First int64 `json:"First"` Last int64 `json:"Last"` }
func FindOTelMetric ¶ added in v1.54.0
func FindOTelMetric(host, service, scope, name string) *OTelMetricEnt
func FindOTelMetricByID ¶ added in v1.54.0
func FindOTelMetricByID(id string) *OTelMetricEnt
type OTelTraceEnt ¶ added in v1.54.0
type OTelTraceEnt struct { Bucket string `json:"Bucket"` TraceID string `json:"TraceID"` Start int64 `json:"Start"` End int64 `json:"End"` Dur float64 `json:"Dur"` Spans []OTelTraceSpanEnt `json:"Spans"` Last int64 `json:"Last"` }
func GetOTelTrace ¶ added in v1.54.0
func GetOTelTrace(bucket, tid string) *OTelTraceEnt
type OTelTraceSpanEnt ¶ added in v1.54.0
type OTelTraceSpanEnt struct { SpanID string `json:"SpanID"` ParentSpanID string `json:"ParentSpanID"` Host string `json:"Host"` Service string `json:"Service"` Scope string `json:"Scope"` Name string `json:"Name"` Start int64 `json:"Start"` End int64 `json:"End"` Dur float64 `json:"Dur"` Attributes []string `json:"Attributes"` }
type PKICertEnt ¶ added in v1.50.0
type PKICertEnt struct { ID string `json:"ID"` Subject string `json:"Subject"` NodeID string `json:"NodeID"` Created int64 `json:"Created"` Revoked int64 `json:"Revoked"` Expire int64 `json:"Expire"` Type string `json:"Type"` Certificate string `json:"Certificate"` Info map[string]string `json:"Info"` }
func FindCert ¶ added in v1.50.0
func FindCert(id string) *PKICertEnt
type PKIConfEnt ¶ added in v1.50.0
type PKIConfEnt struct { Name string `json:"Name"` SANs string `json:"AcmeSANs"` RootCAKeyType string `json:"RootCAKeyType"` RootCAKey string `json:"RootCAKey"` RootCACert string `json:"RootCACert"` RootCATerm int `json:"RootCATerm"` CertTerm int `json:"CertTerm"` Serial int64 `json:"Serial"` AcmeServerKey string `json:"AcmeServerKey"` AcmeServerCert string `json:"AcmeServerCert"` AcmeBaseURL string `json:"AcmeBaseURL"` AcmePort int `json:"AcmePort"` HTTPBaseURL string `json:"HttpBaseURL"` HTTPPort int `json:"HttpPort"` ScepCAKey string `json:"ScepCAKey"` ScepCACert string `json:"ScepCACert"` CrlNumber int64 `json:"CrlNumber"` CrlInterval int `json:"CrlInterval"` EnableAcme bool `json:"EnableAcme"` EnableHTTP bool `json:"EnableHttp"` }
PKIConfEnt is the configuration data for a CA stored in the DB.
var PKIConf PKIConfEnt
type PKIControlEnt ¶ added in v1.50.0
type PollingEnt ¶
type PollingEnt struct { ID string Name string NodeID string Type string Mode string Params string Filter string Extractor string Script string Level string PollInt int Timeout int Retry int LogMode int NextTime int64 LastTime int64 Result map[string]interface{} State string FailAction string RepairAction string }
type PollingLogEnt ¶
type PollingLogEnt struct { Time int64 // UnixNano() PollingID string State string Result map[string]interface{} }
func GetAllPollingLog ¶
func GetAllPollingLog(pollingID string) []PollingLogEnt
GetAllPollingLog :全てのポーリングログを取得する
type PollingTemplateEnt ¶
type PollingTemplateEnt struct { ID string Name string Level string Type string Mode string Params string Filter string Extractor string Script string Descr string AutoMode string }
func GetPollingTemplate ¶
func GetPollingTemplate(id string) *PollingTemplateEnt
type PowerMonitorDataEnt ¶ added in v1.14.0
type PowerMonitorEnt ¶ added in v1.14.0
type PowerMonitorEnt struct { ID string // Host + Address Host string Name string Address string Data []PowerMonitorDataEnt Count int64 FirstTime int64 LastTime int64 }
func GetPowerMonitor ¶ added in v1.14.0
func GetPowerMonitor(id string) *PowerMonitorEnt
type RADIUSFlowEnt ¶ added in v1.3.0
type RADIUSFlowEnt struct { ID string // ID Client:Server Client string Server string Count int64 Request int64 Challenge int64 Accept int64 Reject int64 ClientName string ClientNodeID string ServerName string ServerNodeID string Score float64 ValidScore bool Penalty int64 FirstTime int64 LastTime int64 UpdateTime int64 }
func GetRADIUSFlow ¶ added in v1.3.0
func GetRADIUSFlow(id string) *RADIUSFlowEnt
type ReportConfEnt ¶
type ReportConfEnt struct { DenyCountries []string DenyServices []string AllowDNS string AllowDHCP string AllowMail string AllowLDAP string AllowLocalIP string JapanOnly bool DropFlowThTCPPacket int SensorTimeout int IncludeNoMACIP bool ExcludeIPv6 bool ReportDays int Limit int }
var ReportConf ReportConfEnt
type SFlowCounterEnt ¶ added in v1.39.0
type SdrPowerEnt ¶ added in v1.14.0
type SdrPowerKey ¶ added in v1.14.0
func GetSdrPowerKeys ¶ added in v1.14.0
func GetSdrPowerKeys() []SdrPowerKey
type SensorEnt ¶ added in v1.3.0
type SensorMonitorEnt ¶ added in v1.3.0
type SensorStatsEnt ¶ added in v1.3.0
type ServerEnt ¶
type TLSFlowEnt ¶ added in v1.3.0
type TLSFlowEnt struct { ID string // ID Client:Server:Service Client string Server string Service string Count int64 Version string Cipher string ClientName string ClientNodeID string ClientLoc string ServerName string ServerNodeID string ServerLoc string Score float64 ValidScore bool Penalty int64 FirstTime int64 LastTime int64 UpdateTime int64 }
func GetTLSFlow ¶ added in v1.3.0
func GetTLSFlow(id string) *TLSFlowEnt
type UserClientEnt ¶ added in v1.1.0
type UserEnt ¶
type WifiAPEnt ¶ added in v1.4.0
type WifiAPEnt struct { ID string // HOST + BSSID Host string BSSID string SSID string RSSI []RSSIEnt Channel string Vendor string Info string Count int Change int FirstTime int64 LastTime int64 }
WifiAPEnt represents a Wi-Fi access point entity. type=APInfo,ssid=%s,bssid=%s,rssi=%s,Channel=%s,info=%s,count=%d,change=%d,ft=%s,lt=%s
type WinAccountEnt ¶ added in v1.3.0
type WinAccountEnt struct { ID string // subject + target + computer Subject string Target string Computer string Count int64 Edit int64 Password int64 Other int64 FirstTime int64 LastTime int64 }
WinAccountEnt represents a Windows account event entry. type=Account,subject=%s,target=%s,computer=%s,count=%d,edit=%d,password=%d,other=%d,ft=%s,lt=%s",
func GetWinAccount ¶ added in v1.3.0
func GetWinAccount(id string) *WinAccountEnt
type WinEventIDEnt ¶ added in v1.3.0
type WinEventIDEnt struct { ID string // Computer + Provider + EventID Level string Computer string Provider string Channel string EventID int Count int64 FirstTime int64 LastTime int64 }
WinEventIDEnt represents a Windows Event ID entry. type=EventID,computer=%s,channel=%s,provider=%s,eventID=%d,total=%d,count=%d,ft=%s,lt=%s
func GetWinEventID ¶ added in v1.3.0
func GetWinEventID(id string) *WinEventIDEnt
type WinKerberosEnt ¶ added in v1.3.0
type WinKerberosEnt struct { ID string // target + computer + ip + service + ticketType Target string Computer string IP string Service string TicketType string Count int64 Failed int64 LastCert string LastStatus string Score float64 ValidScore bool Penalty int64 FirstTime int64 LastTime int64 }
WinKerberosEnt represents a Windows Kerberos event entry. type=Kerberos,target=%s,computer=%s,ip=%s,service=%s,ticketType=%s,count=%d,failed=%d,status=%s,cert=%s,ft=%s,lt=%s type=KerberosFailed,target=%s,computer=%s,ip=%s,service=%s,ticketType=%s,status=%s,time=%s
func GetWinKerberos ¶ added in v1.3.0
func GetWinKerberos(id string) *WinKerberosEnt
type WinLogonEnt ¶ added in v1.3.0
type WinLogonEnt struct { ID string // target + computer + IP Target string Computer string IP string Count int64 Logon int64 Logoff int64 Failed int64 LogonType map[string]int FailedCode map[string]int Score float64 ValidScore bool Penalty int64 FirstTime int64 LastTime int64 }
func GetWinLogon ¶ added in v1.3.0
func GetWinLogon(id string) *WinLogonEnt
type WinPrivilegeEnt ¶ added in v1.3.0
type WinPrivilegeEnt struct { ID string // subject + computer Subject string Computer string Count int64 FirstTime int64 LastTime int64 }
WinPrivilegeEnt represents a Windows privilege event entry. type=Privilege,subject=%s,computer=%s,count=%d,ft=%s,lt=%s
func GetWinPrivilege ¶ added in v1.3.0
func GetWinPrivilege(id string) *WinPrivilegeEnt
type WinProcessEnt ¶ added in v1.3.0
type WinProcessEnt struct { ID string // Computer + Process Computer string Process string Count int64 Start int64 Exit int64 LastParent string LastSubject string LastStatus string FirstTime int64 LastTime int64 }
WinProcessEnt represents a Windows process event entry. type=Process,computer=%s,process=%s,count=%d,start=%d,exit=%d,subject=%s,status=%s,parent=%s,ft=%s,lt=%s",
func GetWinProcess ¶ added in v1.3.0
func GetWinProcess(id string) *WinProcessEnt
type WinTaskEnt ¶ added in v1.3.0
type WinTaskEnt struct { ID string // Computer + TaskName + Subject TaskName string Computer string Subject string Count int64 FirstTime int64 LastTime int64 }
WinTaskEnt represents a Windows scheduled task event entry. type=Task,subject=%s,taskname=%s,computer=%s,count=%d,ft=%s,lt=%s",
func GetWinTask ¶ added in v1.3.0
func GetWinTask(id string) *WinTaskEnt
Source Files
¶
- ai.go
- arp.go
- backup.go
- datastore.go
- discover.go
- drawitem.go
- geoip.go
- grok.go
- influxdb.go
- line.go
- log.go
- map.go
- mibdb.go
- network.go
- node.go
- notify.go
- otel.go
- oui.go
- pki.go
- polling.go
- pollingtemplate.go
- report.go
- report_bluescan.go
- report_cert.go
- report_conf.go
- report_device.go
- report_flow.go
- report_ip.go
- report_sdrpower.go
- report_sensor.go
- report_twpcap.go
- report_twwinlog.go
- report_user.go
- report_wifiscan.go
- services.go
- stats.go
- tlsdata.go