Commit Graph

20 Commits

Author SHA1 Message Date
Jan-Otto Kröpke 6890f391d4
fix lint
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2023-07-09 22:42:00 +02:00
Jan-Otto Kröpke 8509bc69a6
switch to go-kit logger
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2023-07-09 22:37:27 +02:00
Jan-Otto Kröpke da6898afc4
Remove fluent-style kingpin
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2023-04-17 13:22:36 +02:00
Ben Reedy 04257a1b25
chore: Ensure collector build funcs are private
Collector builder functions are only used internally in the `collector`
package, and shouldn't needlessly be exposed as part of the package API
to downstream clients.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2023-04-01 17:54:41 +10:00
Ben Reedy 9214a87d0d
feat: Remove init functions from collectors
Behaviour of init functions has been centralised in `collector/init.go`,
and can be called during exporter startup. This allows the exporter to
control the timing of collector initialisation, rather than relying on
the import & `init()` method.

This should reduce unexpected behaviour arising from the use of
`init()`, such as #551.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2023-04-01 17:54:40 +10:00
Ben Reedy 416ccf1228
chore(deps): bump github.com/alecthomas/kingpin
Bumps [github.com/alecthomas/kingpin](https://github.com/alecthomas/kingpin) from
v2.2.6 to v2.3.2.

This also changes the upstream package name from
gopkg.in/alecthomas/kingpin.v2 to github.com/alecthomas/kingpin/v2 which
is required by the upstream exporter-toolkit package.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2023-03-13 09:36:23 +10:00
Mario Trangoni e4a43c539b codespell: Fix word spelling issues
See,
```
$ codespell --skip=".git,./vendor" --ignore-words-list=calle
./exporter.go:262: overriden ==> overridden
./collector/dfsr.go:132: receieved ==> received
./collector/dns.go:140: reponses ==> responses
./collector/exchange.go:238: occational ==> occasional
./collector/mssql.go:1961: shoud ==> should
./collector/process.go:137: sharable ==> shareable
./collector/remote_fx.go:64: seccond ==> second
./docs/collector.dfsr.md:47: fils ==> fills, files, file
./docs/collector.exchange.md:39: lengt ==> length
./docs/collector.fsrmquota.md:3: Ressource ==> Resource
./docs/collector.fsrmquota.md:51: Ressource ==> Resource
./docs/collector.os.md:20: sotred ==> sorted, stored
./docs/collector.process.md:56: sharable ==> shareable
./docs/collector.smtp.md:27: mailformed ==> malformed
```

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2021-12-18 19:19:06 +01:00
Mario Trangoni b98a956d51 gofmt: Fix File is not `gofmt`-ed with `-s` for go1.17
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2021-12-18 19:01:29 +01:00
Ben Reedy ce0513f69d
Move experimental warnings from init()
init() causes warnings to be emitted despite collectors not being enabled.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2021-02-20 09:03:42 +10:00
Ben Reedy 5af2a781cb
Merge pull request #693 from SuperQ/https
Add HTTPS configuration
2021-02-19 18:20:06 +10:00
Ben Reedy e9abe4d5f5
Ensure dfsr collector metric names are unique
Signed-off-by: Ben Reedy <breed808@breed808.com>
2021-02-08 09:38:29 +10:00
Calle Pettersson c5a545540d Take over prometheus/common/log into local log package
Signed-off-by: Calle Pettersson <carlpett@users.noreply.github.com>
2021-01-30 11:53:51 +01:00
Ben Reedy e141e531ed
Remove unused dfsr meta metrics and function
Signed-off-by: Ben Reedy <breed808@breed808.com>
2021-01-30 18:56:45 +10:00
Ben Reedy b44d855fe0
Add missing dfsr metric descriptions
Signed-off-by: Ben Reedy <breed808@breed808.com>
2021-01-30 17:10:37 +10:00
Ben Reedy 9d03debcb6
Add experimental notice to dfsr collector
Signed-off-by: Ben Reedy <breed808@breed808.com>
2020-12-20 12:10:38 +10:00
Ben Reedy 2837bdfb50
Add/move DFSR metric units to end of metric name
Signed-off-by: Ben Reedy <breed808@breed808.com>
2020-12-09 19:55:14 +10:00
Ben Reedy 769b15eb86
Execute DFSR child collectors serially
Previous concurrent setup was not required due to speed of Perflib
collectors.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2020-12-09 19:55:13 +10:00
Ben Reedy b5ce53fdac
Merge mssql and dfsr expandEnabledCollectors func
Move to common collector.go and add function test.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2020-12-09 19:55:13 +10:00
Ben Reedy ccac306c2d
Rewrite DFSR collector to use sub collectors
DFSR collector now follow similar structure to the MSSQL collector,
where several 'child' collectors are run concurrently, depending on user
input from the `--collectors.dfsr.sources-enabled` flag.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2020-12-09 19:55:13 +10:00
Ben Reedy df0618e64d
Add DFSR collectors
Signed-off-by: Ben Reedy <breed808@breed808.com>
2020-12-09 19:55:13 +10:00