Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Hawkular Data Mining demo
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
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
You can’t perform that action at this time.