v0.0.0-...-a19e79c Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2015 License: MIT Imports: 25 Imported by: 0



scollector is a replacement for OpenTSDB's tcollector.

Benefits of scollector over tcollector:

  • uses the OpenTSDB v2 API, not the older v1 API
  • more resource efficient
  • integrates with Bosun
  • comes with many collectors for Windows, Linux, and Mac

OpenTSDB 1.0 uses tcollector to collect data. This project aims to make scollector the preferred collector for OpenTSDB 2.0.




Scollector is a metric collection agent for OpenTSDB 2.0 and Bosun.

tcollector ( is OpenTSDB's data collection framework built for OpenTSDB 1.0. scollector aims to be tcollector for OpenTSDB 2.0 and is one method of sending data to Bosun ( for monitoring.

Unlike tcollector, scollector is a single binary where all collectors are compiled into scollector itself. scollector supports external collectors, but your goal should be to use those temporarily until the go version is written or the target system send data directly to OpenTSDB or Bosun. scollector has native collectors for Linux, Darwin, and Windows and can pull data from other systems such as AWS, SNMP, and vSphere.


scollector [flag]

The flags are:

	OpenTSDB or Bosun host. Overrides Host in conf file.
	Filters collectors matching these terms, separated by
	comma. Overrides Filter in conf file.
	OpenTSDB batch size. Default is 500.
	Location of configuration file. Defaults to scollector.toml in directory of
	the scollector executable.
	List available collectors (after Filter is applied).
	Disable sending of metadata.
	Prints the version and exits.

Additional flags on Windows:

	Windows Service management; can be: install, remove, start, stop

Debug flags:

	enables debug output
	print to screen instead of sending to a host
	generates X fake data points per second on the test.fake metric

The only required paremeter is the host, which may be specified in the conf file or with -h.


scollector has not been tested outside of the Stack Exchange environment, and thus may act incorrectly elsewhere.

scollector requires the new HTTP API of OpenTSDB 2.1 with gzip support. Ensure that is in use if not using the OpenTSDB docker image.


If started with -p or -d, scollector logs to Stdout. Otherwise, on Unixes, scollector logs to syslog. On Windows when started as a service, the Event Log is used.

External Collectors

See for details about using external scripts or programs to collect metrics.

Configuration File

If scollector.toml exists in the same directory as the scollector executable or is specified via the -conf="" flag, it's content will be used to set configuration flags. The format is toml ( Available keys are:

Host (string): the OpenTSDB or Bosun host to send data, supports TLS and HTTP Basic Auth.

Host = ""

FullHost (boolean): enables full hostnames: doesn't truncate to first ".".

ColDir (string): is the external collectors directory.

Tags (table of strings): are added to every datapoint. If a collector specifies the same tag key, this one will be overwritten. The host tag is not supported.

Hostname (string): overrides the system hostname.

DisableSelf (boolean): disables sending of scollector self metrics.

Freq (integer): is the default frequency in seconds for most collectors.

BatchSize (integer): is the number of metrics that will be sent in each batch. Default is 500.

Filter (array of string): filters collectors matching these terms.

PProf (string): optional IP:Port binding to be used for debugging with pprof. Examples: localhost:6060 for loopback or :6060 for all IP addresses.

Collector configuration keys

Following are configurations for collectors that do not autodetect.

KeepalivedCommunity (string): if not empty, enables the Keepalived collector with the specified community.

KeepalivedCommunity = "keepalivedcom"

HAProxy (array of table, keys are User, Password, Instances): HAProxy instances to poll. The Instances key is an array of table with keys Tier and URL.

  User = "hauser"
  Password = "hapass"
    Tier = "1"
    URL = "http://ny-host01:17/haproxy\;csv"
    Tier = "2"
    URL = "http://ny-host01:26/haproxy\;csv"
    Tier = "3"
    URL = "http://ny-host01:40/haproxy\;csv"

SNMP (array of table, keys are Community and Host): SNMP hosts to connect to at a 5 minute poll interval.

  Community = "com"
  Host = "host"
  MIBs = ["cisco"]
  Community = "com2"
  Host = "host2"
  # List of mibs to run for this host. Default is built-in set of ["ifaces","cisco"]
  MIBs = ["custom", "ifaces"]

MIBs (map of string to table): Allows user-specified, custom SNMP configurations.

  [] #can name anything you want
    BaseOid = "" # common base for all metrics in this mib

    # simple, single key metrics
      Metric = "cisco.cpu"
      Oid = "."
      Unit = "percent"
      RateType = "gauge"
      Description = "cpu percent used by this device"

    # can also iterate over snmp tables
      BaseOid = "." #common base oid for this tree

      # tags to apply to metrics in this tree. Can come from another oid, or specify "idx" to use
      # the numeric index as the tag value. Can specify multiple tags, but must supply one.
      # all tags and metrics should have the same number of rows per query.
        Key = "name"
        Oid = ".2"
        Metric = "cisco.mem.used"
        Oid = ".5"
        Metric = ""
        Oid = ".6"

ICMP (array of table, keys are Host): ICMP hosts to ping.

  Host = "internal-router"
  Host = "backup-router"

Vsphere (array of table, keys are Host, User, Password): vSphere hosts to poll.

  Host = "vsphere01"
  User = "vuser"
  Password = "pass"

AWS (array of table, keys are AccessKey, SecretKey, Region): AWS hosts to poll.

  AccessKey = "aoesnuth"
  SecretKey = "snch0d"
  Region = "somewhere"

Process: processes to monitor.

ProcessDotNet: .NET processes to monitor on Windows.

See for details about Process and ProcessDotNet.

HTTPUnit (array of table, keys are TOML, Hiera): httpunit TOML and Hiera files to read and monitor. See for documentation about the toml file. TOML and Hiera may both be specified, or just one.

  TOML = "/path/to/httpunit.toml"
  Hiera = "/path/to/listeners.json"
  TOML = "/some/other.toml"

Riak (array of table, keys are URL): Riak hosts to poll.

  URL = "http://localhost:8098/stats"

RabbitMQ (array of table, keys are URL): RabbitMQ hosts to poll. Regardless of config the collector will automatically poll management plugin on http://guest:guest@ .

  URL = "https://user:password@hostname:15671"


scollector has full Windows support. It can be run standalone, or installed as a service (see -winsvc). The Event Log is used when installed as a service.


Path Synopsis
Package conf contains all of the configuration structs for scollector.
Package conf contains all of the configuration structs for scollector.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL