Teamspeak input plugin query clients (#8950)
* Add query_clients_online to the teamspeak input plugin * Update readme for teamspeak input plugin following introduction of new query_clients_online field
This commit is contained in:
parent
808b7c1ba5
commit
c4a126073c
|
|
@ -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
|
||||
```
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue