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

"dot" in counter title #43

Closed KZachariassen closed 9 years ago

KZachariassen commented 9 years ago

Hi,

I have a IIS server, where my websites is named "www.siteX.com". When i send this to graphite, it will be showed like this "webservices>www>siteX>com" but i would like do replace the dot in the counter name with "-" so it will end up in graphite like this "webservices>www-siteX-com"

Kristian

KZachariassen commented 9 years ago

This can be fixed by replacing "." with "-" in the original sample path in "Start-StatsToGraphite.ps1."

$sample.path = $sample.path.replace(".","-")

MattHodge commented 9 years ago

@krjensen Rather than modifying the scripts, use the configuration files <MetricCleaning> options. Readme here: https://github.com/MattHodge/Graphite-PowerShell-Functions#metricreplace-configuration-section

KZachariassen commented 9 years ago

@MattHodge I'm using the config file for many things, but this is not doable using that.

My perfconuter is returning website, and this list kan change from day to day, so i cant hardcode all websites in the config file, i need the script to allow a counter with a "." in the path.