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
217 stars 71 forks source link

Error with Lync Counter #52

Open Drabert opened 9 years ago

Drabert commented 9 years ago

When trying to use the counter:

I get the following error:

Get-Counter : The specified object was not found on the computer. At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Graphite-PowerShell\Functions\Start-StatsToGraphite.ps1:119 char:28

  • $collections = Get-Counter -Counter $Config.Counters -SampleInterval ...
  • 
    - CategoryInfo          : InvalidResult: (:) [Get-Counter], Exception
    - FullyQualifiedErrorId : CounterApiError,Microsoft.PowerShell.Commands.GetCounterCommand

It looks like it is because the output has multiple "sources" for the output instead of just one value. When i change the counter to just one value like:

It works fine.

Eric