[SEBA-34] Kafka Topic Exporter
Change-Id: I1c49bab1716ffbf1db9ffc091b2173ecc6bc7615
diff --git a/main.go b/main.go
index a27fc01..39c4700 100644
--- a/main.go
+++ b/main.go
@@ -131,6 +131,16 @@
prometheus.MustRegister(onosaaaTxStartReq)
prometheus.MustRegister(onosaaaEapPktTxAuthChooseEap)
prometheus.MustRegister(onosaaaTxRespnotNak)
+
+ prometheus.MustRegister(onosaaaEapolFramesTx)
+ prometheus.MustRegister(onosaaaAuthStateIdle)
+ prometheus.MustRegister(onosaaaRequestIdFramesTx)
+ prometheus.MustRegister(onosaaaRequestEapFramesTx)
+ prometheus.MustRegister(onosaaaInvalidPktType)
+ prometheus.MustRegister(onosaaaInvalidBodyLength)
+ prometheus.MustRegister(onosaaaValidEapolFramesRx)
+ prometheus.MustRegister(onosaaaPendingResSupplicant)
+ prometheus.MustRegister(onosaaaRxResIdEapFrames)
}
func loadConfigFile() Config {
diff --git a/topic-exporter.go b/topic-exporter.go
index 983f83a..4e8d2f6 100644
--- a/topic-exporter.go
+++ b/topic-exporter.go
@@ -338,6 +338,51 @@
prometheus.GaugeOpts{
Name: "onosaaa_tx_Resp_not_Nak",
Help: "Number of transitions to response (received response other that NAK)",
+ })
+ onosaaaEapolFramesTx = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Name: "onosaaa_eapol_frames_tx",
+ Help: "Number of EAPOL frames transmitted",
+ })
+ onosaaaAuthStateIdle = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Name: "onosaaa_auth_state_idle",
+ Help: "Number of state machine status as Idle",
+ })
+ onosaaaRequestIdFramesTx = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Name: "onosaaa_tx_request_id_frames",
+ Help: "Number of request ID EAP frames transmitted",
+ })
+ onosaaaRequestEapFramesTx = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Name: "onosaaa_tx_request_eap_frames",
+ Help: "Number of request EAP frames transmitted",
+ })
+ onosaaaInvalidPktType = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Name: "onosaaa_invalid_pkt_type",
+ Help: "Number of EAPOL frames received with invalid frame(Packet) type",
+ })
+ onosaaaInvalidBodyLength = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Name: "onosaaa_invalid_body_length",
+ Help: "Number of EAPOL frames received with invalid body length",
+ })
+ onosaaaValidEapolFramesRx = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Name: "onosaaa_rx_valid_eapol_frames",
+ Help: "Number of valid EAPOL frames received",
+ })
+ onosaaaPendingResSupplicant = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Name: "onosaaa_pending_response_supplicant",
+ Help: "Number of request pending response from supplicant",
+ })
+ onosaaaRxResIdEapFrames = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Name: "onosaaa_rx_res_id_eap_frames",
+ Help: "Number of response ID EAP frames received",
})
)
@@ -670,6 +715,24 @@
onosaaaEapPktTxAuthChooseEap.Set(kpi.EapPktTxAuthChooseEap)
onosaaaTxRespnotNak.Set(kpi.TxResponseNotNak)
+
+ onosaaaEapolFramesTx.Set(kpi.EapolFramesTx)
+
+ onosaaaAuthStateIdle.Set(kpi.AuthStateIdle)
+
+ onosaaaRequestIdFramesTx.Set(kpi.RequestIdFramesTx)
+
+ onosaaaRequestEapFramesTx.Set(kpi.RequestEapFramesTx)
+
+ onosaaaInvalidPktType.Set(kpi.InvalidPktType)
+
+ onosaaaInvalidBodyLength.Set(kpi.InvalidBodyLength)
+
+ onosaaaValidEapolFramesRx.Set(kpi.ValidEapolFramesRx)
+
+ onosaaaPendingResSupplicant.Set(kpi.PendingResSupplicant)
+
+ onosaaaRxResIdEapFrames.Set(kpi.RxResIdEapFrames)
}
func exportOnosPppoeKPI(kpi OnosPppoeKPI) {
diff --git a/types.go b/types.go
index 368b710..3153b2d 100644
--- a/types.go
+++ b/types.go
@@ -139,6 +139,15 @@
TxStartReq float64 `json:"eapolStartReqTrans"`
EapPktTxAuthChooseEap float64 `json:"eapPktTxauthChooseEap"`
TxResponseNotNak float64 `json:"eapolTransRespNotNak"`
+ EapolFramesTx float64 `json:"eapolFramesTx"`
+ AuthStateIdle float64 `json:"authStateIdle"`
+ RequestIdFramesTx float64 `json:"requestIdFramesTx"`
+ RequestEapFramesTx float64 `json:"requestEapFramesTx"`
+ InvalidPktType float64 `json:"invalidPktType"`
+ InvalidBodyLength float64 `json:"invalidBodyLength"`
+ ValidEapolFramesRx float64 `json:"validEapolFramesRx"`
+ PendingResSupplicant float64 `json:"pendingResSupplicant"`
+ RxResIdEapFrames float64 `json:"resIdEapFramesRx"`
}
type OnosPppoeSubscriberKPI struct {