Skip to content

Commit

Permalink
Add new counters (#25)
Browse files Browse the repository at this point in the history
* Bump source modules and toolchain to 1.22
* cucm_performance_exporter-24 Jabber and MRA counters

Add new metrics:
- HWConferenceActive
- HWConferenceCompleted
- HWConferenceOutOfResources
- HWConferenceResourceActive
- HWConferenceResourceAvailable
- HWConferenceResourceTotal
- SWConferenceActive
- SWConferenceCompleted
- SWConferenceOutOfResources
- SWConferenceResourceActive
- SWConferenceResourceAvailable
- SWConferenceResourceTotal
- RegisteredAnalogAccess
- RegisteredMGCPGateway
- RegisteredOtherStationDevices
  • Loading branch information
pokornyIt authored Mar 1, 2024
1 parent f557811 commit f8218ba
Show file tree
Hide file tree
Showing 8 changed files with 184 additions and 498 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 pokornyIt.cz
Copyright (c) 2024 pokornyIt.cz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,23 @@ metrics:
encryptedCallsCompleted: false
encryptedPartiallyRegisteredPhones: false
encryptedRegisteredPhones: false
hwConferenceActive: false
hwConferenceCompleted: false
hwConferenceOutOfResources: false
hwConferenceResourceActive: false
hwConferenceResourceAvailable: false
hwConferenceResourceTotal: false
mtpOutOfResources: false
mtpRequestsThrottled: false
mtpResourceActive: false
mtpResourceAvailable: false
mtpResourceTotal: true
swConferenceActive: false
swConferenceCompleted: false
swConferenceOutOfResources: false
swConferenceResourceActive: false
swConferenceResourceAvailable: false
swConferenceResourceTotal: false
sipLineServerAuthorizationChallenges: false
sipLineServerAuthorizationFailures: false
sipTrunkApplicationAuthorizationFailures: false
Expand Down
15 changes: 15 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,33 @@ metrics:
encryptedCallsCompleted: false
encryptedPartiallyRegisteredPhones: false
encryptedRegisteredPhones: false
hwConferenceActive: false
hwConferenceCompleted: false
hwConferenceOutOfResources: false
hwConferenceResourceActive: false
hwConferenceResourceAvailable: false
hwConferenceResourceTotal: false
mtpOutOfResources: false
mtpRequestsThrottled: false
mtpResourceActive: false
mtpResourceAvailable: false
mtpResourceTotal: true
registeredAnalogAccess: false
registeredMGCPGateway: false
registeredOtherStationDevices: false
sipLineServerAuthorizationChallenges: false
sipLineServerAuthorizationFailures: false
sipTrunkApplicationAuthorizationFailures: false
sipTrunkApplicationAuthorizations: false
sipTrunkAuthorizationFailures: false
sipTrunkAuthorizations: false
sipTrunkServerAuthenticationChallenges: false
swConferenceActive: false
swConferenceCompleted: false
swConferenceOutOfResources: false
swConferenceResourceActive: false
swConferenceResourceAvailable: false
swConferenceResourceTotal: false
systemCallsAttempted: false
transcoderOutOfResources: false
transcoderRequestsThrottled: false
Expand Down
30 changes: 30 additions & 0 deletions counters.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ const (
HWConferenceResourceAvailable = "HWConferenceResourceAvailable"
HWConferenceResourceTotal = "HWConferenceResourceTotal"

SWConferenceActive = "SWConferenceActive"
SWConferenceCompleted = "SWConferenceCompleted"
SWConferenceOutOfResources = "SWConferenceOutOfResources"
SWConferenceResourceActive = "SWConferenceResourceActive"
SWConferenceResourceAvailable = "SWConferenceResourceAvailable"
SWConferenceResourceTotal = "SWConferenceResourceTotal"

HuntListsInService = "HuntListsInService"
IVROutOfResources = "IVROutOfResources"
IVRResourceActive = "IVRResourceActive"
Expand Down Expand Up @@ -114,6 +121,11 @@ const (
GatewaysSessionsFailed = "GatewaysSessionsFailed"
PhoneSessionsActive = "PhoneSessionsActive"
PhoneSessionsFailed = "PhoneSessionsFailed"

// RegisteredAnalogAccess registered devices
RegisteredAnalogAccess = "RegisteredAnalogAccess"
RegisteredMGCPGateway = "RegisteredMGCPGateway"
RegisteredOtherStationDevices = "RegisteredOtherStationDevices"
)

var (
Expand Down Expand Up @@ -180,6 +192,24 @@ var (
{allowedCounterName: GatewaysSessionsFailed, prometheusName: "cucm_gateways_sessions_failed", defaultEnabled: true},
{allowedCounterName: PhoneSessionsActive, prometheusName: "cucm_phone_sessions_active", defaultEnabled: true},
{allowedCounterName: PhoneSessionsFailed, prometheusName: "cucm_phone_sessions_failed", defaultEnabled: true},
// HW Conference
{allowedCounterName: HWConferenceActive, prometheusName: "cucm_hw_conference_active", defaultEnabled: false},
{allowedCounterName: HWConferenceCompleted, prometheusName: "cucm_hw_conference_completed", defaultEnabled: false},
{allowedCounterName: HWConferenceOutOfResources, prometheusName: "cucm_hw_conference_out_of_resources", defaultEnabled: false},
{allowedCounterName: HWConferenceResourceActive, prometheusName: "cucm_hw_conference_resource_active", defaultEnabled: false},
{allowedCounterName: HWConferenceResourceAvailable, prometheusName: "cucm_hw_conference_resource_available", defaultEnabled: false},
{allowedCounterName: HWConferenceResourceTotal, prometheusName: "cucm_hw_conference_resource_total", defaultEnabled: false},
// SW Conference
{allowedCounterName: SWConferenceActive, prometheusName: "cucm_sw_conference_active", defaultEnabled: false},
{allowedCounterName: SWConferenceCompleted, prometheusName: "cucm_sw_conference_completed", defaultEnabled: false},
{allowedCounterName: SWConferenceOutOfResources, prometheusName: "cucm_sw_conference_out_of_resources", defaultEnabled: false},
{allowedCounterName: SWConferenceResourceActive, prometheusName: "cucm_sw_conference_resource_active", defaultEnabled: false},
{allowedCounterName: SWConferenceResourceAvailable, prometheusName: "cucm_sw_conference_resource_available", defaultEnabled: false},
{allowedCounterName: SWConferenceResourceTotal, prometheusName: "cucm_sw_conference_resource_total", defaultEnabled: false},
// registered info
{allowedCounterName: RegisteredAnalogAccess, prometheusName: "cucm_registered_analog_access", defaultEnabled: false},
{allowedCounterName: RegisteredMGCPGateway, prometheusName: "cucm_registered_mgcp_gateway", defaultEnabled: false},
{allowedCounterName: RegisteredOtherStationDevices, prometheusName: "cucm_registered_other_station_devices", defaultEnabled: false},
}
)

Expand Down
27 changes: 14 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
module github.com/pokornyIt/cucm_performance_exporter

go 1.19
go 1.22

toolchain go1.22.0

require (
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/common v0.41.0
github.com/sirupsen/logrus v1.9.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
github.com/alecthomas/kingpin/v2 v2.4.0
github.com/prometheus/client_golang v1.19.0
github.com/prometheus/common v0.49.0
github.com/sirupsen/logrus v1.9.3
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
golang.org/x/sys v0.6.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
golang.org/x/sys v0.17.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
)
Loading

0 comments on commit f8218ba

Please sign in to comment.