Skip to content

Instantly share code, notes, and snippets.

@theute
Created January 16, 2015 15:06
Show Gist options
  • Save theute/b185d1c34feda8a7eb14 to your computer and use it in GitHub Desktop.
Save theute/b185d1c34feda8a7eb14 to your computer and use it in GitHub Desktop.
Feed story
I am some piece of code in charge of "monitoring" EAP:
I get born, register myself and receive an ID to remember:
POST /hawkular/inventory/feed
I declare all resources that I monitor and receive IDs for those resources:
POST /hawkular/inventory/resource (Create EAP server resource)
POST /hawkular/inventory/resource (Create WAR app resource)
If I didn't declare resources relationships when I created resource I add them:
POST /hawkular/inventory/relationship (Says that the WAR is a deployment of that EAP server)
Now with a resource ID I can start sending metrics:
POST /hawkular/metrics
=====================================
From a UI perspective, I can list all EAP servers
GET /hawkular/inventory/resource?type=eapserver
List all deployments of a particular EAP server:
GET /hawkular/inventory/relationship?source={resourceid}&type=deployments
(List all metrics of a particular deployment:
GET /hawkular/metrics?resourceId={deploymentResourceID})
Get values of a metric (to display a graph):
GET /hawkular/metrics?metricId={metricId})
PS: all requests need to be somewhat secure and define the tenant ID.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment