Last active
January 19, 2016 12:17
-
-
Save pavolloffay/5c0a7aea318818f59293 to your computer and use it in GitHub Desktop.
Hawkular Data Mining demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Helper functions for extracting Tenant and Feed id and their canonical paths. | |
feedId() { | |
curl -s GET 'http://jdoe:password@localhost:8080/hawkular/inventory/feeds'| grep --color=never -oP 'id" : "\K[\w-]+' | |
} | |
tenantId() { | |
curl -s GET 'http://jdoe:password@localhost:8080/hawkular/inventory/tenant'| grep --color=never -oP 'id" : "\K[\w-]+' | |
} | |
feed() { | |
curl -s GET 'http://jdoe:password@localhost:8080/hawkular/inventory/feeds'| grep --color=never -oP 'path" : "\K/t;[\w-]+/f;[\w-]+' | |
} | |
tenant() { | |
curl -s GET 'http://jdoe:password@localhost:8080/hawkular/inventory/tenant'| grep --color=never -oP 'path" : "\K/t;[\w-]+' | |
} | |
Heap Used Metric | |
metric=`feed`'/m;MI~R~%5B'`feedId`'%2FLocal~~%5D~MT~WildFly%20Memory%20Metrics~Heap%20Used' | |
metricId='MI~R~%5B'`feedId`'%2FLocal~~%5D~MT~WildFly%20Memory%20Metrics~Heap%20Used' | |
tenant=$(curl -s GET 'http://jdoe:password@localhost:8080/hawkular/inventory/tenant'| grep --color=never -oP 'path" : "\K/t;[\w-]+') | |
Metrics - Heap Used | |
curl -s GET -H 'Hawkular-Tenant: '`tenantId` 'http://localhost:8080/hawkular/metrics/gauges/'$metricId'/data?start=0' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment