Commit Graph

79 Commits

Author SHA1 Message Date
matt durham f850a84140
add call to set perf counter query
Signed-off-by: matt durham <mattdurham@ppog.org>
2024-01-08 10:00:39 -05:00
Juan Manuel Perez ffd59537e8
do not abort if we do not know which user is running the process
Signed-off-by: Juan Manuel Perez <jperezflorez@newrelic.com>
2023-11-14 17:15:51 +01:00
Jan-Otto Kröpke 0711268d3c
Refactor collectors
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2023-11-12 13:51:59 +01:00
rob-scheepens 07fff6afc2
First implementation of physical_disk collector (#803)
* Added physical_disk collector.

Signed-off-by: Rob Scheepens <rob.scheepens@nutanix.com>
Signed-off-by: Brantley West <brantley@nutanix.com>

* exporter.go: Added physical_disk to defaultCollectors

Signed-off-by: Rob Scheepens <rob.scheepens@nutanix.com>
Signed-off-by: Brantley West <brantley@nutanix.com>

* Fix test cases for physicaldisk metrics

Signed-off-by: Rob Scheepens <rob.scheepens@nutanix.com>
Signed-off-by: Brantley West <brantley@nutanix.com>

* physical_disk.go: cleanup gofmt error

Signed-off-by: Brantley West <brantley@nutanix.com>

* physical_disk.go: populate physical disk 'number' label

Signed-off-by: Brantley West <brantley@nutanix.com>

* Added docs/collector.physical_disk.md.

Signed-off-by: Rob Scheepens <rob.scheepens@nutanix.com>

* physical_disk.go: change 'number' label to 'disk' to match node_exporter label

Signed-off-by: Brantley West <brantley@nutanix.com>

* physical_disk.go: adopt github.com/go-kit/log

Signed-off-by: Brantley West <brantley@nutanix.com>

* physical_disk.go: adopt include/exclude disk list

Signed-off-by: Brantley West <brantley@nutanix.com>

* fix: Add init config for physical_disk collector

Signed-off-by: Ben Reedy <breed808@breed808.com>

* chore: gofmt physical_disk collector

Signed-off-by: Ben Reedy <breed808@breed808.com>

---------

Signed-off-by: Rob Scheepens <rob.scheepens@nutanix.com>
Signed-off-by: Brantley West <brantley@nutanix.com>
Signed-off-by: Ben Reedy <breed808@breed808.com>
Co-authored-by: Brantley West <brantley@nutanix.com>
Co-authored-by: Ben Reedy <breed808@breed808.com>
2023-09-22 16:45:22 +10:00
DiniFarb 11ec45e710
feat: Skip TLS verify in loading config from url
Signed-off-by: DiniFarb <andreas.vogt89@bluewin.ch>
2023-07-17 20:09:58 +10:00
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 352492ea97
Move collector from main to separate package
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2023-04-23 15:25:41 +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 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
SuperQ bee042d9fa
Use new landing page generator
Use the new exporter-toolkit landing page generator feature.
* Update Go to 1.20.
* Update promu to 0.14.0.

Signed-off-by: SuperQ <superq@gmail.com>
2023-03-25 10:41:48 +01:00
Ben Reedy 6306973948
feat: Allow default metrics to be disabled
Signed-off-by: Ben Reedy <breed808@breed808.com>
2023-03-25 08:59:54 +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
Ben Reedy 7886cf9e37
chore(deps): Update wmi to v1.2.2
This includes a move from github.com/StackExchange/wmi to
github.com/yusufpapurcu/wmi, as the StackExchange repository has been
archived.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2023-03-12 17:34:34 +10:00
Amim Knabben 3aa409590f Cleaning up listen addresses flags before parsing config file
Signed-off-by: Amim Knabben <aknabben@vmware.com>
2022-12-03 21:03:58 -03:00
Ben Reedy e9c594473c
chore(deps)!: bump github.com/prometheus/exporter-toolkit
Introduction of `web.listen-address` flag in upstream library
(bca43f192e)
has necessitated the removal of the `telemetry.addr` flag in favour of
the upstream flag.

Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.7.1 to 0.8.1.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/exporter-toolkit/compare/v0.7.1...v0.8.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ben Reedy <breed808@breed808.com>
2022-10-25 11:38:50 +10:00
Jamie Milton 8061c4e5fa Additional Comments
Signed-off-by: Jamie Milton <jammiemil@hotmail.com>
2022-08-24 10:04:23 +01:00
Jamie Milton 981d687e60 Remove unused Const
Signed-off-by: Jamie Milton <jammiemil@hotmail.com>
2022-08-24 09:16:16 +01:00
Jamie Milton a5f22ebb04 Move Service Initiate out to seperate package
Signed-off-by: Jamie Milton <jammiemil@hotmail.com>
2022-08-23 14:57:16 +01:00
yangliyl 0dc32bf434 replace these deprecated functions
Signed-off-by: yangliyl <yangli_yl@qq.com>
2022-05-15 09:49:08 +08:00
James Sturtevant b450a50103 Add HostProcess Container Configuration for k8s
Co-authored-by: Brian Redmond <brianisrunning@gmail.com>
Signed-off-by: Brian Redmond <brianisrunning@gmail.com>
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2022-02-07 10:16:34 -08:00
Mario Trangoni 919f90a571 golangci-lint: Acknowledge all remaining checks and update golanci-lint to v1.43.0
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2021-12-24 11:19:05 +01: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
James Sturtevant a6ea021468 use IsWindowsService to detect if running as service
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2021-11-05 10:15:39 -07:00
Julien Pivotto 2262b88fac Update web config file flag to match upstream
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-24 00:23:38 +01:00
Calle Pettersson eaa003f5af Add gokit adapter to make https toolkit work
Signed-off-by: Calle Pettersson <carlpett@users.noreply.github.com>
2021-01-30 11:53:51 +01: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 Kochie cdc81b03d5 Add HTTPS configuration
Add the exporter-toolkit https package to allow configuring TLS and
auth.

Signed-off-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Calle Pettersson <carlpett@users.noreply.github.com>
2021-01-30 11:53:51 +01:00
Ben Reedy 6e0ac6a1fc Update prometheus client library to v1.8.0
Signed-off-by: Ben Reedy <breed808@breed808.com>
2020-11-30 09:26:34 +10:00
Calle Pettersson cdbb27d0b4 Fix collector flags not being registered
Signed-off-by: Calle Pettersson <carlpett@users.noreply.github.com>
2020-11-07 17:13:00 +10:00
Ben Reedy f616589c5f
Fix exporter failing to start without config flag
Signed-off-by: Ben Reedy <breed808@breed808.com>
2020-11-03 19:46:05 +10:00
Ben Reedy 96aa2cf095 Add initial support for YAML configuration files
Signed-off-by: Ben Reedy <breed808@breed808.com>
2020-11-02 08:40:59 +10:00
Ben Reedy 6231eb43e8 Use kingpin application for flags
Will be required to pass application object to config file functions.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2020-11-02 08:40:59 +10:00
Björn Fischer e97a04ed65 Add URL filter for collectors
Signed-off-by: Björn Fischer <bfischer@inovex.de>
2020-10-26 14:10:53 +01:00
Rasmus Hansen f1384759cb
Add endpoint for getting the version of the binary (#555)
* Add endpoint for getting the version of the binary

Fixes #553

Signed-off-by: Zlepper <hansen13579@gmail.com>
2020-06-23 12:48:19 +02:00
Calle Pettersson c1a137f7a8 Rename misc variables wmi->windows 2020-05-24 20:54:35 +02:00
Calle Pettersson eaa23705d0 Change metric namespace from wmi to windows 2020-05-24 20:54:35 +02:00
Calle Pettersson 6f90d83b83 Update module name 2020-05-24 20:54:35 +02:00
Calle Pettersson 1d7747b4d1
Merge pull request #473 from martinlindhe/remove-redirect
BREAKING: Remove redirect from unknown paths to /metrics
2020-03-28 13:35:46 +01:00
Calle Pettersson df954ddf9d Remove redirect from unknown paths to /metrics 2020-03-02 22:46:50 +01:00
Calle Pettersson 34996b206a Add option to limit concurrent requests 2020-03-02 22:43:29 +01:00
Calle Pettersson 21a02c4fbe Only query the perflib objects we need 2020-02-29 10:40:53 +01:00
Calle Pettersson 0d4f747f8f Switch to go modules 2019-12-28 16:28:10 +01:00
Calle Pettersson 6f6a479535 Fix goroutine leak 2019-08-08 21:09:21 +02:00
Calle Pettersson 3c20887433 Refactor timeout management 2019-08-03 21:34:19 +02:00
Calle Pettersson c5f23b4e64 Fix float-format 2019-06-24 21:55:33 +02:00
Calle Pettersson 411954cf9d Create custom metrics endpoint to read timeout from request header 2019-06-23 22:01:43 +02:00
Calle Pettersson 85fdfb44b8 Abort scrapes after configurable timeout 2019-05-25 13:59:43 +02:00
Calle Pettersson 33879449a2 Refactor cpu collector to use perflib instead of WMI. 2019-05-25 13:48:40 +02:00
Calle Pettersson 4c69ed1610 Lint-fix: errcheck not found on local run(?) 2019-01-23 10:01:31 +01:00