peschuster / graphite-client Goto Github PK
View Code? Open in Web Editor NEWWindows (.NET) library and tools for feeding data into Graphite and statsD.
License: MIT License
Windows (.NET) library and tools for feeding data into Graphite and statsD.
License: MIT License
The service crashed. From Windows event log:
Faulting application name: PerfCounterMonitor.exe, version: 1.0.0.0, time stamp: 0x50c750e0
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e21213c
Exception code: 0xe0434352
Fault offset: 0x000000000000cacd
Faulting process id: 0x6c8
Faulting application start time: 0x01ceb362296af0d7
Faulting application path: C:\Program Files\PerfCounterMonitor\PerfCounterMonitor.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: b8ebafcd-2ebe-11e3-be95-005056800051
Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0
Problem signature:
P1: perfcountermonitor.exe
P2: 1.0.0.0
P3: 50c750e0
P4: mscorlib
P5: 4.0.0.0
P6: 4dd2341f
P7: 3ac
P8: 66
P9: System.ArgumentOutOfRange
P10:
Attached files:
C:\Windows\Temp\WERBBC4.tmp.appcompat.txt
C:\Windows\Temp\WERBBD4.tmp.WERInternalMetadata.xml
C:\Windows\Temp\WERBBD5.tmp.hdmp
C:\Windows\Temp\WERCD5B.tmp.mdmp
These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_perfcountermonit_71a2902298d63b70c35fbb01dbdcb1a49c53777_cab_cdd1cdb6
Analysis symbol:
Rechecking for solution: 0
Report Id: b8ebafcd-2ebe-11e3-be95-005056800051
Report Status: 4
Application: PerfCounterMonitor.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentOutOfRangeException
Stack:
at System.Text.StringBuilder.ToString()
at Graphite.System.AppPoolListener.Execute(System.String, System.String ByRef, Int32)
at Graphite.System.AppPoolListener.GetCounterName(System.String)
at Graphite.System.AppPoolListener.LoadCounterName()
at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ForEach(System.Action`1<System.__Canon>)
at Graphite.System.Scheduler.TimerAction(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
Could you please publish a new version of NuGet package on nuget.org?
Hi there,
Thanks for making this project!
I'm trying to sent metrics to Hosted Graphite using graphite-client and I'm having some problems with the check for valid hostnames.
The endpoint that we are trying to send to is 2bb950e4.carbon.hostedgraphite.com
, but this fails your check for a valid hostname.
public const string ValidHostnamePattern = @"^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$";
This regex fails for the hostname above.
Thanks,
Marc
Can we add variable substitution for prefixKey (very similar to NLog Layout Renderer)? This would be helpful if you're deploying services to multiple machines and would want to keep the config files same.
As an example:
<graphite xmlns="http://github.com/peschuster/Graphite/Configuration">
<!--<graphite address="127.0.0.1" port="2003" transport="Tcp" />-->
<statsd address="127.0.0.1" port="8125" prefixKey="${appsetting:env}.${machinename}.services" />
</graphite>
Hello,
i'am using a DNS entry to send metrics but when i update my records graphite-client still send metrics to old IP.
It' should be nice to add the ability to refresh DNS
Is it possible to configure the client with connection string?
In our case it would be more convenient than separate configuration section. We use Octopus for deploying and there we could set connection strings according to environment (stage, production, etc.).
We already do that and graphite-client
is the only dependency which requires configuration transformation in *.config
file.
See https://github.com/peschuster/graphite-client/blob/master/source/Graphite/Logging.cs#L37
current is set to exception.InnerException, instead of current.InnerException.
If there in an innerException then the loop will run forever.
Hello Peter,
We are planning to use just PerfCounterMonitor.exe for multipel servers of a distributed system, is there any best pratice that you could direct me to ?
Currently before action the question top on my head is can we configure all servers info into one .config file therefore just use one grahpite-client instance? or we should distribute multiple graphite-client insntances on those servers and connect them all back to the graphite server (will the port 2003 conflict in such way?)
Thanks
James
How would you recommend using this in a Failover Cluster to get the right "host" out of the metrics forwarded?
To narrow down the scope a bit, specifically it's for SQL server, so it appears as the "cluster"/"instance" in the forwarded graphite, other roles might apply, like file server(if there is specific metrics for a mounted volume(YES!))
Suggestions?
A SocketException is thrown when multiple listeners use the TcpPipe
to report metrics.
The exception seems to be thrown when thetcpClient.Connect
is called inside EnsureConnected method by multiple listeners at the same time.
Possible solutions could be
tcpClient.Connect
inside the TcpPipe constructortcpClient.Connect
Do you have any plans to add more app pool metrics than just working set? It'd be great to be able to pull any perfmon metric based on app pool name like .NET exceptions/sec, cpu usage, private bytes, etc. especially if you're already mapping the w3wp# to pid to app pool name.
Thanks!
Hi,
We have currentlu this error, can you help me ?
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1970,9):
error MSB3325: Cannot import the following key file: graphite_tsql.pfx. The ke
y file may be password protected. To correct this, try to import the certificat
e again or manually install the certificate to the Strong Name CSP with the fol
lowing key container name: VS_KEY_423AA2BF7DD16375 [D:\peschuster-graphite-clie
nt-9608766\peschuster-graphite-client-9608766\source\Graphite.TSql\Graphite.TSq
l.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1970,9):
error MSB3321: Importing key file "graphite_tsql.pfx" was canceled. [D:\peschu
ster-graphite-client-9608766\peschuster-graphite-client-9608766\source\Graphite
.TSql\Graphite.TSql.csproj]
I see that there is a prefix for statsd output, but not one for Graphite. Does this exist? If not, would be a good enhancement. Without it makes organizing metrics impossible.
framework : dotnetcore 2.0, library used : Graphite.dll 1.3.0, System.Configuration.ConfigurationManager 4.5.0
I am trying to push application metrics to statsd using the following configuration:
app.config settings:
<configSections>
<section name="graphite" type="Graphite.Configuration.GraphiteConfiguration, Graphite" />
</configSections>
<graphite xmlns="http://github.com/peschuster/Graphite/Configuration">
<statsd address="10.32.2.9" port="8125" prefixKey="dapp.metrics" />
</graphite>
This is working fine from my local machine which is in windows 8.1.
Throwing the following exception when hosting it in azure windows server 2012:
System.InvalidOperationException: statsd pipe is not configured at Graphite.ChannelFactory.CreateChannel(String type, String target, Single sampling at Graphite.MetricsPipe.ReportCounter(String key, Int64 value, Single sampling at MyApplication.GraphiteMetricPublisher.PublishCount(String key)
In azure windows server 2016, no exception is getting thrown but metrics is also not pushed to statsd.
From all the above mentioned machines I am able to push data to statsd using bash script.
Would like to use latest version with the pull request you kindly merged (inject the config into Start()). Thanks!
Hello Peter,
How are you, it's me again =) we are trying to configure graphite-client as part of our graphite solution. It's great.
Here is just a enhancement question:
in this sample config clip:
<graphite.system xmlns="http://github.com/peschuster/Graphite/Configuration">
<counters>
<clear />
<add
key="servers.127_0_0_1.processor.usage"
category="Processor" instance="_Total" counter="% Processor Time"
type="gauge" target="graphite" interval="30" />
<add
key="servers.127_0_0_1.memory.availableKB"
category="Memory" instance="" counter="Available KBytes"
type="gauge" target="graphite" interval="30" />
<add
key="servers.127_0_0_1.network.totalBytes"
category="Network Interface" instance="isatap.melbourne.internal.redtribe.com" counter="Bytes Total/sec"
type="gauge" target="graphite" interval="30" />
<add
key="servers.127_0_0_1.network.currentBandWidth"
category="Network Interface" instance="isatap.melbourne.internal.redtribe.com" counter="Current Bandwidth"
type="gauge" target="graphite" interval="30" />
</counters>
See in every 'key' attribute I have to use same prefix to keep values in same folder on graphite, could it be a variable kind of thing in the xml such as
<var name="hostname" value="servers.127_0_0_1"/>
and I can use key ="${hostname}" later , thus I just need change one value to change all, that will be great!
Regards
James
Hi,
am I only able to send data to a localhost statsd / graphite?
I can not findy any parameter for an external server - maybe I am blind :-)
Hello,
firstly the tool is awsome. however I did find this seems like a bug or enhancement:
I am tracking through counter Memory.Available Bytes, which in my machine is a big number, and all values from graphite are -2147483648.0 which looks like they are over the boundary of integer. Is there any chance float or long can be used here ?
Regards
James
Hi, please update Nuget package with the latest build (even if it is pre-release)
We want to measure execution time of one MVC action. It seems like we need WebMetricsPipeProvider
but it isn't included in any available nuget package. So how we intended to use it?
Currently we use custom ActionFilter
which effectively copies WebMetricsPipeProvider
:
StaticMetricsPipeProvider.Instance.Start
in OnActionExecuting
and store StaticMetricsPipeProvider.Current
in HttpContext.Current.Items
.StaticMetricsPipeProvider.Instance.Stop
in OnActionExecuted
.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.