Commit Graph

6 Commits

Author SHA1 Message Date
Lukasz Jagiello a29ca99ed7
typo 2016-05-26 02:22:44 +00:00
Lukasz Jagiello 7d06d89868
(varnish plugin) Test case for uint64 value. 2016-05-26 01:58:47 +00:00
Lukasz Jagiello e254ce8883
(varnish plugin) Correct type in test case 2016-05-26 01:10:39 +00:00
Lukasz Jagiello 22e15f3b5b
(varnish plugin) More int -> uint64 changes 2016-05-26 00:23:33 +00:00
Lukasz Jagiello e3e6fa4f1d
Sudo support for ceph/varnish plugin
In many default installations ceph and varnish binaries require root
permissions or specific user permissions to actually gather metrics.

Although it's possible to instrumented system configuration to either
run telegraf with root privileges or share the same user/permissions as
measured software it's not a default setup.

In my opinion ability to run binary with `sudo` makes entire setup
simpler without additional interaction.

My changes allow to use configuration like:
```
binary = "/usr/bin/sudo /usr/bin/varnishstat"
ceph_binary = "/usr/bin/sudo /usr/bin/ceph"
```

With a proper sudo configuration it will simplify amount of changes
needed to collect metrics.

I've also changed type of varnish metrics. It was `int` but in varnish source
code we can find all metrics are actually uint64
(https://github.com/varnishcache/varnish-cache/blob/master/include/tbl/vsc_f_main.h)

I hit that issue with some metrics:
```
~# varnishstat -1 | grep -i MAIN.n_objectcore
MAIN.n_objectcore      18446744073709550877          .   objectcore structs made
```
2016-05-25 23:49:42 +00:00
robinpercy-xm 1248934f3e Adding Varnish HTTP Cache input plugin (#1173)
* Adding Varnish HTTP Cache input plugin

* Applying PR feedback

- Linked to varnish in input README
- Updated README/CHANGELOG
- Cleaned up sampleConfig to remove formatting
- Shorted lines to 80 chars (except where test input requires long strings)
- Using internal.RunTimeout to wrap call to varnishtat
- Added dummy file for windows
2016-05-24 11:06:25 +01:00