Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientScrapeConfig = prometheus.ScrapeConfig{ JobName: "nomad-clients", Params: url.Values{"format": []string{"prometheus"}}, MetricsPath: "/v1/metrics", ConsulServiceDiscoveryConfigs: []prometheus.ConsulServiceDiscoveryConfig{ { Server: "127.0.0.1:8500", }, }, RelabelConfigs: []prometheus.RelabelConfig{ { Action: prometheus.Keep, SourceLabels: model.LabelNames{model.MetaLabelPrefix + "consul_tags"}, Regex: ".*,prom,.*", }, }, }
View Source
var PortNames = struct { HTTP string Serf string RPC string }{ "http", "serf", "rpc", }
View Source
var ServerScrapeConfig = prometheus.ScrapeConfig{ JobName: "nomad", Params: url.Values{"format": []string{"prometheus"}}, MetricsPath: "/v1/metrics", RelabelConfigs: []prometheus.RelabelConfig{ { Action: prometheus.Replace, SourceLabels: model.LabelNames{model.MetricNameLabel}, Regex: "nomad_raft_replication_(appendEntries_rpc|appendEntries_logs|heartbeat|installSnapshot)_([^:]*:\\d+)(_sum|_count)?", TargetLabel: model.MetricNameLabel, Replacement: "nomad_raft_replication_${1}${3}", }, { Action: prometheus.Replace, SourceLabels: model.LabelNames{model.MetricNameLabel}, Regex: "nomad_raft_replication_(appendEntries_rpc|appendEntries_logs|heartbeat|installSnapshot)_([^:]*:\\d+)(_sum|_count)?", TargetLabel: "raft_id", Replacement: "${2}", }, }, }
Functions ¶
Types ¶
type NomadConfig ¶
type NomadConfig struct { Common runner.Config // BootstrapExpect is how many servers to wait for when bootstrapping; // set this to 0 for clients. BootstrapExpect int // ConsulAddr is the address of the (normally local) consul agent, format is Host:Port ConsulAddr string }
func NewConfig ¶
func NewConfig(bootstrapExpect int, consulAddr string, tls *pki.TLSConfigPEM) NomadConfig
func (NomadConfig) Args ¶
func (nc NomadConfig) Args() []string
func (NomadConfig) Config ¶
func (nc NomadConfig) Config() runner.Config
func (NomadConfig) Env ¶
func (nc NomadConfig) Env() []string
func (NomadConfig) Files ¶
func (nc NomadConfig) Files() map[string]string
func (NomadConfig) Name ¶
func (nc NomadConfig) Name() string
func (NomadConfig) WithConfig ¶
func (nc NomadConfig) WithConfig(cfg runner.Config) runner.Command
Click to show internal directories.
Click to hide internal directories.