Fix internet traffic meter counters
This commit is contained in:
+5
-5
@@ -4,7 +4,7 @@
|
|||||||
- 'time'
|
- 'time'
|
||||||
- 'date'
|
- 'date'
|
||||||
|
|
||||||
# SNMP (Juniper) router traffic sensor
|
# SNMP (VyOS) cumulative traffic counters; one octet is one byte.
|
||||||
- platform: snmp
|
- platform: snmp
|
||||||
name: snmp_wan_in
|
name: snmp_wan_in
|
||||||
unique_id: '3303381540758'
|
unique_id: '3303381540758'
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
# baseoid: .1.3.6.1.2.1.2.2.1.10.12
|
# baseoid: .1.3.6.1.2.1.2.2.1.10.12
|
||||||
baseoid: .1.3.6.1.2.1.31.1.1.1.6.12 # IF-MIB::ifHCInOctets.12
|
baseoid: .1.3.6.1.2.1.31.1.1.1.6.12 # IF-MIB::ifHCInOctets.12
|
||||||
version: 2c
|
version: 2c
|
||||||
unit_of_measurement: "Octets"
|
unit_of_measurement: "B"
|
||||||
- platform: snmp
|
- platform: snmp
|
||||||
name: snmp_wan_out
|
name: snmp_wan_out
|
||||||
unique_id: '1573258703922'
|
unique_id: '1573258703922'
|
||||||
@@ -24,17 +24,17 @@
|
|||||||
# baseoid: .1.3.6.1.2.1.2.2.1.16.12
|
# baseoid: .1.3.6.1.2.1.2.2.1.16.12
|
||||||
baseoid: .1.3.6.1.2.1.31.1.1.1.10.12 # IF-MIB::ifHCOutOctets.12
|
baseoid: .1.3.6.1.2.1.31.1.1.1.10.12 # IF-MIB::ifHCOutOctets.12
|
||||||
version: 2c
|
version: 2c
|
||||||
unit_of_measurement: "Octets"
|
unit_of_measurement: "B"
|
||||||
|
|
||||||
- platform: derivative
|
- platform: derivative
|
||||||
source: sensor.snmp_wan_in
|
source: sensor.snmp_wan_in
|
||||||
unit_time: s
|
unit_time: s
|
||||||
unit: B
|
unit: B/s
|
||||||
name: wan_in_derivative
|
name: wan_in_derivative
|
||||||
- platform: derivative
|
- platform: derivative
|
||||||
source: sensor.snmp_wan_out
|
source: sensor.snmp_wan_out
|
||||||
unit_time: s
|
unit_time: s
|
||||||
unit: B
|
unit: B/s
|
||||||
name: wan_out_derivative
|
name: wan_out_derivative
|
||||||
|
|
||||||
- platform: statistics
|
- platform: statistics
|
||||||
|
|||||||
+20
-13
@@ -1,40 +1,47 @@
|
|||||||
# Internet traffic
|
# Internet traffic: difference cumulative byte counters, not derivative rates (B/s).
|
||||||
|
# Allow counters to reset when the router/interface restarts.
|
||||||
internet_usage_in_monthly:
|
internet_usage_in_monthly:
|
||||||
source: sensor.wan_in_derivative
|
source: sensor.snmp_wan_in
|
||||||
name: Monthly internet traffic in
|
name: Monthly internet traffic in
|
||||||
unique_id: monthly_internet_traffic_in
|
unique_id: monthly_internet_traffic_in
|
||||||
cycle: monthly
|
cycle: monthly
|
||||||
delta_values: True
|
delta_values: false
|
||||||
|
periodically_resetting: true
|
||||||
internet_usage_out_monthly:
|
internet_usage_out_monthly:
|
||||||
source: sensor.wan_out_derivative
|
source: sensor.snmp_wan_out
|
||||||
name: Monthly internet traffic out
|
name: Monthly internet traffic out
|
||||||
unique_id: monthly_internet_traffic_out
|
unique_id: monthly_internet_traffic_out
|
||||||
cycle: monthly
|
cycle: monthly
|
||||||
delta_values: True
|
delta_values: false
|
||||||
|
periodically_resetting: true
|
||||||
internet_usage_in_daily:
|
internet_usage_in_daily:
|
||||||
source: sensor.wan_in_derivative
|
source: sensor.snmp_wan_in
|
||||||
name: Daily internet traffic in
|
name: Daily internet traffic in
|
||||||
unique_id: daily_internet_traffic_in
|
unique_id: daily_internet_traffic_in
|
||||||
cycle: daily
|
cycle: daily
|
||||||
delta_values: True
|
delta_values: false
|
||||||
|
periodically_resetting: true
|
||||||
internet_usage_out_daily:
|
internet_usage_out_daily:
|
||||||
source: sensor.wan_out_derivative
|
source: sensor.snmp_wan_out
|
||||||
name: Daily internet traffic out
|
name: Daily internet traffic out
|
||||||
unique_id: daily_internet_traffic_out
|
unique_id: daily_internet_traffic_out
|
||||||
cycle: daily
|
cycle: daily
|
||||||
delta_values: True
|
delta_values: false
|
||||||
|
periodically_resetting: true
|
||||||
internet_usage_in_hourly:
|
internet_usage_in_hourly:
|
||||||
source: sensor.wan_in_derivative
|
source: sensor.snmp_wan_in
|
||||||
name: Hourly internet traffic in
|
name: Hourly internet traffic in
|
||||||
unique_id: hourly_internet_traffic_in
|
unique_id: hourly_internet_traffic_in
|
||||||
cycle: hourly
|
cycle: hourly
|
||||||
delta_values: True
|
delta_values: false
|
||||||
|
periodically_resetting: true
|
||||||
internet_usage_out_hourly:
|
internet_usage_out_hourly:
|
||||||
source: sensor.wan_out_derivative
|
source: sensor.snmp_wan_out
|
||||||
name: Hourly internet traffic out
|
name: Hourly internet traffic out
|
||||||
unique_id: hourly_internet_traffic_out
|
unique_id: hourly_internet_traffic_out
|
||||||
cycle: hourly
|
cycle: hourly
|
||||||
delta_values: True
|
delta_values: false
|
||||||
|
periodically_resetting: true
|
||||||
|
|
||||||
# Energy
|
# Energy
|
||||||
energy_import_daily:
|
energy_import_daily:
|
||||||
|
|||||||
Reference in New Issue
Block a user