Commit Graph

34 Commits

Author SHA1 Message Date
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
vear959595
c3fa0039ba
Add files via upload
adding 503 http error collector

Signed-off-by: vear959595 <69949561+vear959595@users.noreply.github.com>
2022-10-24 21:26:54 +07:00
kaffarell
fb38512f38 Added WebService uptime metric in iis collector
Signed-off-by: kaffarell <gabrielgoller123@gmail.com>
2022-09-13 16:41:44 +02:00
kaffarell
8e27a9983f Added documentation for iis collector
Signed-off-by: kaffarell <gabrielgoller123@gmail.com>
2022-09-09 12:08:33 +02:00
Ben Reedy
a4cf96d94d
Skip missing IIS instances
Collector would previously break from loop rather than skip nameless
entries, with the additional result of spamming event logs.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2022-07-23 09:59:01 +10:00
Ben Reedy
7d3c0d3b76
Add missing whitelist/blacklist checks for IIS
Checks were removed in 82f17fd despite flags still being present.

Signed-off-by: Ben Reedy <breed808@breed808.com>
2022-02-02 08:56:50 +10:00
Aymeric Daurelle
803a0a9a70 fix: iis metrics greater than IIS v7
The IIS >= 8 metrics was updated two times by application and caused a fatal error. The purpose
of this fix is to update metrics one time by application.

Signed-off-by: Aymeric Daurelle <aymeric.daurelle@cdiscount.com>
2022-01-31 09:24:52 +01: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
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
Souen Mazouin
6120ea9be1 fix: add missing metrics for IIS version >= 8
Allows the following metrics to be exposed again, they had disappeared after the migration to perflib :
- worker_request_errors_total
- worker_current_websocket_requests
- worker_websocket_connection_accepted_total
- worker_websocket_connection_rejected_total

Signed-off-by: Souen Mazouin <souen.mazouin@cdiscount.com>
2021-12-14 17:44:08 +01:00
Dave Owen
82f17fd607
Collect IIS metrics using Perflib (#832)
Rewrite IIS collector to use Perflib

Signed-off-by: David Owen <dowen@meddbase.com>
2021-09-25 17:00:39 +02: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
Calle Pettersson
21a02c4fbe Only query the perflib objects we need 2020-02-29 10:40:53 +01:00
Calle Pettersson
33879449a2 Refactor cpu collector to use perflib instead of WMI. 2019-05-25 13:48:40 +02:00
Calle Pettersson
a171401f57 Lint-fix: errcheck. Partial fix to #261 2019-01-23 10:00:52 +01:00
Calle Pettersson
0121fd6471 Lint-fix: Final golint, ignore capitalisation rules 2019-01-23 09:56:24 +01:00
Calle Pettersson
93904954f4 Lint-fix: Dead code. Fixes bug with IIS app white/blacklisting 2019-01-23 09:56:24 +01:00
Calle Pettersson
f2462b26c8 Lint-fix: Package comments 2019-01-23 09:56:24 +01:00
Dave Henderson
5d4cafc0a1
Adding windows build constraints
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2018-11-29 19:51:12 -05:00
Steve Zook
c156f2bcbe protect against emtpy wmi query result sets
If an WMI query were to return an empty result set, trying to access the
first element in the result set would result in a `panic: runtime error:
index out of range` error.

add logic to explicitly check if the result set size is 0 and return an
error rather.

Fixes https://github.com/martinlindhe/wmi_exporter/issues/240
2018-08-07 15:47:39 -04:00
Steve Zook
8ea862a3da fix iis collector panic
If the `dst_cache` slice is empty, the program panics when trying to access `dst_cache[0]`

added a `if len(dst_cache) > 0 {}` block around the use of that variable to prevent that panic.
2018-07-19 13:42:00 -04:00
Mark D
bb67658853 Fix IIS warning when IIS collector is NOT in use (#212)
changing IIS code to only error if used
Only tries to read registry if collector is initialized
2018-06-10 07:52:20 -07:00
Calle Pettersson
667d06116d Refactor wmi query generator to use wildcard selector 2018-06-06 10:38:36 +02:00
Calle Pettersson
be5ac7b440 Switch to prometheus/common/log for all logging 2018-04-05 07:27:26 +02:00
Calle Pettersson
2461407277 Use kingpin for iis and msmq 2018-03-25 10:01:56 +02:00
Yuriy Revich
105a1c866b fix: IIS Collector fails, when Application has more than one worker processes (#132)
* fix collecting error with multiple IIS application worker processes
2017-11-13 10:41:35 +01:00
Martin Lindhe
96faedf481 process,iis: fix log call 2017-08-10 03:50:21 +02:00
Calle Pettersson
f4195aa435 Conditional query for wmi fields added in IIS 8 2017-07-15 13:59:33 +01:00
Calle Pettersson
e8cfeef26c Implement IIS worker process and server cache classes 2017-06-30 20:55:45 +01:00
Simon Willcock
9d515255a6 Add App Pool metrics to IIS module (#70)
* Initial attempt at app pool collector

* Rename and tweak

* Attempt to convert uptime to unix timestamp

* Merge app pool metrics with existing IIS modules

* Update comments to reference new class

* Add state label to CurrentApplicationPoolState metric

* Return 0 value metrics for all non-active app states

Return 1 for active state

* Remove unnecessary float cast

* Add calculation for uptime

* Convert iis uptimes to unix timestamps and alter help msg

* Rename application pool uptime to start_time
2017-04-26 15:19:33 +02:00
Martin Lindhe
8e229c4b93 Merge pull request #17 from martinlindhe/configurable-collectors
make enabled collectors configurable (based on code from node_exporter)
2016-09-01 16:07:49 +02:00
Martin Lindhe
d8f62e07c2 make enabled collectors configurable (based on code from node_exporter) 2016-09-01 16:04:43 +02:00
Martin Lindhe
b203702cad README: mention the IIS collector 2016-09-01 15:41:23 +02:00
Martin Lindhe
2af46d9313 refactor: rename namespace to 'collector' 2016-09-01 14:55:35 +02:00