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

How to send a full URL HTTP request in Vertx.io
Vertx router configuration
Use case for vertx.clusteredVertx using JavaScript
How to pass VertxOptions from command line (like worker threads)
Develop Vert.x App
Vert.x 2 -> Vert.x 3 communication over EventBus
Get User from event bus
Packaging / Running Vert.x (3.x) Application
Send two params in GET request
vertx - reading from property/config file
vertx NoClassDefFoundError: io/netty/channel/EventLoopGroup
vertX eventBus consumer listens to all addresses
Vertx discovers node but cannot see message
why/how deploying multiple instances of a verticle
Verticles and uncaught exceptions
Does vert.x have centralized filtering?

Categories

HOME
asp.net-web-api
paraview
static
serialization
google-cloud-functions
newrelic
emscripten
computer-science
syntaxnet
owin
mod-security
favicon
symmetricds
package-managers
vuejs
charles
jquery-ias
event-store
short-url
highstock
beta
game-theory
surveymonkey
stackexchange
uitapgesturerecognizer
jbutton
vue-chartjs
hunspell
fossil
modernizr
gdata
vmware-fusion
install.packages
lpsolve
bindingnavigator
dapper-simplecrud
textsum
linter
launchctl
rserve
identification
yii2-user
colorbar
ngmaterial
vcloud-director-rest-api
flex-monkey
hadoop-2.7.2
kiosk
rasterize
opl
xvim
phonertc
pax-exam
typemock
nsurlsessiondatatask
rrule
dbaccess
crowd
teaspoon
appserver
ios8-extension
draw2d-js
cocoalibspotify-2.0
insert-id
nokia-s40
veracity
iboutlet
subproject
usertype
mbeans
cdonts
photolibrary
ie-compatibility-mode
request-headers
spread
echo3
skype4java
cldc
scrubyt
technical-debt
contentpresenter
pbcopy

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