Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // VRRPScriptStatuses contains VRRP Script statuses. VRRPScriptStatuses = []string{"BAD", "GOOD"} // VRRPScriptStates contains VRRP Script states. VRRPScriptStates = []string{"idle", "running", "requested termination", "forcing termination"} // VRRPStates contains VRRP states. VRRPStates = []string{"INIT", "BACKUP", "MASTER", "FAULT"} )
Functions ¶
Types ¶
type KeepalivedCollector ¶
KeepalivedCollector implements prometheus.Collector interface and stores required info to collect data.
func NewKeepalivedCollector ¶
func NewKeepalivedCollector(useJSON bool, scriptPath string, collector Collector) *KeepalivedCollector
NewKeepalivedCollector is creating new instance of KeepalivedCollector.
func (*KeepalivedCollector) Collect ¶
func (k *KeepalivedCollector) Collect(ch chan<- prometheus.Metric)
Collect get metrics and add to prometheus metric channel.
func (*KeepalivedCollector) Describe ¶
func (k *KeepalivedCollector) Describe(ch chan<- *prometheus.Desc)
Describe outputs metrics descriptions.
type KeepalivedStats ¶
type KeepalivedStats struct { VRRPs []VRRP Scripts []VRRPScript }
KeepalivedStats ties together VRRP and VRRPScript.
type VRRPData ¶
type VRRPData struct { IName string `json:"iname"` State int `json:"state"` WantState int `json:"wantstate"` Intf string `json:"ifp_ifname"` GArpDelay int `json:"garp_delay"` VRID int `json:"vrid"` VIPs []string `json:"vips"` ExcludedVIPs []string `json:"excluded_vips"` }
VRRPData represents Keepalived data about VRRP.
type VRRPScript ¶
VRRPScript represents Keepalived script about VRRP.
func ParseVRRPScript ¶
func ParseVRRPScript(i io.Reader) []VRRPScript
type VRRPStats ¶
type VRRPStats struct { AdvertRcvd int `json:"advert_rcvd"` AdvertSent int `json:"advert_sent"` BecomeMaster int `json:"become_master"` ReleaseMaster int `json:"release_master"` PacketLenErr int `json:"packet_len_err"` AdvertIntervalErr int `json:"advert_interval_err"` IPTTLErr int `json:"ip_ttl_err"` InvalidTypeRcvd int `json:"invalid_type_rcvd"` AddrListErr int `json:"addr_list_err"` InvalidAuthType int `json:"invalid_authtype"` AuthTypeMismatch int `json:"authtype_mismatch"` AuthFailure int `json:"auth_failure"` PRIZeroRcvd int `json:"pri_zero_rcvd"` PRIZeroSent int `json:"pri_zero_sent"` }
VRRPStats represents Keepalived stats about VRRP.
Click to show internal directories.
Click to hide internal directories.