Documentation ¶
Index ¶
Constants ¶
const ( // DstBR indicates the destination to be Border Router. DstBR = "br" // DstPS indicates the destination to be Path Server. DstPS = "ps" // ErrDB indicates an error during validation. ErrDB = prom.ErrDB // ErrCreate indicates an error during creation. ErrCreate = "err_create" // ErrParse indicates an error during processing. ErrParse = prom.ErrParse // ErrProcess indicates an error during processing. ErrProcess = prom.ErrProcess // ErrPrefilter indicates an error during pre-filtering. ErrPrefilter = "err_prefilter" // ErrVerify indicates an error during verification. ErrVerify = prom.ErrVerify // ErrSend indicates an error during verification. ErrSend = "err_send" // OkFiltered indicates beacon was filtered by policy. OkFiltered = "ok_filtered" // OkNew indicates beacon was inserted for the first time. OkNew = "ok_new" // OkOld indicates that a beacon with older timestamp was received // and therefore it was not inserted or updated in db. OkOld = "ok_old" // OkUpdated indicates existing beacon in db was updated. OkUpdated = "ok_updated" // RevNew indicates a new issued revocation. RevNew = "new" // RevRenew indicates a renew of an already issued revocation. RevRenew = "renew" // RevFromCtrl indicates that revocation was sent control payload. RevFromCtrl = "ctrl" // Success indicates a successful result. Success = prom.Success )
Labels values.
const Namespace = "bs"
Namespace is the metrics namespace for the beacon server.
Variables ¶
var ( // Beaconing is the single-instance struct to get prometheus metrics or counters. Beaconing = newBeaconing() // Ifstate is the single-instance struct to get prometheus metrics or counters. Ifstate = newIfstate() // Keepalive is the single-instance struct to get keepalive prometheus counters. Keepalive = newKeepalive() // Originator is the single-instance struct to get prometheus counters. Originator = newOriginator() // Propagator is the single-instance struct to get prometheus metrics or counters. Propagator = newPropagator() // Revocation is the single-instance struct to get prometheus counters. Revocation = newRevocation() // Registrar is the single-instance struct to get prometheus metrics or counters. Registrar = newRegistrar() )
Functions ¶
func GetResultValue ¶
GetResultValue return result label value given insert stats.
Types ¶
type BeaconingLabels ¶
BeaconingLabels is used by clients to pass in a safe way labels values to prometheus metric types (e.g. counter).
func (BeaconingLabels) Labels ¶
func (l BeaconingLabels) Labels() []string
Labels returns the name of the labels in correct order.
func (BeaconingLabels) Values ¶
func (l BeaconingLabels) Values() []string
Values returns the values of the label in correct order.
func (BeaconingLabels) WithResult ¶
func (l BeaconingLabels) WithResult(result string) BeaconingLabels
WithResult returns the label set with the modfied result.
type DurationLabels ¶
DurationLabels define the labels attached to duration metric.
func (DurationLabels) Labels ¶
func (l DurationLabels) Labels() []string
Labels returns the list of labels.
func (DurationLabels) Values ¶
func (l DurationLabels) Values() []string
Values returns the label values in the order defined by Labels.
type IfstateLabels ¶
IfstateLabels define the labels attached to interface state.
func (IfstateLabels) Labels ¶
func (l IfstateLabels) Labels() []string
Labels returns the list of labels.
func (IfstateLabels) Values ¶
func (l IfstateLabels) Values() []string
Values returns the label values in the order defined by Labels.
type IssuedLabels ¶
IssuedLabels define the labels attached to revocation metrics.
func (IssuedLabels) Labels ¶
func (l IssuedLabels) Labels() []string
Labels returns the list of labels.
func (IssuedLabels) Values ¶
func (l IssuedLabels) Values() []string
Values returns the label values in the order defined by Labels.
type KeepaliveLabels ¶
KeepaliveLabels is used by clients to pass in a safe way labels values to prometheus metric types (e.g. counter).
func (KeepaliveLabels) Labels ¶
func (l KeepaliveLabels) Labels() []string
Labels returns the name of the labels in correct order.
func (KeepaliveLabels) Values ¶
func (l KeepaliveLabels) Values() []string
Values returns the values of the label in correct order.
type OriginatorLabels ¶
OriginatorLabels define the labels attached to originator metrics.
func (OriginatorLabels) Labels ¶
func (l OriginatorLabels) Labels() []string
Labels returns the name of the labels in correct order.
func (OriginatorLabels) Values ¶
func (l OriginatorLabels) Values() []string
Values returns the values of the label in correct order.
func (OriginatorLabels) WithResult ¶
func (l OriginatorLabels) WithResult(result string) OriginatorLabels
WithResult returns the label set with the modfied result.
type PropagatorLabels ¶
PropagatorLabels define the labels attached to propagator metrics.
func (PropagatorLabels) Labels ¶
func (l PropagatorLabels) Labels() []string
Labels returns the name of the labels in correct order.
func (PropagatorLabels) Values ¶
func (l PropagatorLabels) Values() []string
Values returns the values of the label in correct order.
type RegistrarLabels ¶
RegistrarLabels define the labels attached to registrar metrics.
func (RegistrarLabels) Labels ¶
func (l RegistrarLabels) Labels() []string
Labels returns the name of the labels in correct order.
func (RegistrarLabels) Values ¶
func (l RegistrarLabels) Values() []string
Values returns the values of the label in correct order.
type RevocationLabels ¶
type RevocationLabels struct {
Result, Method string
}
RevocationLabels define the labels attached to revocation metrics.
func (RevocationLabels) Labels ¶
func (l RevocationLabels) Labels() []string
Labels returns the list of labels.
func (RevocationLabels) Values ¶
func (l RevocationLabels) Values() []string
Values returns the label values in the order defined by Labels.
type SentLabels ¶
type SentLabels struct {
Dst string
}
SentLabels define the labels attached to sent revocation counter.
func (SentLabels) Values ¶
func (l SentLabels) Values() []string
Values returns the label values in the order defined by Labels.
type TypeOnlyLabel ¶
type TypeOnlyLabel struct {
SegType string
}
TypeOnlyLabel is used by clients to pass in a safe way labels values to prometheus metric types (e.g. counter).
func (TypeOnlyLabel) Labels ¶
func (l TypeOnlyLabel) Labels() []string
Labels returns the name of the labels in correct order.
func (TypeOnlyLabel) Values ¶
func (l TypeOnlyLabel) Values() []string
Values returns the values of the label in correct order.