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.
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.
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.
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.
* 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