vert.x


How to call Hawkular from Vert.x


I want to get the metrics from vert.x with Hawkular, but I have problem.
Following the tutorial of this. http://vertx.io/docs/vertx-hawkular-metrics/java/
Then, I change the code of the tutorial of vert.x
http://vertx.io/blog/my-first-vert-x-3-application/
like this.
from this
#Before
public void setUp(TestContext context) {
vertx = Vertx.vertx();
vertx.deployVerticle(MyFirstVerticle.class.getName(),
context.asyncAssertSuccess());
}
to this
VertxOptions vertxOptions = new VertxOptions()
.setMetricsOptions(new VertxHawkularOptions()
.setHost("localhost")
.setPort(8080)
.setTenant("com.acme")
.setAuthenticationOptions(
new AuthenticationOptions()
.setEnabled(true)
.setId("jdoe")
.setSecret("password")).setEnabled(true));
vertx = Vertx.vertx(vertxOptions);
JsonObject message = new JsonObject()
.put("id", "myapp.files.opened")
.put("value", 7);
vertx.eventBus().publish("metrics", message);
But I think I there are no changes in Hawkular.
First of all, I checked with WireShark, there looks like no connection of HTTP request of this application.
I want to know if I execute this code, can I see some change in the Hawkular Metrics?
I already checked.
this program pass these codes.
even though I change the Host and Port wrong one, there are no execption.
I think the test process finishes before the metrics had time to get reported. I tried with your example (which looks correct beside this timing issue), and had to put a Thread.sleep of 1 second after publishing on the event bus in order to see something in Hawkular.
curl -u jdoe:password -H "Hawkular-Tenant: com.acme" http://localhost:8080/hawkular/metrics/counters
now gives
[{"id":"vertx.eventbus.publishedRemoteMessages","dataRetention":14,"type":"counter","tenantId":"com.acme"},{"id":"vertx.pool.worker.vert.x-internal-blocking.queuedCount","dataRetention":14,"type":"counter","tenantId":"com.acme"},{"id":"vertx.eventbus.receivedMessages","dataRetention":14,"type":"counter","tenantId":"com.acme"}, etc.

Related Links

vertx 3.4.1 install command for third party modules
Vert.x unmount subrouter
Vertx POST HttpClientRequest with body parameter
vertx run FileName.java not working
How can I set VertxOptions for use in every Verticle?
Vertx delay when call many request to api
Writing Verticles that performs CRUD Operations on a file
HttpEndpoint and Proxy Options in Vert.x
Vertx | Global state of Verticles in a cluster
vertx get body of a simple post reques
Vertx 3 : will Handler<RoutingContext> of an HTTP server be executed in the event/run loop or in a separate thred?
vertx-web httpserver messy code when response a Chinese word
Can Vertx executeBlocking be used on a list?
Unable to get any configuration readings outside the “.listen()” method
Consuming email by Vert.x component reactively
Vertx Microservices Architecture

Categories

HOME
microsoftgraph
twitter-bootstrap-3
delphi-7
apiblueprint
grafana
entity-framework-core
visual-studio-emulator
vsm
flume
startup
datastage
libc
parameter-passing
google-data-studio
bourbon
database-connection
simpleitk
react-toolbox
short-url
direct3d11
progress-bar
tpm
ceylon
iis-express
testcomplete
xbox
powershell-ise
testbed
rselenium
simplecv
activexobject
video-capture
android-augmented-reality
dcmtk
android-checkbox
builder
sonarlint-eclipse
tinymce-3
twilio-click-to-call
tf
skin
sundials
objectscript
reachability
latin
centrifuge
google-cloud-console
drawstring
stream-processing
cda
jparsec
boomerang
oracle-spatial
rate-limiting
iced-coffeescript
zscript
jsvc
mirror
dnssec
ms-access-2000
sonarqube-5.0
build-script
multitasking
spring-3
eclipse-kepler
mbunit
beaker-testing
poker
abstract-data-type
onload-event
preload
asplinkbutton
web-notifications
robotlegs
idn
dajaxice
faye
apache-commons-dbutils
flex-mobile
expression-blend-4
uideviceorientation
ie-compatibility-mode
binomial-heap
build-environment
glui
wordprocessingml
localizable.strings
cardspace
commercial-application

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App