Graphite-PowerShell-Functions
Graphite-PowerShell-Functions copied to clipboard
Send-GraphiteMetric does not work with -DateTime
The conversion from DateTime to Unix time is broken
>Send-GraphiteMetric -CarbonServer 127.0.0.1 -MetricPath 'test' -MetricValue 123 -DateTime (Get-Date)
Send-GraphiteMetric : Cannot convert value "24/05/2016 09:38:46" to type "System.UInt64". Error: "Invalid cast from
'DateTime' to 'UInt64'."
At line:1 char:1
+ Send-GraphiteMetric -CarbonServer 127.0.0.1 -MetricPath 'test' -Metri ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Send-GraphiteMetric], RuntimeException
+ FullyQualifiedErrorId : InvalidCastIConvertible,Send-GraphiteMetric