<Monitor>
    <vectors>
        <type>dynamic</type>
        <path isPartOfHierarchy="true" vectorRelation="" useAs="key">$</path>
        <path isPartOfHierarchy="true" vectorRelation="" useAs="value">$.$replaceString.peers[*].server</path>
        <metrics>
            <metricPath mPath="$[*].peers[*]." >
                <attribute>
                    <name>state</name>
                    <index>1</index>
                    <dataFromPattern value="true" >
                        <pattern pValue = "up" updatedValue = "1" useAsRegex = "false"></pattern >
                        <pattern pValue = "draining" updatedValue = "2" useAsRegex = "false"></pattern >
                        <pattern pValue = "down" updatedValue = "3" useAsRegex = "false"></pattern >
                        <pattern pValue = "unavail" updatedValue = "4" useAsRegex = "false"></pattern >
                        <pattern pValue = "unhealthy" updatedValue = "5" useAsRegex = "false"></pattern >
                    </dataFromPattern>
                </attribute>
                <attribute>
                    <name>active</name>
                    <index>2</index>
                </attribute>
                <attribute>
                    <name>requests</name>
                    <index>3</index>
                </attribute>
                <attribute>
                    <name>received</name>
                    <index>10</index>
		    <convertTo>KBPS</convertTo>
                </attribute>
                <attribute>
                    <name>sent</name>
                    <index>11</index>
 	    	    <convertTo>KBPS</convertTo>
                </attribute>
                <attribute>
                    <name>fails</name>
                    <index>12</index>
                </attribute>
                <attribute>
                    <name>unavail</name>
                    <index>13</index>
                </attribute>
                <attribute>
                    <name>backup</name>
                    <index>18</index>
                    <dataFromPattern value="true" >
                        <pattern pValue = "true" updatedValue = "1" useAsRegex = "false"></pattern >
                        <pattern pValue = "false" updatedValue = "2" useAsRegex = "false"></pattern >
                    </dataFromPattern>
                </attribute>
            </metricPath>
            <metricPath mPath="$[*].peers[*].responses.." >
                <attribute>
                    <name>total</name>
                    <index>4</index>
                </attribute>
                <attribute>
                    <name>1xx</name>
                    <index>5</index>
                </attribute>
                <attribute>
                    <name>2xx</name>
                    <index>6</index>
                </attribute>
                <attribute>
                    <name>3xx</name>
                    <index>7</index>
                </attribute>
                <attribute>
                    <name>4xx</name>
                    <index>8</index>
                </attribute>
                <attribute>
                    <name>5xx</name>
                    <index>9</index>
                </attribute>
            </metricPath>
            <metricPath mPath="$[*].peers[*].health_checks.." >
                <attribute>
                    <name>checks</name>
                    <index>14</index>
                </attribute>
                <attribute>
                    <name>fails</name>
                    <index>15</index>
                </attribute>
                <attribute>
                    <name>unhealthy</name>
                    <index>16</index>
                </attribute>
                <attribute>
                    <name>last_passed</name>
                    <index>17</index>
                    <dataFromPattern value="true" >
                        <pattern pValue = "true" updatedValue = "1" useAsRegex = "false"></pattern >
                        <pattern pValue = "false" updatedValue = "2" useAsRegex = "false"></pattern >
                    </dataFromPattern>
                </attribute>
            </metricPath>
        </metrics>
    </vectors>
</Monitor>
