Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • ai3/thirdparty/rsyslog-exporter
  • svp-bot/rsyslog-exporter
2 results
Select Git revision
Show changes
Commits on Source (97)
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build
run: go build -v .
- name: Test
run: go test -v ./...
name: release
on:
release:
types:
- published
- unpublished
- created
- edited
- prereleased
- released
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
......@@ -22,3 +22,6 @@ _testmain.go
*.exe
*.test
*.prof
rsyslog_exporter
dist
include: "https://git.autistici.org/pipelines/debian/raw/master/common.yml"
env:
- GO111MODULE=on
before:
hooks:
- go mod download
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm
- arm64
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- Merge pull request
- Merge branch
archives:
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
replacements:
linux: Linux
amd64: x86_64
nfpms:
- package_name: "rsyslog-exporter"
homepage: https://github.com/aleroyer/rsyslog_exporter
description: rsyslog-exporter for prometheus
maintainer: Antoine Leroyer <aleroyer@deezer.com>
license: Apache 2.0
bindir: /usr/bin
release: 1
formats:
- deb
- rpm
overrides:
deb:
file_name_template: '{{ replace .ProjectName "_" "-" }}_{{ .Version }}-{{ .Release }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
rpm:
file_name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Release }}.{{ .Arch }}"
language: go
go:
- 1.4
install:
- go get github.com/digitalocean/rsyslog_exporter
script:
- make test
## Maintainers
* Antoine Leroyer [@aleroyer](https://github.com/aleroyer)
## Sponsor
* Matthias Rampke <matthias@prometheus.io>
VERSION := 0.0.3
TARGET := rsyslog_exporter
GOFLAGS := -ldflags "-X main.Version $(VERSION)"
ROOTPKG := github.com/digitalocean/$(TARGET)
include Makefile.COMMON
# Copyright 2015 The Prometheus Authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# THE AUTHORITATIVE VERSION OF THIS MAKEFILE LIVES IN:
#
# https://github.com/prometheus/utils
#
# PLEASE MAKE ANY CHANGES THERE AND PROPAGATE THEM TO ALL PROMETHEUS
# REPOSITORIES THAT ARE USING THIS MAKEFILE.
#
# This file provides common Makefile infrastructure for several Prometheus
# components. This includes make tasks for downloading Go, setting up a
# self-contained build environment, fetching Go dependencies, building
# binaries, running tests, and doing release management. This file is intended
# to be included from a project's Makefile, which needs to define the following
# variables, at a minimum:
#
# * VERSION - The current version of the project in question.
# * TARGET - The desired name of the built binary.
#
# Many of the variables defined below are defined conditionally (using '?'),
# which allows the project's main Makefile to override any of these settings, if
# needed. See also:
#
# https://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors.
#
# The including Makefile may define any number of extra targets that are
# specific to that project.
VERSION ?= $(error VERSION not set in including Makefile)
TARGET ?= $(error TARGET not set in including Makefile)
SRC ?= $(shell find . -type f -name "*.go" ! -path "./.build/*")
GOOS ?= $(shell uname | tr A-Z a-z)
GOARCH ?= $(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m)))
ifeq ($(GOOS),darwin)
RELEASE_SUFFIX ?= -osx$(shell sw_vers -productVersion)
endif
GO_VERSION ?= 1.4.2
GOURL ?= https://golang.org/dl
GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH)$(RELEASE_SUFFIX).tar.gz
GOPATH := $(CURDIR)/.build/gopath
# Check for the correct version of go in the path. If we find it, use it.
# Otherwise, prepare to build go locally.
ifeq ($(shell command -v "go" >/dev/null && go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/'), $(GO_VERSION))
GOCC ?= $(shell command -v "go")
GOFMT ?= $(shell command -v "gofmt")
GO ?= GOPATH=$(GOPATH) $(GOCC)
else
GOROOT ?= $(CURDIR)/.build/go$(GO_VERSION)
GOCC ?= $(GOROOT)/bin/go
GOFMT ?= $(GOROOT)/bin/gofmt
GO ?= GOROOT=$(GOROOT) GOPATH=$(GOPATH) $(GOCC)
endif
# Never honor GOBIN, should it be set at all.
unexport GOBIN
SUFFIX ?= $(GOOS)-$(GOARCH)
BINARY ?= $(TARGET)
ARCHIVE ?= $(TARGET)-$(VERSION).$(SUFFIX).tar.gz
ROOTPKG ?= github.com/prometheus/$(TARGET)
SELFLINK ?= $(GOPATH)/src/$(ROOTPKG)
default: $(BINARY)
$(GOCC):
@echo Go version $(GO_VERSION) required but not found in PATH.
@echo About to download and install go$(GO_VERSION) to $(GOROOT)
@echo Abort now if you want to manually install it system-wide instead.
@echo
@sleep 5
mkdir -p $(GOROOT)
curl -L $(GOURL)/$(GOPKG) | tar -C $(GOROOT) --strip 1 -xz
$(SELFLINK):
mkdir -p $(dir $@)
ln -s $(CURDIR) $@
dependencies-stamp: $(GOCC) $(SRC) | $(SELFLINK)
$(GO) get -d
touch $@
$(BINARY): $(GOCC) $(SRC) dependencies-stamp Makefile Makefile.COMMON
$(GO) build $(GOFLAGS) -o $@
.PHONY: archive
archive: $(ARCHIVE)
$(ARCHIVE): $(BINARY)
tar -owner=root --group=root -czf $@ $<
.PHONY: tag
tag:
git tag $(VERSION)
git push --tags
.PHONY: test
test: $(GOCC) dependencies-stamp
$(GO) test ./...
.PHONY: format
format: $(GOCC)
find . -iname '*.go' | egrep -v "^\./\.build|./generated|\./Godeps|\.(l|y)\.go" | xargs -n1 $(GOFMT) -w -s=true
.PHONY: clean
clean:
rm -rf $(BINARY) $(ARCHIVE) .build *-stamp
# rsyslog_exporter [![Build Status](https://travis-ci.org/digitalocean/rsyslog_exporter.svg?branch=master)](https://travis-ci.org/digitalocean/rsyslog_exporter)
A [prometheus](http://prometheus.io/) exporter for [rsyslog](http://rsyslog.com). It accepts rsyslog [impstats](http://www.rsyslog.com/doc/master/configuration/modules/impstats.html) metrics in JSON format over stdin via the rsyslog [omprog](http://www.rsyslog.com/doc/v8-stable/configuration/modules/omprog.html) plugin and transforms and exposes them for consumption by Prometheus.
## Rsyslog Configuration
Configure rsyslog to push JSON formatted stats via omprog:
```
module(load="omprog")
module(
load="impstats"
interval="10"
......@@ -16,13 +19,27 @@ ruleset(name="process_stats") {
action(
type="omprog"
name="to_exporter"
binary="/usr/local/bin/rsyslog_exporter"
binary="/usr/local/bin/rsyslog_exporter [--tls.server-crt=/path/to/tls.crt --tls.server-key=/path/to/tls.key]"
)
}
```
The exporter itself logs back via syslog, this cannot be configured at the moment.
## Command Line Switches
* `web.listen-address` - default `:9104` - port to listen to (NOTE: the leading
`:` is required for `http.ListenAndServe`)
* `web.telemetry-path` - default `/metrics` - path from which to serve Prometheus metrics
* `tls.server-crt` - default `""` - PEM encoded file containing the server certificate and
the CA certificate for use with `http.ListenAndServeTLS`
* `tls.server-key` - default `""` - PEM encoded file containing the unencrypted
server key for use with `tls.server-crt`
If you want the exporter to listen for TLS (`https`) you must specify both
`tls.server-crt` and `tls.server-key`.
## Provided Metrics
The following metrics provided by the rsyslog impstats module are tracked by rsyslog_exporter:
The following metrics provided by the rsyslog [impstats](https://www.rsyslog.com/doc/master/configuration/modules/impstats.html) module are tracked by rsyslog_exporter:
### Actions
Action objects describe what is to be done with a message, and are implemented via output modules.
......@@ -65,4 +82,33 @@ Rsyslog tracks how it uses system resources and provides the following metrics:
* nvcsw - number of voluntary context switches
* nivcsw - number of involuntary context switches
### Dynafile Cache
The [omfile](https://www.rsyslog.com/rsyslog-statistic-counter-plugin-omfile/) module can generate
file names from a template. A cache of recent filehandles can be maintained, whose sizing can
impact performance considerably. The module provides the following metrics:
* requests - number of requests made to obtain a dynafile
* level0 - number of requests for the current active file
* missed - number of cache misses
* evicted - number of times a file needed to be evicted from cache
* maxused - maximum number of cache entries ever used
* closetimeouts - number of times a file was closed due to timeout settings
### Dynamic Stats
Rsyslog allows the user to define their own stats namespaces and increment counters within these
buckets using Rainerscript function calls.
These are exported as counters with the metric name identifying the bucket, and a label value
matching the name of the counter (the label name will always be "counter"). As well as custom
metrics, a "global" dynstats namespace is also published with some additional bookeeping counters.
See the [dyn_stats](https://www.rsyslog.com/doc/master/configuration/dyn_stats.html)
documentation for more information.
### IMUDP Workerthread stats
The [imudp](https://www.rsyslog.com/rsyslog-statistic-counter-plugin-imudp/) module can be configured
to run on multiple worker threads and the following metrics are returned:
* input_called_recvmmsg - Number of recvmmsg called
* input_called_recvmsg -Number of recvmmsg called
* input_received - Messages received
package main
import (
"bytes"
"encoding/json"
"fmt"
"strings"
)
type action struct {
......@@ -16,51 +14,61 @@ type action struct {
Resumed int64 `json:"resumed"`
}
func newActionFromJSON(b []byte) *action {
dec := json.NewDecoder(bytes.NewReader(b))
func newActionFromJSON(b []byte) (*action, error) {
var pstat action
dec.Decode(&pstat)
pstat.Name = strings.ToLower(pstat.Name)
pstat.Name = strings.Replace(pstat.Name, " ", "_", -1)
return &pstat
err := json.Unmarshal(b, &pstat)
if err != nil {
return nil, fmt.Errorf("failed to decode action stat `%v`: %v", string(b), err)
}
return &pstat, nil
}
func (a *action) toPoints() []*point {
points := make([]*point, 5)
points[0] = &point{
Name: fmt.Sprintf("%s_processed", a.Name),
Name: "action_processed",
Type: counter,
Value: a.Processed,
Description: "messages processed",
LabelName: "action",
LabelValue: a.Name,
}
points[1] = &point{
Name: fmt.Sprintf("%s_failed", a.Name),
Name: "action_failed",
Type: counter,
Value: a.Failed,
Description: "messages failed",
LabelName: "action",
LabelValue: a.Name,
}
points[2] = &point{
Name: fmt.Sprintf("%s_suspended", a.Name),
Name: "action_suspended",
Type: counter,
Value: a.Suspended,
Description: "times suspended",
LabelName: "action",
LabelValue: a.Name,
}
points[3] = &point{
Name: fmt.Sprintf("%s_suspended_duration", a.Name),
Name: "action_suspended_duration",
Type: counter,
Value: a.SuspendedDuration,
Description: "time spent suspended",
LabelName: "action",
LabelValue: a.Name,
}
points[4] = &point{
Name: fmt.Sprintf("%s_resumed", a.Name),
Name: "action_resumed",
Type: counter,
Value: a.Resumed,
Description: "times resumed",
LabelName: "action",
LabelValue: a.Name,
}
return points
......
......@@ -12,7 +12,10 @@ func TestNewActionFromJSON(t *testing.T) {
t.Errorf("detected pstat type should be %d but is %d", rsyslogAction, logType)
}
pstat := newActionFromJSON([]byte(actionLog))
pstat, err := newActionFromJSON([]byte(actionLog))
if err != nil {
t.Fatalf("expected parsing action not to fail, got: %v", err)
}
if want, got := "test_action", pstat.Name; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
......@@ -40,11 +43,14 @@ func TestNewActionFromJSON(t *testing.T) {
}
func TestActionToPoints(t *testing.T) {
pstat := newActionFromJSON([]byte(actionLog))
pstat, err := newActionFromJSON([]byte(actionLog))
if err != nil {
t.Fatalf("expected parsing action not to fail, got: %v", err)
}
points := pstat.toPoints()
point := points[0]
if want, got := "test_action_processed", point.Name; want != got {
if want, got := "action_processed", point.Name; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
}
......@@ -56,8 +62,12 @@ func TestActionToPoints(t *testing.T) {
t.Errorf("wanted '%d', got '%d'", want, got)
}
if want, got := "test_action", point.LabelValue; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
}
point = points[1]
if want, got := "test_action_failed", point.Name; want != got {
if want, got := "action_failed", point.Name; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
}
......@@ -69,8 +79,12 @@ func TestActionToPoints(t *testing.T) {
t.Errorf("wanted '%d', got '%d'", want, got)
}
if want, got := "test_action", point.LabelValue; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
}
point = points[2]
if want, got := "test_action_suspended", point.Name; want != got {
if want, got := "action_suspended", point.Name; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
}
......@@ -82,8 +96,12 @@ func TestActionToPoints(t *testing.T) {
t.Errorf("wanted '%d', got '%d'", want, got)
}
if want, got := "test_action", point.LabelValue; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
}
point = points[3]
if want, got := "test_action_suspended_duration", point.Name; want != got {
if want, got := "action_suspended_duration", point.Name; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
}
......@@ -95,8 +113,12 @@ func TestActionToPoints(t *testing.T) {
t.Errorf("wanted '%d', got '%d'", want, got)
}
if want, got := "test_action", point.LabelValue; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
}
point = points[4]
if want, got := "test_action_resumed", point.Name; want != got {
if want, got := "action_resumed", point.Name; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
}
......@@ -107,4 +129,8 @@ func TestActionToPoints(t *testing.T) {
if want, got := counter, point.Type; want != got {
t.Errorf("wanted '%d', got '%d'", want, got)
}
if want, got := "test_action", point.LabelValue; want != got {
t.Errorf("wanted '%s', got '%s'", want, got)
}
}
rsyslog-exporter (0.3) unstable; urgency=medium
* Rebased on newer upstream release
-- A/I <debian@autistici.org> Fri, 01 Oct 2021 10:57:56 +0100
rsyslog-exporter (0.2) unstable; urgency=medium
* Merged upstream changes.
-- Autistici/Inventati <debian@autistici.org> Tue, 18 Dec 2018 07:42:22 +0000
rsyslog-exporter (0.1) unstable; urgency=medium
* Initial Release.
-- Autistici/Inventati <debian@autistici.org> Tue, 28 Nov 2017 09:40:17 +0000
Source: rsyslog-exporter
Section: admin
Priority: optional
Maintainer: Autistici/Inventati <debian@autistici.org>
Build-Depends: debhelper-compat (= 12),
golang-any, dh-golang,
golang-github-prometheus-client-golang-dev
Standards-Version: 3.9.6
Package: rsyslog-exporter
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: rsyslog
Built-Using: ${misc:Built-Using}
Description: Rsyslog Prometheus exporter.
Exports rsyslogd metrics to Prometheus.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: rsyslog_exporter
Source: <https://github.com/taotetek/rsyslog_exporter>
Files: *
Copyright: 2017 Autistici/Inventati <info@autistici.org>
License: Apache
#!/usr/bin/make -f
export DH_GOPKG = github.com/taotetek/rsyslog_exporter
export DH_GOLANG_EXCLUDES = vendor
%:
dh $@ --with golang --buildsystem golang
override_dh_install:
rm -fr $(CURDIR)/debian/rsyslog-exporter/usr/share/gocode
dh_install
3.0 (native)
package main
import (
"encoding/json"
"fmt"
)
type dynStat struct {
Name string `json:"name"`
Origin string `json:"origin"`
Values map[string]int64 `json:"values"`
}
func newDynStatFromJSON(b []byte) (*dynStat, error) {
var pstat dynStat
err := json.Unmarshal(b, &pstat)
if err != nil {
return nil, fmt.Errorf("error decoding values stat `%v`: %v", string(b), err)
}
return &pstat, nil
}
func (i *dynStat) toPoints() []*point {
points := make([]*point, 0, len(i.Values))
for name, value := range i.Values {
points = append(points, &point{
Name: fmt.Sprintf("dynstat_%s", i.Name),
Type: counter,
Value: value,
Description: fmt.Sprintf("dynamic statistic bucket %s", i.Name),
LabelName: "counter",
LabelValue: name,
})
}
return points
}
package main
import (
"reflect"
"testing"
)
func TestGetDynStat(t *testing.T) {
log := []byte(`{ "name": "global", "origin": "dynstats", "values": { "msg_per_host.ops_overflow": 1, "msg_per_host.new_metric_add": 3, "msg_per_host.no_metric": 0, "msg_per_host.metrics_purged": 0, "msg_per_host.ops_ignored": 0 } }`)
values := map[string]int64{
"msg_per_host.ops_overflow": 1,
"msg_per_host.new_metric_add": 3,
"msg_per_host.no_metric": 0,
"msg_per_host.metrics_purged": 0,
"msg_per_host.ops_ignored": 0,
}
if want, got := rsyslogDynStat, getStatType(log); want != got {
t.Errorf("detected pstat type should be %d but is %d", want, got)
}
pstat, err := newDynStatFromJSON(log)
if err != nil {
t.Fatalf("expected parsing dynamic stat not to fail, got: %v", err)
}
if want, got := "global", pstat.Name; want != got {
t.Errorf("invalid name, want '%s', got '%s'", want, got)
}
if want, got := values, pstat.Values; !reflect.DeepEqual(want, got) {
t.Errorf("unexpected values, want: %+v got: %+v", want, got)
}
}
func TestDynStatToPoints(t *testing.T) {
log := []byte(`{ "name": "global", "origin": "dynstats", "values": { "msg_per_host.ops_overflow": 1, "msg_per_host.new_metric_add": 3, "msg_per_host.no_metric": 0, "msg_per_host.metrics_purged": 0, "msg_per_host.ops_ignored": 0 } }`)
wants := map[string]point{
"msg_per_host.ops_overflow": point{
Name: "dynstat_global",
Type: counter,
Value: 1,
Description: "dynamic statistic bucket global",
LabelName: "counter",
LabelValue: "msg_per_host.ops_overflow",
},
"msg_per_host.new_metric_add": point{
Name: "dynstat_global",
Type: counter,
Value: 3,
Description: "dynamic statistic bucket global",
LabelName: "counter",
LabelValue: "msg_per_host.new_metric_add",
},
"msg_per_host.no_metric": point{
Name: "dynstat_global",
Type: counter,
Value: 0,
Description: "dynamic statistic bucket global",
LabelName: "counter",
LabelValue: "msg_per_host.no_metric",
},
"msg_per_host.metrics_purged": point{
Name: "dynstat_global",
Type: counter,
Value: 0,
Description: "dynamic statistic bucket global",
LabelName: "counter",
LabelValue: "msg_per_host.metrics_purged",
},
"msg_per_host.ops_ignored": point{
Name: "dynstat_global",
Type: counter,
Value: 0,
Description: "dynamic statistic bucket global",
LabelName: "counter",
LabelValue: "msg_per_host.ops_ignored",
},
}
seen := map[string]bool{}
for name := range wants {
seen[name] = false
}
pstat, err := newDynStatFromJSON(log)
if err != nil {
t.Fatalf("expected parsing dyn stat not to fail, got: %v", err)
}
points := pstat.toPoints()
for _, got := range points {
key := got.LabelValue
want, ok := wants[key]
if !ok {
t.Errorf("unexpected point, got: %+v", got)
continue
}
if !reflect.DeepEqual(want, *got) {
t.Errorf("expected point to be %+v, got %+v", want, got)
}
if seen[key] {
t.Errorf("point seen multiple times: %+v", got)
}
seen[key] = true
}
for name, ok := range seen {
if !ok {
t.Errorf("expected to see point with key %s, but did not", name)
}
}
}
package main
import (
"encoding/json"
"fmt"
"strings"
)
type dfcStat struct {
Name string `json:"name"`
Origin string `json:"origin"`
Requests int64 `json:"requests"`
Level0 int64 `json:"level0"`
Missed int64 `json:"missed"`
Evicted int64 `json:"evicted"`
MaxUsed int64 `json:"maxused"`
CloseTimeouts int64 `json:"closetimeouts"`
}
func newDynafileCacheFromJSON(b []byte) (*dfcStat, error) {
var pstat dfcStat
err := json.Unmarshal(b, &pstat)
if err != nil {
return nil, fmt.Errorf("error decoding dynafile cache stat `%v`: %v", string(b), err)
}
pstat.Name = strings.TrimPrefix(pstat.Name, "dynafile cache ")
return &pstat, nil
}
func (d *dfcStat) toPoints() []*point {
points := make([]*point, 6)
points[0] = &point{
Name: "dynafile_cache_requests",
Type: counter,
Value: d.Requests,
Description: "number of requests made to obtain a dynafile",
LabelName: "cache",
LabelValue: d.Name,
}
points[1] = &point{
Name: "dynafile_cache_level0",
Type: counter,
Value: d.Level0,
Description: "number of requests for the current active file",
LabelName: "cache",
LabelValue: d.Name,
}
points[2] = &point{
Name: "dynafile_cache_missed",
Type: counter,
Value: d.Missed,
Description: "number of cache misses",
LabelName: "cache",
LabelValue: d.Name,
}
points[3] = &point{
Name: "dynafile_cache_evicted",
Type: counter,
Value: d.Evicted,
Description: "number of times a file needed to be evicted from cache",
LabelName: "cache",
LabelValue: d.Name,
}
points[4] = &point{
Name: "dynafile_cache_maxused",
Type: counter,
Value: d.MaxUsed,
Description: "maximum number of cache entries ever used",
LabelName: "cache",
LabelValue: d.Name,
}
points[5] = &point{
Name: "dynafile_cache_closetimeouts",
Type: counter,
Value: d.CloseTimeouts,
Description: "number of times a file was closed due to timeout settings",
LabelName: "cache",
LabelValue: d.Name,
}
return points
}