Telegraf: Test more than one port [up or down]

Created on 13 Jun 2018  ·  3Comments  ·  Source: influxdata/telegraf

Test more than one port [up or down] on my server

When I use the Telegraf to test UDP/TCP connections and check my server port status [up or down], I read https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/net_response and I can test one port. But I don't know how to find two ports. I modified the configuration.:
address = ["localhost:80","localhost:22"]

It didn't work. And I read the net_response.go. And I got that "address" is string. But I still don't know how to test two ports.

Current behavior:

address = "localhost:80"

Desired behavior:

It can test more ports

discussion

Most helpful comment

You can specify the plugin as many times as needed:

[[inputs.net_response]]
  address = "localhost:80"

[[inputs.net_response]]
  address = "localhost:22"

All 3 comments

You can specify the plugin as many times as needed:

[[inputs.net_response]]
  address = "localhost:80"

[[inputs.net_response]]
  address = "localhost:22"

Thank you! It worked!

Thank you very much!

Daniel Nelson notifications@github.com 于2018年6月14日周四 上午2:03写道:

You can specify the plugin as many times as needed:

[[inputs.net_response]]
address = "localhost:80"

[[inputs.net_response]]
address = "localhost:22"


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/influxdata/telegraf/issues/4279#issuecomment-397031181,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AM5OFC_fS2a8XtJroE0Dce_6qzIlYU1Vks5t8VPrgaJpZM4Ul00H
.

Was this page helpful?
0 / 5 - 0 ratings