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

Vert.x: Blocking handler issue
How to make Vertx server to serve request in parallel?
vertx-service-proxy: Access the underlying message header?
Vertx : Post data from html to Java
java.lang.ClassNotFoundException: com.redhat.ceylon.compiler.java.runtime.tools.Options
Write a big file using vertx
vert.x use more than one handler
Vertx3.0 Simple Form upload
Limit the number of event loops
Why vert.x is used in rhiot, not spring boot or simple camel context?
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

Categories

HOME
assembly
linkedin
pda
case
youtube-data-api-v3
camera
saml-2.0
spring-data-redis
gradient
replace
cq5
cakephp-3.4
google-cloud-datalab
frontend
title
computer-science
p2p
little-proxy
owin
ibeacon-android
fhir
jxl
angular-dart
atlassian
bitnami
coin3d
powershell-v5.0
intershop
simpleitk
googlebot
kendo-mobile
dynamically-generated
windows-server-2003
google-cloud-print
maze
firebase-analytics
calculation
dotspatial
complex-numbers
deltaspike
kodi
spring-security4
simplecv
login-script
dynamic-jasper
modalviewcontroller
reverse
chronicle-map
phpdbg
openrasta
vugen
modelsim
janus
mathcad
shinobi
cvxpy
microstation
rspec2
tooleap
appscale
angular-ui-typeahead
gcloud-ruby
aspen
blitline
contentcontrol
concept-insights
decimalformat
microsoft-reporting
opserver
visual-sourcesafe-2005
haskell-warp
linked-tables
nsurlsessiondatatask
j-security-check
actionfilterattribute
easyrtc
wcm
insight.database
extjs2
isqlquery
neos-server
gpars
abstract-data-type
pagedown
cardreader
swfobject
bjyauthorize
sqlclr
web-notifications
dopostback
tree-balancing
mkv
midlet
zope.interface
iboutlet
pyunit
listitem
extconf.rb
flex-mobile
denied
mysql-error-1205
updatesourcetrigger
ajax-polling
glui
windows-identity
perl5.12
firefox-3
wcf-proxy

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