Compare commits
No commits in common. "add-upstream-snr" and "main" have entirely different histories.
add-upstre
...
main
3 changed files with 3 additions and 7 deletions
|
|
@ -35,6 +35,8 @@ 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
|
||||
|
|
@ -53,8 +55,6 @@ 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,7 +106,6 @@ 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,7 +36,6 @@ var (
|
|||
|
||||
centralFrequencyUpstreamDesc *prometheus.Desc
|
||||
powerUpstreamDesc *prometheus.Desc
|
||||
snrUpstreamDesc *prometheus.Desc
|
||||
rangingStatusUpstreamDesc *prometheus.Desc
|
||||
|
||||
startFrequencyOfdmaUpstreamDesc *prometheus.Desc
|
||||
|
|
@ -122,7 +121,6 @@ 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"}
|
||||
|
|
@ -193,6 +191,7 @@ func (c *Collector) Describe(ch chan<- *prometheus.Desc) {
|
|||
ch <- centralFrequencyDownstreamDesc
|
||||
ch <- powerDownstreamDesc
|
||||
ch <- snrDownstreamDesc
|
||||
ch <- snrDownstreamDesc
|
||||
|
||||
ch <- startFrequencyOfdmDownstreamDesc
|
||||
ch <- endFrequencyOfdmDownstreamDesc
|
||||
|
|
@ -204,7 +203,6 @@ func (c *Collector) Describe(ch chan<- *prometheus.Desc) {
|
|||
|
||||
ch <- centralFrequencyUpstreamDesc
|
||||
ch <- powerUpstreamDesc
|
||||
ch <- snrUpstreamDesc
|
||||
ch <- rangingStatusUpstreamDesc
|
||||
|
||||
ch <- startFrequencyOfdmaUpstreamDesc
|
||||
|
|
@ -305,7 +303,6 @@ 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