Last active
August 29, 2015 14:21
-
-
Save jkremser/8db9087086541358f227 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #what is my tenant | |
| curl -ivX GET -H "Content-Type: application/json" 'http://jdoe:password@localhost:8080/hawkular/inventory/tenant' | less | |
| #create resource | |
| curl -ivX POST -H "Content-Type: application/json" -d '{"id": "foobar", "resourceTypeId": "URL", "properties": {"url": "http://hawkular.org"}}' 'http://jdoe:[email protected]:8080/hawkular/inventory/test/resources' | less | |
| #create metric type | |
| curl -ivX POST -H "Content-Type: application/json" -d '{"id":"MetricType", "unit":"BYTE"}' 'http://jdoe:password/127.0.0.1:8080/hawkular/inventory/metricTypes' | less | |
| #create metric | |
| curl -ivX POST -H "Accept: application/json" -H "Content-Type: application/json" -d '{"id": "fooMetric", "metricTypeId": "MetricType"}' 'http://jdoe:[email protected]:8080/hawkular/inventory/test/metrics' | |
| #associate metric with resource | |
| curl -ivX POST -H "Content-Type: application/json" -d '["fooMetric"]' 'http://jdoe:[email protected]:8080/hawkular/inventory/test/resources/foobar/metrics' | less | |
| #what are the metric types of URL resource type? | |
| curl -ivX GET 'http://jdoe:[email protected]:8080/hawkular/inventory/resourceTypes/URL/metricTypes' | less | |
| #what are the metrics of a given resource? | |
| curl -ivX GET -H "Content-Type: application/json" 'http://jdoe:[email protected]:8080/hawkular/inventory/test/resources/foobar/metrics' | less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment