Tutorial by Examples: collector

Scollector binaries for Windows, Mac, and Linux are available from the Bosun release page and can be saved to /opt/scollector/ or C:\Program Files\scollector\. The Scollector configuration file uses TOML v0.2.0 to specify various settings and defaults to being named scollector.toml in the same folde...
On Windows you can install Scollector as a service using the -winsvc="install" flag. On Mac and Linux you must manually create a service or init script. For example here is a basic systemd unit file: #Scollector unit file saved to /etc/systemd/system/scollector.service [Unit] Descriptio...
#Example of a PowerShell external collector. See http://bosun.org/scollector/external-collectors for details #This file should be saved in C:\Program Files\scollector\collectors\0\mymetrics.ps1 since it is a continuous output script #scollector.toml should have ColDir = 'C:\Program Files\scollecto...
The following can be saved as main.go. After you update the EDITME settings and build the executable it can be used as a continuous external collector. package main import ( "fmt" "log" "net/url" "strconv" "time" &...
The following Go file can be compiled into a continuous external collector that will query a MSSQL server database that uses the StackExchange.Exceptional schema. It will query multiple servers/databases for all exceptions since UTC 00:00 to convert the raw entries into a counter. It also uses the b...
Example init script for scollector: #!/bin/bash # # scollector Startup script for scollector. # # chkconfig: 2345 90 60 # description: scollector is a replacement for OpenTSDB's TCollector \ # and can be used to send metrics to a Bosun server # Source function library. . /etc/init....
#Create Scollector unit file at /etc/systemd/system/scollector.service [Unit] Description=Scollector Service After=network.target [Service] Type=simple User=root ExecStart=/opt/scollector/scollector -h mybosunserver.example.com Restart=on-abort [Install] WantedBy=multi-user.target #...
Chef Scollector Cookbook: https://github.com/alexmbird/chef-scollector Chef Bosun Cookbook: https://github.com/ptqa/chef-bosun Puppet scollector module: https://github.com/axibase/axibase-puppet-modules Bosun Ansible/Vagrant example: https://github.com/gnosek/bosun-deploy
The only time the garbage collector is needed is if you have a reference cycle. The simples example of a reference cycle is one in which A refers to B and B refers to A, while nothing else refers to either A or B. Neither A or B are accessible from anywhere in the program, so they can safely be dest...
5.2 Objects in lua are garbage collected. Sometimes, you need to free some resource, want to print a message or do something else when an object is destroyed (collected). For this, you can use the __gc metamethod, which gets called with the object as argument when the object is destroyed. You could...
As a privileged user (root or sudo): Create scollector directory: mkdir /opt/scollector In the /opt/scollector directory, download the latest binary build from the bosun/scollector site, [http://bosun.org/scollector/][1] wget https://github.com/bosun-monitor/bosun/releases/download/"version...
<# .DESCRIPTION Writes the metric out in bosun external collector format which is compatible with scollector external scripts .PARAMETER metric Name of the metric (eg : my.metric) .PARAMETER type Type of metric (counter, gauge, etc) .PARAMETER unit ...

Page 1 of 1