diff --git a/plugins/inputs/teamspeak/README.md b/plugins/inputs/teamspeak/README.md index 4767bb7e35171..ef3f0d8d9377b 100644 --- a/plugins/inputs/teamspeak/README.md +++ b/plugins/inputs/teamspeak/README.md @@ -31,6 +31,7 @@ the [Teamspeak 3 ServerQuery Manual](http://media.teamspeak.com/ts3_literature/T - packets_received_total - bytes_sent_total - bytes_received_total + - query_clients_online ### Tags: @@ -41,5 +42,5 @@ the [Teamspeak 3 ServerQuery Manual](http://media.teamspeak.com/ts3_literature/T ### Example output: ``` -teamspeak,virtual_server=1,name=LeopoldsServer,host=vm01 bytes_received_total=29638202639i,uptime=13567846i,total_ping=26.89,total_packet_loss=0,packets_sent_total=415821252i,packets_received_total=237069900i,bytes_sent_total=55309568252i,clients_online=11i 1507406561000000000 +teamspeak,virtual_server=1,name=LeopoldsServer,host=vm01 bytes_received_total=29638202639i,uptime=13567846i,total_ping=26.89,total_packet_loss=0,packets_sent_total=415821252i,packets_received_total=237069900i,bytes_sent_total=55309568252i,clients_online=11i,query_clients_online=1i 1507406561000000000 ``` \ No newline at end of file diff --git a/plugins/inputs/teamspeak/teamspeak.go b/plugins/inputs/teamspeak/teamspeak.go index 91fdf1135d742..ed565f086fa78 100644 --- a/plugins/inputs/teamspeak/teamspeak.go +++ b/plugins/inputs/teamspeak/teamspeak.go @@ -83,6 +83,7 @@ func (ts *Teamspeak) Gather(acc telegraf.Accumulator) error { "packets_received_total": sc.PacketsReceivedTotal, "bytes_sent_total": sc.BytesSentTotal, "bytes_received_total": sc.BytesReceivedTotal, + "query_clients_online": sm.QueryClientsOnline, } acc.AddFields("teamspeak", fields, tags) diff --git a/plugins/inputs/teamspeak/teamspeak_test.go b/plugins/inputs/teamspeak/teamspeak_test.go index b66948f289f3d..5faa5d795fe97 100644 --- a/plugins/inputs/teamspeak/teamspeak_test.go +++ b/plugins/inputs/teamspeak/teamspeak_test.go @@ -51,6 +51,7 @@ func TestGather(t *testing.T) { "packets_received_total": uint64(370), "bytes_sent_total": uint64(28058), "bytes_received_total": uint64(17468), + "query_clients_online": int(1), } acc.AssertContainsFields(t, "teamspeak", fields)