apiVersion: influxdata.com/v2alpha1 kind: Label metadata: name: optimistic-shannon-5a2001 spec: color: '#BF3D5E' name: haproxy --- apiVersion: influxdata.com/v2alpha1 kind: Bucket metadata: name: goofy-goldwasser-5a2005 spec: associations: - kind: Label name: optimistic-shannon-5a2001 name: haproxy --- apiVersion: influxdata.com/v2alpha1 kind: Dashboard metadata: name: zen-solomon-5a2001 spec: associations: - kind: Label name: optimistic-shannon-5a2001 charts: - colors: - hex: '#00C9FF' name: laser type: min - hex: '#9394FF' name: comet type: max value: 100 decimalPlaces: 2 height: 3 kind: Gauge name: CPU Usage queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "cpu") |> filter(fn: (r) => r["_field"] == "usage_system") width: 3 - axes: - base: "10" name: x scale: linear - base: "10" name: y scale: linear colors: - hex: '#31C0F6' name: Nineteen Eighty Four type: scale - hex: '#A500A5' name: Nineteen Eighty Four type: scale - hex: '#FF7E27' name: Nineteen Eighty Four type: scale geom: monotoneX height: 3 kind: Xy name: Bytes IN position: overlaid queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "haproxy") |> filter(fn: (r) => r["_field"] == "bin") |> derivative(unit: v.windowPeriod, nonNegative: true) |> yield(name: "nonnegative derivative") shade: true width: 6 xCol: _time yCol: _value yPos: 3 - axes: - base: "10" name: x scale: linear - base: "10" name: y scale: linear colors: - hex: '#31C0F6' name: Nineteen Eighty Four type: scale - hex: '#A500A5' name: Nineteen Eighty Four type: scale - hex: '#FF7E27' name: Nineteen Eighty Four type: scale geom: monotoneX height: 3 kind: Xy name: Active Sessions position: overlaid queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "haproxy") |> filter(fn: (r) => r["_field"] == "scur") |> aggregateWindow(every: v.windowPeriod, fn: mean) |> yield(name: "mean") shade: true width: 4 xCol: _time yCol: _value yPos: 6 - axes: - base: "10" name: x scale: linear - base: "10" name: y scale: linear colors: - hex: '#31C0F6' name: Nineteen Eighty Four type: scale - hex: '#A500A5' name: Nineteen Eighty Four type: scale - hex: '#FF7E27' name: Nineteen Eighty Four type: scale geom: monotoneX height: 3 kind: Xy name: total number of HTTP requests received position: overlaid queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "haproxy") |> filter(fn: (r) => r["_field"] == "req_tot") |> derivative(unit: v.windowPeriod, nonNegative: true) |> yield(name: "nonnegative derivative") shade: true width: 4 xCol: _time yCol: _value yPos: 9 - colors: - hex: '#00C9FF' name: laser type: text decimalPlaces: 2 height: 1 kind: Single_Stat name: Uptime queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "system") |> filter(fn: (r) => r["_field"] == "uptime_format") width: 3 xPos: 3 - colors: - hex: '#00C9FF' name: laser type: text decimalPlaces: 2 height: 2 kind: Single_Stat name: Memory Used (%) queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "mem") |> filter(fn: (r) => r["_field"] == "used_percent") suffix: ' %' width: 2 xPos: 3 yPos: 1 - axes: - base: "10" name: x scale: linear - base: "10" name: y scale: linear colors: - hex: '#31C0F6' name: Nineteen Eighty Four type: scale - hex: '#A500A5' name: Nineteen Eighty Four type: scale - hex: '#FF7E27' name: Nineteen Eighty Four type: scale geom: monotoneX height: 3 kind: Xy name: Sessions position: overlaid queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "haproxy") |> filter(fn: (r) => r["_field"] == "stot") |> derivative(unit: v.windowPeriod, nonNegative: false) |> yield(name: "derivative") shade: true width: 4 xCol: _time xPos: 4 yCol: _value yPos: 6 - axes: - base: "10" name: y scale: linear - base: "10" name: x scale: linear colors: - hex: '#31C0F6' name: Nineteen Eighty Four type: scale - hex: '#A500A5' name: Nineteen Eighty Four type: scale - hex: '#FF7E27' name: Nineteen Eighty Four type: scale geom: monotoneX height: 3 kind: Xy name: Denied Request position: overlaid queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "haproxy") |> filter(fn: (r) => r["_field"] == "dreq") |> derivative(unit: v.windowPeriod, nonNegative: false) |> yield(name: "derivative") shade: true width: 4 xCol: _time xPos: 4 yCol: _value yPos: 9 - axes: - base: "10" name: y scale: linear - base: "10" name: x scale: linear colors: - hex: '#31C0F6' name: Nineteen Eighty Four type: scale - hex: '#A500A5' name: Nineteen Eighty Four type: scale - hex: '#FF7E27' name: Nineteen Eighty Four type: scale geom: line height: 2 kind: Xy name: Queue Size position: overlaid queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "haproxy") |> filter(fn: (r) => r["_field"] == "qcur") |> aggregateWindow(every: v.windowPeriod, fn: last) |> yield(name: "last") width: 1 xCol: _time xPos: 5 yCol: _value yPos: 1 - axes: - base: "10" name: x scale: linear - base: "10" name: y scale: linear colors: - hex: '#31C0F6' name: Nineteen Eighty Four type: scale - hex: '#A500A5' name: Nineteen Eighty Four type: scale - hex: '#FF7E27' name: Nineteen Eighty Four type: scale geom: monotoneX height: 3 kind: Xy name: Total Response by HTTP Code position: overlaid queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "haproxy") |> filter(fn: (r) => r["_field"] == "http_response.1xx" or r["_field"] == "http_response.2xx" or r["_field"] == "http_response.3xx" or r["_field"] == "http_response.4xx" or r["_field"] == "http_response.5xx" or r["_field"] == "http_response.other") |> derivative(unit: v.windowPeriod, nonNegative: false) |> yield(name: "derivative") shade: true width: 6 xCol: _time xPos: 6 yCol: _value - axes: - base: "10" name: x scale: linear - base: "10" name: y scale: linear colors: - hex: '#31C0F6' name: Nineteen Eighty Four type: scale - hex: '#A500A5' name: Nineteen Eighty Four type: scale - hex: '#FF7E27' name: Nineteen Eighty Four type: scale geom: monotoneX height: 3 kind: Xy name: Bytes OUT position: overlaid queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "haproxy") |> filter(fn: (r) => r["_field"] == "bout") |> derivative(unit: v.windowPeriod, nonNegative: true) |> yield(name: "nonnegative derivative") shade: true width: 6 xCol: _time xPos: 6 yCol: _value yPos: 3 - axes: - base: "10" name: x scale: linear - base: "10" name: y scale: linear colors: - hex: '#31C0F6' name: Nineteen Eighty Four type: scale - hex: '#A500A5' name: Nineteen Eighty Four type: scale - hex: '#FF7E27' name: Nineteen Eighty Four type: scale geom: line height: 3 kind: Xy name: Servers Up position: overlaid queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "haproxy") |> filter(fn: (r) => r["_field"] == "active_servers") |> sort() |> yield(name: "sort") shade: true width: 4 xCol: _time xPos: 8 yCol: _value yPos: 6 - axes: - base: "10" name: y scale: linear - base: "10" name: x scale: linear colors: - hex: '#31C0F6' name: Nineteen Eighty Four type: scale - hex: '#A500A5' name: Nineteen Eighty Four type: scale - hex: '#FF7E27' name: Nineteen Eighty Four type: scale geom: monotoneX height: 3 kind: Xy name: Number of request errors position: overlaid queries: - query: |- from(bucket: "haproxy") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "haproxy") |> filter(fn: (r) => r["_field"] == "ereq") |> derivative(unit: v.windowPeriod, nonNegative: false) |> yield(name: "derivative") shade: true width: 4 xCol: _time xPos: 8 yCol: _value yPos: 9 name: haproxy --- apiVersion: influxdata.com/v2alpha1 kind: Telegraf metadata: name: haproxy-config spec: config: | [[outputs.influxdb_v2]] ## The URLs of the InfluxDB cluster nodes. ## ## Multiple URLs can be specified for a single cluster, only ONE of the ## urls will be written to each interval. ## urls exp: http://127.0.0.1:9999 urls = ["$INFLUX_HOST"] ## Token for authentication. token = "$INFLUX_TOKEN" ## Organization is the name of the organization you wish to write to; must exist. organization = "$INFLUX_ORG" ## Destination bucket to write into. bucket = "haproxy" [agent] interval = "1m" # Read metrics of HAProxy, via socket or HTTP stats page [[inputs.haproxy]] ## An array of address to gather stats about. Specify an ip on hostname ## with optional port. ie localhost, 10.10.3.33:1936, etc. ## Make sure you specify the complete path to the stats endpoint ## including the protocol, ie http://localhost:10000/haproxy?stats ## Credentials for basic HTTP authentication # username = "admin" # password = "admin" ## If no servers are specified, then default to 127.0.0.1:1936/haproxy?stats # servers = ["http://localhost:10000/stats"] servers = ["$haproxy_stats"] ## You can also use local socket with standard wildcard globbing. ## Server address not starting with 'http' will be treated as a possible ## socket, so both examples below are valid. # servers = ["socket:/run/haproxy/admin.sock", "/run/haproxy/*.sock"] ## By default, some of the fields are renamed from what haproxy calls them. ## Setting this option to true results in the plugin keeping the original ## field names. # keep_field_names = false ## Optional TLS Config # tls_ca = "/etc/telegraf/ca.pem" # tls_cert = "/etc/telegraf/cert.pem" # tls_key = "/etc/telegraf/key.pem" ## Use TLS but skip chain & host verification # insecure_skip_verify = false # Read metrics about system load & uptime [[inputs.system]] # no configuration [[inputs.cpu]] ## Whether to report per-cpu stats or not percpu = true ## Whether to report total system cpu stats or not totalcpu = true ## If true, collect raw CPU time metrics. collect_cpu_time = false ## If true, compute and report the sum of all non-idle CPU states. report_active = false # Read metrics about memory usage [[inputs.mem]] # no configuration