Java client for Hawkular
Example,
HawkularClient client = HawkularClient.builder("my-tenant")
.uri("http://localhost:8080")
.basicAuthentication("jdoe", "password")
.build();
System.out.println(client.metrics().tenant().getTenants()); // show all tenants
System.out.println(client.alerts().plugins().findActionPlugins()) // show all plugins
System.out.println(client.inventory().tenant.getTenant()); // get current tenant
See unit tests for more examples.
You have set your hawkular server url in to HAWKULAR_ENDPOINT
environment variable.(example: export HAWKULAR_ENDPOINT=http://<hawkular-host>:8080
)
To run mvn test
Run with debug log: mvn test -Dorg.slf4j.simpleLogger.defaultLogLevel=debug -Dorg.slf4j.simpleLogger.logFile=target/test.log
This project is under active development. Pull requests are welcome.