Documentation ¶
Index ¶
- Constants
- func Hostname() string
- func InitNode(db *gorm.DB, kind string, text string, schedule float64) error
- func MustInitNode(db *gorm.DB, kind string, text string, schedule float64)
- func MustTick(db *gorm.DB, kind string)
- func Tick(db *gorm.DB, kind string) error
- type DiskIOPerNode
- type DiskMDPerNode
- type DiskUsagePerNode
- type MemStatsPerNode
- type MonitoringPerNode
- type Stats
Constants ¶
View Source
const MIN_NOTIFICATION_TIME = float64(3600)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DiskIOPerNode ¶
type DiskIOPerNode struct { ID uint64 `gorm:"primary_key"` Kind string `gorm:"type:varchar(255) not null"` NodeID string `gorm:"type:varchar(255) not null"` DiskReadsCompleted uint64 DiskWritesCompleted uint64 CreatedAt time.Time }
func GetDiskIOStats ¶
func GetDiskIOStats(diskName string) DiskIOPerNode
type DiskMDPerNode ¶
type DiskMDPerNode struct { ID uint64 `gorm:"primary_key"` Kind string `gorm:"type:varchar(255) not null"` NodeID string `gorm:"type:varchar(255) not null"` ExitCode int MDADM string `gorm:"type:text not null"` CreatedAt time.Time }
func GetMDADM ¶
func GetMDADM(md string) DiskMDPerNode
type DiskUsagePerNode ¶
type DiskUsagePerNode struct { ID uint64 `gorm:"primary_key"` Kind string `gorm:"type:varchar(255) not null"` NodeID string `gorm:"type:varchar(255) not null"` DiskAll uint64 DiskUsed uint64 DiskFree uint64 CreatedAt time.Time }
func GetDiskUsage ¶
func GetDiskUsage(path string) DiskUsagePerNode
type MemStatsPerNode ¶
type MemStatsPerNode struct { ID uint64 `gorm:"primary_key"` NodeID string `gorm:"type:varchar(255) not null"` MemoryTotal uint64 MemoryUsed uint64 MemoryBuffers uint64 MemoryCached uint64 MemoryFree uint64 MemoryAvailable uint64 MemoryActive uint64 MemoryInactive uint64 MemorySwapTotal uint64 MemorySwapUsed uint64 MemorySwapCached uint64 MemorySwapFree uint64 CreatedAt time.Time }
func GetMemoryStats ¶
func GetMemoryStats() MemStatsPerNode
type MonitoringPerNode ¶
type MonitoringPerNode struct { ID uint64 `gorm:"primary_key"` Kind string `gorm:"type:varchar(255) not null"` NodeID string `gorm:"type:varchar(255) not null"` AlertText string `gorm:"type:text not null"` Schedule float64 Tick time.Time NotifiedAt *time.Time AcknowledgedAt *time.Time CreatedAt time.Time UpdatedAt time.Time }
func (*MonitoringPerNode) String ¶
func (m *MonitoringPerNode) String() string
type Stats ¶
type Stats struct { Mem []MemStatsPerNode DU []DiskUsagePerNode IO []DiskIOPerNode MDADM []DiskMDPerNode Watch []MonitoringPerNode NodeID string }
Click to show internal directories.
Click to hide internal directories.