bosun.org: bosun.org/cmd/scollector/conf Index | Files

package conf

import "bosun.org/cmd/scollector/conf"

Package conf contains all of the configuration structs for scollector.

Index

Package Files

conf.go conf_linux.go

type AWS Uses

type AWS struct {
    AccessKey                string
    SecretKey                string
    Region                   string
    BillingProductCodesRegex string
    BillingBucketName        string
    BillingBucketPath        string
    BillingPurgeDays         int
}

type AzureEA Uses

type AzureEA struct {
    EANumber           uint32
    APIKey             string
    LogBillingDetails  bool
    LogResourceDetails bool
    LogExtraTags       bool
}

type Cadvisor Uses

type Cadvisor struct {
    URL         string
    PerCpuUsage bool
    IsRemote    bool
}

type Conf Uses

type Conf struct {
    // Host is the OpenTSDB or Bosun host to send data.
    Host string
    // FullHost enables full hostnames: doesn't truncate to first ".".
    FullHost bool
    // ColDir is the external collectors directory.
    ColDir string
    // Tags are added to every datapoint. If a collector specifies the same tag
    // key, this one will be overwritten. The host tag is not supported.
    Tags opentsdb.TagSet
    // Hostname overrides the system hostname.
    Hostname string
    // DisableSelf disables sending of scollector self metrics.
    DisableSelf bool
    // Freq is the default frequency in seconds for most collectors.
    Freq int
    // BatchSize is the number of metrics that will be sent in each batch.
    BatchSize int
    // MaxQueueLen is the number of metrics keept internally.
    MaxQueueLen int
    // MaxMem is the maximum number of megabytes that can be allocated
    // before scollector panics (shuts down). Default of 500 MB. This
    // is a saftey mechanism to protect the host from the monitoring
    // agent
    MaxMem uint64
    // Filter filters collectors matching these terms.
    Filter []string
    // PProf is an IP:Port binding to be used for debugging with pprof and expvar package.
    // When enabled data is exposed via http://host:port/debug/pprof or /debug/vars
    // Examples: localhost:6060 for loopback or :6060 for all IP addresses.
    PProf string
    // MetricFilters takes regular expressions and includes only indicies that
    // match those filters from being monitored
    MetricFilters []string

    // KeepalivedCommunity, if not empty, enables the Keepalived collector with
    // the specified community.
    KeepalivedCommunity string

    //Override default network interface expression
    IfaceExpr string

    // UseNtlm specifies if HTTP requests should authenticate with NTLM.
    UseNtlm bool

    // AuthToken is an optional string that sets the X-Access-Token HTTP header
    // which is used to authenticate against Bosun
    AuthToken string

    // UserAgentMessage is an optional message that is appended to the User Agent
    UserAgentMessage string

    // SNMPTimeout is the number of seconds to wait for SNMP responses (default 30)
    SNMPTimeout int

    // UseSWbemServicesClient specifies if the wmi package should use SWbemServices.
    UseSWbemServicesClient bool

    // MetricPrefix prepended to all metrics path
    MetricPrefix string

    HAProxy        []HAProxy
    SNMP           []SNMP
    MIBS           map[string]MIB
    ICMP           []ICMP
    Vsphere        []Vsphere
    AWS            []AWS
    AzureEA        []AzureEA
    Process        []ProcessParams
    SystemdService []ServiceParams
    ProcessDotNet  []ProcessDotNet
    HTTPUnit       []HTTPUnit
    Riak           []Riak
    Github         []Github
    Elastic        []Elastic
    // ElasticIndexFilters takes regular expressions and excludes indicies that
    // match those filters from being monitored for metrics in the elastic.indices
    // namespace
    ElasticIndexFilters []string
    // ElasticIndexFiltersInc is like ElasticIndexFilters, but only includes indices that match
    ElasticIndexFiltersInc []string
    RabbitMQ               []RabbitMQ
    Nexpose                []Nexpose
    GoogleAnalytics        []GoogleAnalytics
    GoogleWebmaster        []GoogleWebmaster
    Cadvisor               []Cadvisor
    RedisCounters          []RedisCounters
    ExtraHop               []ExtraHop
    LocalListener          string
    TagOverride            []TagOverride
    HadoopHost             string
    HbaseRegions           bool
    Oracles                []Oracle
    Fastly                 []Fastly
}

func (*Conf) InitializeSWbemServices Uses

func (c *Conf) InitializeSWbemServices()

type Elastic Uses

type Elastic struct {
    Host            string // default is localhost
    Port            uint16 // default is 9200
    ClusterInterval string // default is DefaultFreq
    IndexInterval   string // default is 15 mins
    User            string // default is empty
    Password        string // default is empty
    Disable         bool   // default is false.
    Name            string // default is host_port
    Scheme          string // default is http
}

Optional Elastic instance configuration - if omitted then the defaults are used You can also define multiple instances where more than one node is running

type ExtraHop Uses

type ExtraHop struct {
    Host                     string
    APIKey                   string
    FilterBy                 string
    FilterPercent            int
    AdditionalMetrics        []string
    CertificateSubjectMatch  string
    CertificateActivityGroup int
}

type Fastly Uses

type Fastly struct {
    Key            string
    StatusBaseAddr string
}

type Github Uses

type Github struct {
    Repo  string
    Token string
}

type GoogleAnalytics Uses

type GoogleAnalytics struct {
    ClientID  string
    Secret    string
    Token     string
    JSONToken string
    Sites     []GoogleAnalyticsSite
}

type GoogleAnalyticsSite Uses

type GoogleAnalyticsSite struct {
    Name     string
    Profile  string
    Offset   int
    Detailed bool
}

type GoogleWebmaster Uses

type GoogleWebmaster struct {
    ClientID  string
    Secret    string
    Token     string
    JSONToken string
}

type HAProxy Uses

type HAProxy struct {
    User      string
    Password  string
    Instances []HAProxyInstance
}

type HAProxyInstance Uses

type HAProxyInstance struct {
    User     string
    Password string
    Tier     string
    URL      string
}

type HTTPUnit Uses

type HTTPUnit struct {
    TOML  string
    Hiera string
    Freq  string
}

type ICMP Uses

type ICMP struct {
    Host string
}

type MIB Uses

type MIB struct {
    BaseOid string
    Metrics []MIBMetric // single key metrics
    Trees   []MIBTree   // tagged array metrics
}

type MIBMetric Uses

type MIBMetric struct {
    Metric      string
    Oid         string
    Unit        string // metadata unit
    RateType    string // defaults to gauge
    Description string
    FallbackOid string // Oid to try if main one doesn't work. Used in cisco where different models use different oids
    Tags        string // static tags to populate for this metric. "direction=in"
    Scale       float64
}

type MIBTag Uses

type MIBTag struct {
    Key string
    Oid string // If present will load from this oid. Use "idx" to populate with index of row instead of another oid.
}

type MIBTree Uses

type MIBTree struct {
    BaseOid string
    Tags    []MIBTag
    Metrics []MIBMetric
}

type Nexpose Uses

type Nexpose struct {
    Username string
    Password string
    Host     string
    Insecure bool
}

type Oracle Uses

type Oracle struct {
    ClusterName string
    Instances   []OracleInstance
}

type OracleInstance Uses

type OracleInstance struct {
    ConnectionString string
    Role             string
}

type ProcessDotNet Uses

type ProcessDotNet struct {
    Name string
}

type ProcessParams Uses

type ProcessParams struct {
    Command      string
    Name         string
    Args         string
    IncludeCount bool
}

type RabbitMQ Uses

type RabbitMQ struct {
    URL string
}

type RedisCounters Uses

type RedisCounters struct {
    Server   string
    Database int
}

type Riak Uses

type Riak struct {
    URL string
}

type SNMP Uses

type SNMP struct {
    Community string
    Host      string
    MIBs      []string
}

type ServiceParams Uses

type ServiceParams struct {
    Name      string
    WatchProc bool
}

type TagOverride Uses

type TagOverride struct {
    CollectorExpr string
    MatchedTags   map[string]string
    Tags          map[string]string
}

type Vsphere Uses

type Vsphere struct {
    Host     string
    User     string
    Password string
}

Package conf imports 1 packages (graph) and is imported by 10 packages. Updated 2019-01-17. Refresh now. Tools for package owners.