forked from MattHodge/Graphite-PowerShell-Functions
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathStatsToGraphiteConfig.xml
More file actions
108 lines (105 loc) · 5.2 KB
/
StatsToGraphiteConfig.xml
File metadata and controls
108 lines (105 loc) · 5.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Graphite>
<CarbonServer>127.0.0.1</CarbonServer>
<CarbonServerPort>2003</CarbonServerPort>
<MetricPath>KE.servers</MetricPath>
<NodeHostName>$env:COMPUTERNAME</NodeHostName>
<MetricSendIntervalSeconds>5</MetricSendIntervalSeconds>
<SendUsingUDP>true</SendUsingUDP>
</Graphite>
<ModulesConfigs>
<!--Example Enabled="true" CustomPrefix="Custom.Prefix1" CustomNodeHostName="CustomServer1"/>
<Example Enabled="true" CustomPrefix="Custom.Prefix2" CustomNodeHostName="CustomServer1"/>
<VMMCloudUsage Enabled="false">
<CpuOvercommitRatio Value = "4"/>
<VmmServer Name = "dev-vmm"/>
</VMMCloudUsage>
<FailoverDhcpStats Enabled="false" />
<ClusterPhysicalDiskPerfCounters CustomPrefix="Custom.Prefix" CustomNodeHostName="CustomServer">
<Counter Name="% Idle Time"/>
<Counter Name="Current Disk Queue Length"/>
<Counter Name="Disk Reads/sec"/>
<Counter Name="Disk Transfers/sec"/>
<Counter Name="Disk Writes/sec"/>
</ClusterPhysicalDiskPerfCounters>
<OterConf>
<Counter Name="12213"/>
<Counter Name="dsfsdf"/>
<Counter Name="dsfadsgfdgsec"/>
<Counter Name="Disk Transfers/sec"/>
<Counter Name="Disk Writes/sec"/>
</OterConf-->
<PerfCounters Enabled="true">
<Counter Name="\Network Interface(*)\Bytes Received/sec"/>
<Counter Name="\Network Interface(*)\Bytes Sent/sec"/>
<Counter Name="\Network Interface(*)\Packets Received Unicast/sec"/>
<Counter Name="\Network Interface(*)\Packets Sent Unicast/sec"/>
<Counter Name="\Network Interface(*)\Packets Received Non-Unicast/sec"/>
<Counter Name="\Network Interface(*)\Packets Sent Non-Unicast/sec"/>
<Counter Name="\Processor(_Total)\% Processor Time"/>
<Counter Name="\Memory\Available MBytes"/>
<Counter Name="\Memory\Pages/sec"/>
<Counter Name="\Memory\Pages Input/sec"/>
<Counter Name="\System\Processor Queue Length"/>
<Counter Name="\System\Threads"/>
<Counter Name="\PhysicalDisk(*)\Avg. Disk Write Queue Length"/>
<Counter Name="\PhysicalDisk(*)\Avg. Disk Read Queue Length"/>
</PerfCounters>
</ModulesConfigs>
<MetricCleaning>
<!-- These will be found and replaced in the order they appear here -->
<MetricReplace This="physicaldisk\(.* (.*)\:\)" With="physicaldisk.$1-drive"/>
<MetricReplace This="logicaldisk\(.* (.*)\:\)" With="logicaldisk.$1-drive"/>
<MetricReplace This="Network Interface\(([^\)]*)(?<! _\d+)\)" With="Network Interface($1 _0)"/>
<MetricReplace This="Network Interface\((.*?) (?:_(\d+)|)\)" With="Network Interface($1-$2)"/>
<MetricReplace This="Network Interface\((intel)(?:\[r\]|)(.*?)\)" With="Network Interface($1.$2)"/>
<MetricReplace This="Network Interface\((microsoft)(.*?)\)" With="Network Interface($1.$2)"/>
<MetricReplace This="^\\\\" With=""/>
<MetricReplace This="\\\\" With=""/>
<MetricReplace This="\/" With="-"/>
<MetricReplace This=":" With="."/>
<MetricReplace This="\\" With="."/>
<MetricReplace This="\(" With="."/>
<MetricReplace This="\)" With=""/>
<MetricReplace This="\]" With=""/>
<MetricReplace This="\[" With=""/>
<MetricReplace This="\%" With=""/>
<MetricReplace This="\s+" With=""/>
<MetricReplace This="\.\." With="."/>
<MetricReplace This="_" With=""/>
<MetricReplace This="\#" With="num"/>
<MetricReplace This="\.processor\." With=".cpu."/>
<MetricReplace This="\.cpu\.total\.processortime" With=".cpu.usage"/>
<MetricReplace This="\.networkinterface\." With=".nic."/>
<MetricReplace This="\.physicaldisk\." With=".hdd."/>
<MetricReplace This="\.logicaldisk\." With=".volumes."/>
<MetricReplace This="\.memory\." With=".mem."/>
</MetricCleaning>
<Filtering>
<MetricFilter Name="isatap"/>
<MetricFilter Name="teredo tunneling"/>
</Filtering>
<MSSQLMetics>
<MetricPath>datacenter1.sqlmetrics</MetricPath>
<MetricSendIntervalSeconds>60</MetricSendIntervalSeconds>
<SQLConnectionTimeoutSeconds>5</SQLConnectionTimeoutSeconds>
<SQLQueryTimeoutSeconds>5</SQLQueryTimeoutSeconds>
<SQLServers>
<!-- A SQL Server Connection Using SQL Authentication -->
<SQLServer ServerInstance="(localdb)\v11.0" Username="sa" Password="PASSWORD1!">
<Query Database="mydb" MetricName="mydb.userlist.rowcount" TSQL="select count(userListID) From [dbo].[userList]"/>
<Query Database="mydb" MetricName="mydb.userlist.ukemails" TSQL="select count(userListID) From [dbo].[userList] Where Emails like '%.uk%'"/>
</SQLServer>
<!-- A SQL Server Connection Using Windows Authentication. The credentials from the running PowerShell session will be used. -->
<SQLServer ServerInstance="MSSQLServer" Username="" Password="">
<Query Database="citydb" MetricName="citydb.cities.navadwipkota" TSQL="Select COUNT (city) from [dbo].[cities] Where City = 'Navadwip' OR City = 'Kota'"/>
<!-- An example query SQL query using a greater-than symbol. The symbol must be replaced with an XML Entity References. List here - http://msdn.microsoft.com/en-us/library/windows/desktop/dd892769%28v=vs.85%29.aspx -->
<Query Database="addressbook" MetricName="people.ages.over30" TSQL="Select COUNT (personid) from [dbo].[tblAddressBook] Where Age > 30"/>
</SQLServer>
</SQLServers>
</MSSQLMetics>
<Logging>
<VerboseOutput>True</VerboseOutput>
</Logging>
</Configuration>