Add some tooling to package tcollector as an Arista EOS extension.

Change-Id: Ie8dd3a1c96f877f220148779624ec39db6bdf69d
Make BSD sed happy.

Change-Id: I1039fd6abdcb6c009798c40d57ea13d25dacbf91
Specify an RPM group to make rpmbuild < 4.6 happy.
Rename directory for building RPM.
Build two RPMs: one for Linux (RedHat/CentOS/Fedora), one for EOS.
Disable some RPM crap from distros.
Fix file permissions in RPM.
Install an init.d script.
Add install/uninstall hooks to register tcollector.
Do not consider non-executable files as collectors.
Add a -D/--daemonize flag to tcollector.
Fix path to tcollector in init.d script.

Change-Id: Ia91e1f0b493b8df1b0177b7d27349a83636d9223
Allow specifying more than one TSD on the command line.

This adds a -L / --hosts-list flag that can be used to specify more than
one TSD, in which case tcollector will attempt to connect to any of them
and will keep cycling through the list until it manages to connect.

Patch with changes from Benoit Sigoure.
Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>

Change-Id: Ic6887a2b459c63709e60fe8e47c92efd550ea6fc
Add a constant for the default port used by TSD.

Change-Id: I8c8a00bb481b789c98402b0e827cc04b5d24fcf2
Fix shutdown of collectors with children.

Make each collector subprocess a group leader.  Signal whole group.
This fixes #46.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Put the name of the collector we're waiting on when shutting down.

Original idea of Jacek Masiulaniec.
Correctly handle empty object arrays.

This fixes #37.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Oops, fix leftover from debugging.
Add UDP counters from /proc/net/snmp.

Refactor stats printing code so that it's more generic and can handle
multiple stats files.  New metrics:
  - net.stat.udp.datagrams
  - net.stat.udp.errors

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Handle --max-bytes being passed without --backup-count.

In this case we want to force --backup-count=1 so that
we can setup logging properly and rotate the log file.

This fixes #59.