Ping_interval not able to override agent interval tag

Hello All,
I successfully installed Telegraf on Linux and ping plugin seems to be working fine with the bellow ping configuration.
Which says It will collect 1 ping value for every 10 seconds.
Just wanted to know if it is pinging the url all the time and sending data once every 10 seconds or it pings and sends data every 10seconds.
[agent]
interval = “10s”
flush_interval = “10s”
[[inputs.ping]]
urls = [“8.8.8.8”,“8.8.4.4”] #Add your ips list
count = 1
ping_interval = 10.0
timeout = 0.0

The issue I am having now is when I change the ping_interval to 300s then I am supposed to get one ping value for every 300sec(5 min) But when i see in influxDB it ping values are still being generated every 10seconds.
I guess This is because a conflict in between interval=10s and ping_interval=300.0. ping_interval can’t override the interval=10s . when I change the interval=300 then we are getting one ping value for every 300s.
[agent]
interval = “10s”
flush_interval = “10s”
[[inputs.ping]]
urls = [“8.8.8.8”,“8.8.4.4”] #Add your ips list
count = 1
ping_interval = 300.0
timeout = 0.0

Is there a way to set ping_interval to 300s and interval to 10s(in my case). Because I am using other input plugins which need to monitored every 10s but I dont want to ping to happen every 10 s

The ping_interval is only used when count > 1, but you can set interval on a per input basis:

[agent]
  interval = "10s"
  flush_interval = "10s"

[[inputs.ping]]
  urls = ["8.8.8.8","8.8.4.4"]
  interval = "5m"
  count = 1
  timeout = 5

Thanks @daniel adding the interval to ping input worked.
I also wanted to know if telegraf pings only once every 5m or it pings all the time and just sends an avarage value every 5m.

It will only ping every 5 minutes, since there is just a single ping all the aggregate values (min/max/average) should be the same. If you set count and ping_interval you can have it ping multiple times every 5m, and this could help prevent outlier values.