MattHodge / Graphite-PowerShell-Functions

A group of PowerShell functions that allow you to send Windows Performance counters to a Graphite Server, all configurable from a simple XML file.
https://hodgkins.io/using-powershell-to-send-metrics-graphite
GNU General Public License v3.0
218 stars 71 forks source link

[Feature Request] improve log counter name when counter not found. #58

Closed toni-moreno closed 8 years ago

toni-moreno commented 8 years ago

While doing some installations there were some errors trying to get some counters. ( After commenting all counters on the config.xml file we realized that the problem was missing PhisicalDisk counters)

Here the output:

Get-Counter : Internal performance counter API call failed. Error: c0000bb8.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Graphite-PowerShell\Funct
ions\Start-StatsToGraphite.ps1:119 char:28
+             $collections = Get-Counter -Counter $Config.Counters 
-SampleInterval ...

As you can see the output is not reporting the counter name, would be easier if the output could print the counter name

Thank you very much

MattHodge commented 8 years ago

I'd start looking at Telegraf, which provides a much nice way to send metrics than my PowerShell function: https://hodgkins.io/windows-metric-dashboards-with-influxdb-and-grafana