Compare commits
1 commit
main
...
add-upstre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6902be9eb |
3 changed files with 7 additions and 3 deletions
|
|
@ -35,8 +35,6 @@ Usage of ./vodafone-station-exporter:
|
|||
- Labels: `id`, `channel_id`, `fft`, `channel_type`
|
||||
* `vodafone_station_downstream_snr_dB`: SNR in dB
|
||||
- Labels: `id`, `channel_id`, `fft`, `channel_type`
|
||||
* `vodafone_station_downstream_snr_dB`: SNR in dB
|
||||
- Labels: `id`, `channel_id`, `fft`, `channel_type`
|
||||
* `vodafone_station_ofdm_downstream_start_frequency_hertz`: Start frequency
|
||||
- Labels: `id`, `channel_id_ofdm`, `fft`, `channel_type`
|
||||
* `vodafone_station_ofdm_downstream_end_frequency_hertz`: End frequency
|
||||
|
|
@ -55,6 +53,8 @@ Usage of ./vodafone-station-exporter:
|
|||
- Labels: `id`, `channel_id_up`, `fft`, `channel_type`
|
||||
* `vodafone_station_upstream_power_dBmV`: Power
|
||||
- Labels: `id`, `channel_id_up`, `fft`, `channel_type`
|
||||
* `vodafone_station_upstream_snr_dB`: SNR in dB
|
||||
- Labels: `id`, `channel_id_up`, `fft`, `channel_type`
|
||||
* `vodafone_station_upstream_ranging_status_info`: Ranging status
|
||||
- Labels: `id`, `channel_id_up`, `fft`, `channel_type`, `status`
|
||||
* `vodafone_station_firewall_status_info`: Firewall status
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ type DocsisUpstreamChannel struct {
|
|||
ChannelIdUp string `json:"channelidup"`
|
||||
CentralFrequency string `json:"CentralFrequency"`
|
||||
Power string `json:"power"`
|
||||
Snr string `json:"SNR"`
|
||||
ChannelType string `json:"ChannelType"`
|
||||
Fft string `json:"FFT"`
|
||||
RangingStatus string `json:"RangingStatus"`
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ var (
|
|||
|
||||
centralFrequencyUpstreamDesc *prometheus.Desc
|
||||
powerUpstreamDesc *prometheus.Desc
|
||||
snrUpstreamDesc *prometheus.Desc
|
||||
rangingStatusUpstreamDesc *prometheus.Desc
|
||||
|
||||
startFrequencyOfdmaUpstreamDesc *prometheus.Desc
|
||||
|
|
@ -121,6 +122,7 @@ func init() {
|
|||
upstreamLabels := []string{"id", "channel_id_up", "fft", "channel_type"}
|
||||
centralFrequencyUpstreamDesc = prometheus.NewDesc(prefix+"upstream_central_frequency_hertz", "Central frequency", upstreamLabels, nil)
|
||||
powerUpstreamDesc = prometheus.NewDesc(prefix+"upstream_power_dBmV", "Power", upstreamLabels, nil)
|
||||
snrUpstreamDesc = prometheus.NewDesc(prefix+"upstream_snr_dB", "SNR in dB", upstreamLabels, nil)
|
||||
rangingStatusUpstreamDesc = prometheus.NewDesc(prefix+"upstream_ranging_status_info", "Ranging status", append(upstreamLabels, "status"), nil)
|
||||
|
||||
ofdmaUpstreamLabels := []string{"id", "channel_id_up", "fft", "channel_type"}
|
||||
|
|
@ -191,7 +193,6 @@ func (c *Collector) Describe(ch chan<- *prometheus.Desc) {
|
|||
ch <- centralFrequencyDownstreamDesc
|
||||
ch <- powerDownstreamDesc
|
||||
ch <- snrDownstreamDesc
|
||||
ch <- snrDownstreamDesc
|
||||
|
||||
ch <- startFrequencyOfdmDownstreamDesc
|
||||
ch <- endFrequencyOfdmDownstreamDesc
|
||||
|
|
@ -203,6 +204,7 @@ func (c *Collector) Describe(ch chan<- *prometheus.Desc) {
|
|||
|
||||
ch <- centralFrequencyUpstreamDesc
|
||||
ch <- powerUpstreamDesc
|
||||
ch <- snrUpstreamDesc
|
||||
ch <- rangingStatusUpstreamDesc
|
||||
|
||||
ch <- startFrequencyOfdmaUpstreamDesc
|
||||
|
|
@ -303,6 +305,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) {
|
|||
labels := []string{upstreamChannel.Id, upstreamChannel.ChannelIdUp, upstreamChannel.Fft, upstreamChannel.ChannelType}
|
||||
ch <- prometheus.MustNewConstMetric(centralFrequencyUpstreamDesc, prometheus.GaugeValue, parse2float(upstreamChannel.CentralFrequency)*10e9, labels...)
|
||||
ch <- prometheus.MustNewConstMetric(powerUpstreamDesc, prometheus.GaugeValue, parse2float(upstreamChannel.Power), labels...)
|
||||
ch <- prometheus.MustNewConstMetric(snrUpstreamDesc, prometheus.GaugeValue, parse2float(upstreamChannel.Snr), labels...)
|
||||
ch <- prometheus.MustNewConstMetric(rangingStatusUpstreamDesc, prometheus.GaugeValue, 1, append(labels, upstreamChannel.RangingStatus)...)
|
||||
}
|
||||
for _, ofdmaUpstreamChannel := range docsisStatusResponse.Data.OfdmaUpstreamData {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue