Closed christrotter closed 9 years ago
Yup, added this to my config XML and the last errors are gone.
<MSSQLMetics>
<MetricPath />
<MetricSendIntervalSeconds />
<MetricTimeSpan />
<SQLConnectionTimeoutSeconds/>
<SQLQueryTimeoutSeconds/>
<SQLServers>
<SQLServer />
</SQLServers>
</MSSQLMetics>
I was then getting errors like this:
VERBOSE: Removing Underscores as the switch is enabled
VERBOSE: NicePhyiscalDisks switch is enabled
VERBOSE: Job Execution Time To Get to Clean Metrics: 0.0039282 seconds.
The variable '$samplePath' cannot be retrieved because it has not been set.
At C:\Program Files\WindowsPowerShell\Modules\graphite-powershell\Functions\Start-StatsToGraphite.ps1:152 char:65
+ Write-Verbose "Filtering out Sample Name: $($samplePath) as ...
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (samplePath:String) [], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined
VERBOSE: Filtering out Sample Name: as it matches something in the filters.
VERBOSE: Job Execution Time To Get to Clean Metrics: 0.0157992 seconds.
I simply modified that write-output (SQLmetrics section) from $samplePath to $sample. Seems less angry.
One last issue now:
PS C:\Users\cama.buildsvc> start-statstographite -verbose
The property 'ServerInstance' cannot be found on this object. Verify that the property exists.
At C:\Program Files\WindowsPowerShell\Modules\graphite-powershell\Functions\Internal.ps1:105 char:9
+ $Config.MSSQLServers += [pscustomobject]@{
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict
This is all due to the start script not ignoring the fact that I am not using SQL metrics. If it could just ignore that...most of this would be a moot point. Hope this helps clear it up!
Thanks for the detailed post @christrotter .. I will try and handle this a little better in the code.
I don't recall the documentation mentioning this, and I'll post this over in the Chef cookbook page as well, but the service install is dependent on two things:
Fixed in Graphite-PowerShell v1.2.1.
Thanks for reporting the issue!
v1.2.1 had a bug, please grab Graphite-PowerShell v1.2.2 instead.
this fix will mask configuration errors. You should just CHECK if the mysql section exists, and if it does, pull in the configurations. I don't think this should be wrapped in a try/catch at all.
Edit: I would like to add, this could very well be user error, so please point it out if so!
Thanks so much for writing and sharing this!! Found that installing via Chef cookbook just wouldn't do anything (2008R2), so tried the manual version here to troubleshoot. (2012R2)
When I first tried to run the startup script on 2008R2:
Googling gave me a fix:
Now that it's actually running...I get a bunch of these:
<snip, a lot of these>
<snip, a lot of these>
I found the first one is resolved by modifying the config XML: OLD:$env:COMPUTERNAME
NEW: $env:COMPUTERNAME
The 2nd (IIRC) was resolved by adding in the 'SendUsingUDP' config option.
The 3rd is clearly a typo: 'MSSQLMetics'.
After finally getting it started and letting it run for a while, started getting these: (snipped)
Again, looks like something from the XML file. Interestingly, your main readme has a similar typo: MSSQLMetics Configuration Section
I think I can get it working enough for my purposes (guessing this is just a case of missing stuff from the config file - even though you'd think it wasn't required), just thought I'd let you know it was slightly broken.