Telegraf not showing net activity

Using the default “host” dashboard in Chronograf shows everything fine except network activity.

If I look at the query it says:

SELECT non_negative_derivative(max("bytes_recv"), 1s) AS "received", non_negative_derivative(max("bytes_sent"), 1s) AS "sent" FROM "telegraf"."autogen"."net" WHERE time > :dashboardTime: AND "host" = :host: GROUP BY time(:interval:) FILL(null)

and I get “Your query is syntactically correct but returned no results”

I have the standard input plugins enabled in telegraf and a quick query of the telegraf database says:

name: net
time                host       icmp_inaddrmaskreps icmp_inaddrmasks icmp_incsumerrors icmp_indestunreachs icmp_inechoreps icmp_inechos icmp_inerrors icmp_inmsgs icmp_inparmprobs icmp_inredirects icmp_insrcquenchs icmp_intimeexcds icmp_intimestampreps icmp_intimestamps icmp_outaddrmaskreps icmp_outaddrmasks icmp_outdestunreachs icmp_outechoreps icmp_outechos icmp_outerrors icmp_outmsgs icmp_outparmprobs icmp_outredirects icmp_outsrcquenchs icmp_outtimeexcds icmp_outtimestampreps icmp_outtimestamps icmpmsg_intype0 icmpmsg_intype3 icmpmsg_outtype3 icmpmsg_outtype5 icmpmsg_outtype8 interface ip_defaultttl ip_forwarding ip_forwdatagrams ip_fragcreates ip_fragfails ip_fragoks ip_inaddrerrors ip_indelivers ip_indiscards ip_inhdrerrors ip_inreceives ip_inunknownprotos ip_outdiscards ip_outnoroutes ip_outrequests ip_reasmfails ip_reasmoks ip_reasmreqds ip_reasmtimeout tcp_activeopens tcp_attemptfails tcp_currestab tcp_estabresets tcp_incsumerrors tcp_inerrs tcp_insegs tcp_maxconn tcp_outrsts tcp_outsegs tcp_passiveopens tcp_retranssegs tcp_rtoalgorithm tcp_rtomax tcp_rtomin udp_ignoredmulti udp_incsumerrors udp_indatagrams udp_inerrors udp_noports udp_outdatagrams udp_rcvbuferrors udp_sndbuferrors udplite_ignoredmulti udplite_incsumerrors udplite_indatagrams udplite_inerrors udplite_noports udplite_outdatagrams udplite_rcvbuferrors udplite_sndbuferrors 

I note from this that there are no "bytes_recv" or "bytes_sent" data entities.

What am I missing?

You need to make sure the net plugin is enabled. When you query the net measurement, does it return data? Let’s make sure that there is something to query to begin with.

Here is an example that I use

SELECT non_negative_derivative(mean(“bytes_recv”), 10s) *8 AS “Mbps(bits)” FROM “telegraf”.“autogen”.“net” WHERE time > now() - 1h GROUP BY time(:interval:) FILL(null)

Remember in this example, this is going to take the average across all servers. I would add a group by host if you allow users to select multiple hosts in your dashboard

I ran your query and got “Your query is syntactically correct but returned no results” again. I have checked the .conf file and net is enabled. In fact doesn’t my query of measurements above show that “net” is indeed a measurement in telegraf.autogen. If I use the infllux console and attached to the telegraf database and ask for measurements, net is listed.

Damn! My mistake. Way down in my telegraf.conf I had specifically added Interfaces [“wlanl1”] and dropped that for using the Ethernet interface some months ago as the WiFi was flaky. I did a quick ifconfig command and saw my interface was enps05 put that in and all working now.

Awesome! I am glad you got it working!!