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 | 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
Has anyone used Vertx for their production applications?
How to dispatch incoming NetSocket handlers into different event loop threads?
What is the appropriate way to communicate Vert.x cluster with Orbit cluster?
vertx-sync nested awaitresult not working
What is the correct way to use vert.x web when serving dynamic content?
How to use vert.x shell to monitor message traffic
db operations (Sql Common and JDBC client) executed in different event loops
Vertx Javascript Evenbus JsonObject failed to send -> “Can't unambiguously select between fixed arity signatures”

Categories

HOME
hyperlink
powerpoint
yahoo-finance
hessian
javacc
permissions
tail
pyqt4
zip
nstableheaderview
owin
enthought
distribution
mod-security
project-intu
symmetricds
heat
linear-algebra
intershop
visual-glitch
squashfs
postscript
pimcore
epsilon
interpreter
dapper-extensions
syntax-highlighting
8051
exchangewebservices
python-2.6
fstream
dsx-desktop
biztalk-rule-engine
android-maps-extensions
hunspell
servicestack-text
salesforce-communities
apns-php
verifiable-c
unordered-map
magento-1.9.3
naming
avcapturedevice
oim
puredata
servermanager
pair-programming
java-bytecode-asm
colorbar
mouseleave
bootstrap-tags-input
materialized-path-pattern
pytables
builtins
hadoop-2.7.2
firebase-security
udpclient
embedding
sklearn-pandas
lz77
libav
aspen
inf
dynatree
iced-coffeescript
infosphere-spl
showdialog
sonarqube-5.0
codeplex
mintty
reflector
drupal-nodes
diem
windows-98
android-sdk-2.3
curb
fragmenttransaction
wcf-configuration
listitem
relative
ikimagebrowserview
matlab-load
exponentiation
strsep
nhprof
globals
murmurhash
glui
alsb
ifilter

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