Commit Graph

195 Commits

Author SHA1 Message Date
Calle Pettersson
9ed68ae86c Collector documentation (#113)
* Initial draft of collector documentation

* Add docs for all collectors

* Update main README with links to docs

* Fix link syntax
2018-11-18 17:05:37 +01:00
Calle Pettersson
cb9da1ae22
Merge pull request #256 from martinlindhe/mssql-clean-instance-names
Strip special chars from instance names
2018-08-31 18:16:43 +02:00
Calle Pettersson
7de316af9f Strip special chars from instance names 2018-08-31 17:21:32 +02:00
Calle Pettersson
263ab8c444
Merge pull request #253 from kafecho/wildcard_query_escape
Clarified that the % character has to be escaped
2018-08-28 12:19:36 +02:00
Guillaume Belrose
57449c4768 Clarified that the % character has to be escaped when using the wmi_exporter from the command prompt or batch files. 2018-08-28 08:58:08 +02:00
Calle Pettersson
fe7e5cb4d8
Merge pull request #241 from szook/protect-against-empty-result-set
protect against empty wmi query result sets
2018-08-08 09:14:27 +02: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
Calle Pettersson
832771b4a2
Merge pull request #238 from bbigras/patch-1
fix typo in exporter.go
2018-08-06 11:41:43 +02:00
Bruno Bigras
16fecfbc67
fix typo in exporter.go 2018-08-05 21:39:43 -04:00
Calle Pettersson
bad1e7f7b0
Merge pull request #237 from szook/fix-mssql-for-non-default-instances
fix mssql for non-default sql instances
2018-08-04 08:33:23 +02:00
Steve Zook
c868c00e89 fix mssql for non-default sql instances
the only sql servers I have access to are using the default
`MSSQLSERVER` instance names.  I was contacted by someone using a
different instance name and it was failing.

Found 2 bugs in the code:

1) I was returning the default `MSSQLSERVER` as an instance even if it wasn't found in the registry

2) learned that the WMI class naming scheme for non-default instances
was not what I had coded. Changed to incorproate new knowledge.
2018-08-03 16:31:19 -04:00
Calle Pettersson
5035e97369
Merge pull request #236 from szook/add-mssql-accessmethod-class
add mssql accessmethod class
2018-08-03 22:16:08 +02:00
Steve Zook
144715e3d2 remove persec from variable names
removed persec from variable names

but when I did that, there was some variable name collisions, so I went
through and name-spaced the class variables.
1
2018-08-03 15:39:26 -04:00
Steve Zook
a20cf1274a add mssql accessmethod class
in the process of trying to build a grafana dashboard with "useful"
mssql metrics, I was looking around for what metrics might be useful and
came across an article of [15 SQL Server Performace Counters to Monitor](https://blogs.sentryone.com/allenwhite/sql-server-performance-counters-to-monitor/)

two of the suggested metrics are provided by the AccessMethod
class, which I was not yet capturing.

So I added metrics for the
Win32_PerfRawData_MSSQLSERVER_SQLServerAccessMethods class.
2018-08-03 13:45:51 -04:00
Calle Pettersson
626a25cd00
Merge pull request #235 from szook/reorder-functions
reorder functions
2018-08-03 16:42:32 +02:00
Calle Pettersson
96dd456bb1
Merge pull request #234 from szook/fix-mssql-metric-name-typo
fix mssql metric name type
2018-08-03 16:27:40 +02:00
Steve Zook
af1b8bf4d0 fix mssql metric name type
found that I had one metric with an extra `s` in `_genstatss_`, making it
inconsistent with it's siblings.
2018-08-03 09:52:15 -04:00
Steve Zook
d83615a818 reorder functions
so that the two functions that list available child collectors are next
to each other - should make less likely to not miss editing one of those
when adding additional wmi classes

also removed the 'filter' from the `mssqlFilterAvailableClassCollectors`
function as it's not filtering anyting.
2018-08-03 09:48:32 -04:00
szook
fe4c61a70e Add mssql collector (#230)
add mssql collector
2018-08-02 08:42:02 +02:00
Calle Pettersson
143705bbf6
Merge pull request #227 from szook/add-worker-process-name-to-w3wp-processes
append IIS worker process name to corresponding w3wp processes
2018-07-23 16:20:07 +02:00
Steve Zook
e8ffb736d0 add worker process name to w3wp processes
modify the `process` collector so that the IIS worker process name is
appended to the corresponding `w3wp` process.

before:
```
wmi_process_private_bytes{creating_process_id="2068",process="w3wp",process_id="12308"} 7.18204928e+08
```

after:
```
wmi_process_private_bytes{creating_process_id="2068",process="w3wp_our.website.com",process_id="12308"} 7.18204928e+08
```

reason:
We have some IIS servers hosting many .NET applications. When there is
resource contention on one of those servers, it's nice to know which IIS
application pool is the culprit.  Having only the process_id to
differentiate between w3wp processes requires additional work to figure
out which is which.  Also it does not allow for historial trending as
the process_id can change across restarts.
2018-07-23 07:53:50 -04:00
Calle Pettersson
21e0f926a3
Merge pull request #226 from szook/fix-iis-collector-panic
fix iis collector panic
2018-07-19 11:27:26 -07: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
aecd90dcf1
Merge pull request #209 from martinlindhe/wmi-query-wildcard
* Refactor wmi query generator to use wildcard selector
2018-06-06 03:23:17 -07:00
Calle Pettersson
cd365c6a3b Harmonize query call layout 2018-06-06 11:35:13 +02:00
Calle Pettersson
667d06116d Refactor wmi query generator to use wildcard selector 2018-06-06 10:38:36 +02:00
tunaman
f3072bb4f3 Add extra HyperV VM classes (#202)
add two extra new HyperV VM classes
2018-05-17 23:46:13 -07:00
Calle Pettersson
17072bf257
Merge pull request #198 from martinlindhe/service-status
Add status metric for service-collector
2018-05-17 11:05:07 -07:00
Calle Pettersson
d3d8537201
Merge pull request #200 from martinlindhe/textfile-carriage-return
Strip carriage-returns from textfile input
2018-05-16 05:18:54 -07:00
Calle Pettersson
2951a9ef80 Strip carriage-returns from textfile input 2018-05-15 20:58:58 +02:00
Calle Pettersson
3141fc3ed3 Add status metric for service-collector 2018-05-12 09:49:29 +02:00
Calle Pettersson
a0333ee256
Merge pull request #195 from martinlindhe/totals-as-gauges-help-string
Fix wrong metric types in system collector, improve help-strings
2018-04-30 09:29:00 +02:00
Calle Pettersson
c9fc76de4c
Merge pull request #194 from martinlindhe/exporter-start-time
Add process_start_time_seconds for the exporter itself
2018-04-30 09:28:43 +02:00
Calle Pettersson
3752a547d5
Merge pull request #193 from martinlindhe/hyperv-network-labels
Fix missing label on HyperVLegacyNetworkAdapter
2018-04-30 09:28:30 +02:00
Calle Pettersson
0ab6c191be Fix wrong metric types in system collector, improve help-strings 2018-04-29 17:14:53 +02:00
Calle Pettersson
467e83722a Add process_start_time_seconds for the exporter itself 2018-04-29 16:53:34 +02:00
Calle Pettersson
7fe8ca8554 Fix missing label on HyperVLegacyNetworkAdapter 2018-04-29 16:09:18 +02:00
Calle Pettersson
4b3d1d60d9
Add hyperv collector to README 2018-04-18 07:50:05 +02:00
Calle Pettersson
1358123482
Merge pull request #150 from iyacontrol/hyperv
Add hyperv collector
2018-04-18 07:45:05 +02:00
Calle Pettersson
ec79488478 Fix CPU metrics 2018-04-17 20:31:43 +02:00
Calle Pettersson
c3b227a4f2 Switch to common/log 2018-04-17 20:31:14 +02:00
Calle Pettersson
c241513d56 Fix interface->vm labelling of VID class 2018-04-17 18:25:22 +02:00
Calle Pettersson
5a538d7682 Add missing labels 2018-04-17 11:08:36 +02:00
Calle Pettersson
a0ec1e2da6 Rename hyperv subsystem 2018-04-16 20:56:05 +02:00
Calle Pettersson
353de09798 Remove/rename persec metrics 2018-04-16 20:55:47 +02:00
Calle Pettersson
de4838454a
Merge pull request #186 from martinlindhe/service-recovery
Set service recovery to restart on crash
2018-04-06 07:19:44 +02:00
Calle Pettersson
86d2b8bdc3
Merge pull request #185 from martinlindhe/create-textfile-directory
Create textfile_inputs directory during install
2018-04-06 07:19:34 +02:00
Calle Pettersson
041ff0351d
Merge pull request #183 from martinlindhe/switch-logging
Switch to prometheus/common/log for all logging
2018-04-06 07:19:16 +02:00
Calle Pettersson
076af99418 Set service recovery to restart on crash 2018-04-05 08:37:23 +02:00