Please bear with me, I am getting my feet wet with Grafana/Telegraf/InfluxDB.
I succeeded following tutorials to poll a router via snmp and have its traffic graphed. Nice!
Now, I need a table containing traffic per time frame, especially daily. Something like this:
| Day | ifHCInOctets | ifHCOutOctets | Total |
|-------------------|---------------|---------------|----------|
| February 21, 2017 | xy GB | xy GB | xy GB |
| February 20, 2017 | xy GB | xy GB | xy GB |
| February 19, 2017 | xy GB | xy GB | xy GB |
I have seen the advice in How can I aggregate metrics per day in a Grafana table?, but the web editor can't be fed with it(?).
Thank you for reading.
Edit: Thank you for your comment, which is greatly appreciated. In fact, my values are cumulative counters, just like they are polled via SNMP. I was mostly following the tutorial at https://lkhill.com/telegraf-influx-grafana-network-stats/.
So, my task at hand seems to be to generate a sane database, and record data deltas (counter rollover also has to be taken in account, right?). How could I accomplish this? My Google-Fu is failing me greatly.
The result SHOW TAG KEYS & SHOW FIELD KEYS is as follows:
Connected to http://localhost:8086 version 1.4.2
InfluxDB shell version: 1.4.2
SHOW TAG KEYS;
name: cpu
tagKey
------
cpu
host
name: disk
tagKey
------
device
fstype
host
mode
path
name: diskio
tagKey
------
host
name
name: interface
tagKey
------
agent_host
dot3StatsIndex
host
hostname
ifDescr
ifIndex
name: kernel
tagKey
------
host
name: mem
tagKey
------
host
name: processes
tagKey
------
host
name: snmp
tagKey
------
agent_host
host
hostname
ifName
name: swap
tagKey
------
host
name: system
tagKey
------
host
SHOW FIELD KEYS;
name: cpu
fieldKey fieldType
-------- ---------
usage_guest float
usage_guest_nice float
usage_idle float
usage_iowait float
usage_irq float
usage_nice float
usage_softirq float
usage_steal float
usage_system float
usage_user float
name: disk
fieldKey fieldType
-------- ---------
free integer
inodes_free integer
inodes_total integer
inodes_used integer
total integer
used integer
used_percent float
name: diskio
fieldKey fieldType
-------- ---------
io_time integer
iops_in_progress integer
read_bytes integer
read_time integer
reads integer
weighted_io_time integer
write_bytes integer
write_time integer
writes integer
name: interface
fieldKey fieldType
-------- ---------
dot3StatsAlignmentErrors integer
dot3StatsCarrierSenseErrors integer
dot3StatsDeferredTransmissions integer
dot3StatsDuplexStatus integer
dot3StatsEtherChipSet string
dot3StatsExcessiveCollisions integer
dot3StatsFCSErrors integer
dot3StatsFrameTooLongs integer
dot3StatsInternalMacReceiveErrors integer
dot3StatsInternalMacTransmitErrors integer
dot3StatsLateCollisions integer
dot3StatsMultipleCollisionFrames integer
dot3StatsSQETestErrors integer
dot3StatsSingleCollisionFrames integer
dot3StatsSymbolErrors integer
ifAdminStatus integer
ifAlias string
ifConnectorPresent integer
ifCounterDiscontinuityTime integer
ifDescr string
ifHCInBroadcastPkts integer
ifHCInMulticastPkts integer
ifHCInOctets integer
ifHCInUcastPkts integer
ifHCOutBroadcastPkts integer
ifHCOutMulticastPkts integer
ifHCOutOctets integer
ifHCOutUcastPkts integer
ifHighSpeed integer
ifInBroadcastPkts integer
ifInDiscards integer
ifInErrors integer
ifInMulticastPkts integer
ifInOctets integer
ifInUcastPkts integer
ifInUnknownProtos integer
ifLastChange integer
ifLinkUpDownTrapEnable integer
ifMtu integer
ifName string
ifOperStatus integer
ifOutBroadcastPkts integer
ifOutDiscards integer
ifOutErrors integer
ifOutMulticastPkts integer
ifOutOctets integer
ifOutUcastPkts integer
ifPhysAddress string
ifPromiscuousMode integer
ifSpeed integer
ifType integer
name: kernel
fieldKey fieldType
-------- ---------
boot_time integer
context_switches integer
interrupts integer
processes_forked integer
name: mem
fieldKey fieldType
-------- ---------
active integer
available integer
available_percent float
buffered integer
cached integer
free integer
inactive integer
slab integer
total integer
used integer
used_percent float
name: processes
fieldKey fieldType
-------- ---------
blocked integer
dead integer
idle integer
paging integer
running integer
sleeping integer
stopped integer
total integer
total_threads integer
unknown integer
zombies integer
name: snmp
fieldKey fieldType
-------- ---------
ifAlias string
ifConnectorPresent integer
ifCounterDiscontinuityTime integer
ifHCInBroadcastPkts integer
ifHCInMulticastPkts integer
ifHCInOctets integer
ifHCInUcastPkts integer
ifHCOutBroadcastPkts integer
ifHCOutMulticastPkts integer
ifHCOutOctets integer
ifHCOutUcastPkts integer
ifHighSpeed integer
ifInBroadcastPkts integer
ifInMulticastPkts integer
ifLinkUpDownTrapEnable integer
ifName string
ifOutBroadcastPkts integer
ifOutMulticastPkts integer
ifPromiscuousMode integer
uptime integer
name: swap
fieldKey fieldType
-------- ---------
free integer
in integer
out integer
total integer
used integer
used_percent float
name: system
fieldKey fieldType
-------- ---------
load1 float
load15 float
load5 float
n_cpus integer
n_users integer
uptime integer
uptime_format string