Skip to content

Commit

Permalink
Add CLI flags for remove exporter metrics #13 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
pokornyIt authored Dec 3, 2021
1 parent 886075c commit d8089de
Show file tree
Hide file tree
Showing 6 changed files with 314 additions and 263 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ metrics:
gatewaysSessionsFailed: true
phoneSessionsActive: true
phoneSessionsFailed: true
goCollector: true
processStatus: true
port: 9719
apiAddress: publisher.name
apiUser: api_allowed_user
Expand Down Expand Up @@ -60,11 +62,21 @@ log:
- **callsCompleted** - This represents the number of calls that were actually connected (a voice path or video stream
was established) through this CallManager.
- **partiallyRegisteredPhone** - This represents the number of partially registered SIP Phones.
- **registeredHardwarePhones** - This represents the number of Cisco hardware IP phones (for example, models 7960, 7940, 7910, etc.) that are currently registered in the system.
- **gatewaysSessionsActive** - This is a real-time counter which specifies the total number of active recording sessions between a recording-enabled gateway and a recording server.
- **gatewaysSessionsFailed** - This is a cumulative counter which specifies the total number of gateway-preferred recording sessions which failed since the last restart of the Cisco Unified Communications Manager service.
- **phoneSessionsActive** - This is a real-time counter which specifies the total number of active recording sessions between a Cisco IP Phone and a recording server.
- **phoneSessionsFailed** - This is a cumulative counter which specifies the total number of phone-preferred recording sessions which failed since the last restart of the Cisco Unified Communications Manager service.
- **registeredHardwarePhones** - This represents the number of Cisco hardware IP phones (for example, models 7960, 7940,
7910, etc.) that are currently registered in the system.
- **gatewaysSessionsActive** - This is a real-time counter which specifies the total number of active recording sessions
between a recording-enabled gateway and a recording server.
- **gatewaysSessionsFailed** - This is a cumulative counter which specifies the total number of gateway-preferred
recording sessions which failed since the last restart of the Cisco Unified Communications Manager service.
- **phoneSessionsActive** - This is a real-time counter which specifies the total number of active recording sessions
between a Cisco IP Phone and a recording server.
- **phoneSessionsFailed** - This is a cumulative counter which specifies the total number of phone-preferred recording
sessions which failed since the last restart of the Cisco Unified Communications Manager service.
Program allow enabling/disabling standard GO client metrics. Detail about this metrics are described in [Exploring Prometheus GO client Metrics](https://povilasv.me/prometheus-go-metrics/#).
- **goCollector** - enable/disable internal program GO metrics
- **processStatus** - enable/disable internal program status metrics
## Log setup
Expand All @@ -83,7 +95,8 @@ Program support CLI parameters. All parameters are optional and overwrite same c
- **--version** - show actual program version
- **--config.show** - show actual configuration and ends
- **--config.file file_name** - start program with configuration file file_name, when omitted system use name "server.yml" in current directory
- **--config.file file_name** - start program with configuration file file_name, when omitted system use name "
server.yml" in current directory
- **--api.address fqdn_or_ip** - overwrite value `apiAddress` from configuration file with fqdn_or_ip
- **--api.user user_name** - overwrite value `apiUser` from configuration file with user_name
- **--api.pwd user_pwd** - overwrite value `apiPwd` from configuration file with user_pwd
Expand Down
4 changes: 3 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
monitor_names: ['publisher.name','subscriber01.name']
monitor_names: [ 'publisher.name','subscriber01.name' ]
metrics:
callsActive: true
callsInProgress: true
Expand All @@ -9,6 +9,8 @@ metrics:
gatewaysSessionsFailed: true
phoneSessionsActive: true
phoneSessionsFailed: true
goCollector: true
processStatus: true
port: 9719
apiAddress: publisher.name
apiUser: api_allowed_user
Expand Down
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ module github.com/pokornyIt/cucm_performance_exporter
go 1.15

require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/BurntSushi/toml v0.4.1 // indirect
github.com/alecthomas/units v0.0.0-20201120081800-1786d5ef83d4 // indirect
github.com/prometheus/client_golang v1.8.0
github.com/prometheus/common v0.15.0
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/common v0.31.1
github.com/sirupsen/logrus v1.7.0
golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/yaml.v2 v2.4.0
Expand Down
Loading

0 comments on commit d8089de

Please sign in to comment.