Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 01 2017 12:14
    jenssaade closed #1
  • Sep 01 2017 12:14
    jenssaade reopened #1
  • Aug 31 2017 15:34
    jenssaade closed #1
  • Aug 31 2017 15:34
    jenssaade reopened #1
  • Aug 31 2017 07:12
    jenssaade closed #1
  • Aug 31 2017 07:12
    jenssaade reopened #1
  • Aug 30 2017 21:11
    jenssaade closed #1
  • Aug 30 2017 21:11
    jenssaade commented #1
  • Aug 30 2017 21:11
    jenssaade reopened #1
  • Aug 22 2017 14:49
    jenssaade closed #1
  • Aug 06 2017 22:02
    jenssaade opened #1
  • Mar 07 2017 06:59

    jenssaade on gh-pages

    meetup (compare)

  • Jan 15 2017 21:48

    jenssaade on v0.7

    (compare)

  • Jan 15 2017 21:48

    jenssaade on master

    Merge branch 'master' into deve… fixed class references after re… Merge branch 'release/v0.7' (compare)

  • Jan 15 2017 21:47

    jenssaade on develop

    Merge branch 'master' into deve… fixed class references after re… (compare)

  • Jan 09 2017 19:36

    jenssaade on master

    fixed URL (compare)

  • Jan 09 2017 19:35

    jenssaade on master

    fixed URL (compare)

  • Dec 18 2016 22:39

    jenssaade on develop

    refactored advisorcontext refactored repository and api t… adapting changes to commons-oss and 2 more (compare)

Jens Saade
@jenssaade
apexbeat is a receiver beat
it will push metrics from the apex-agent to ELK
Jens Saade
@jenssaade
concerning the apexbeat installation, this should help http://toolkits.verticle.io/docs/index.html#elasticsearch-apexbeats
or, if you prefer to use the docker image instead of compiling the beat yourself, you can use this image: https://hub.docker.com/r/verticleio/apexbeat/
netics-w
@netics-w
Yes, I understand the call chain and that I must have moth apex-agent and apexbeat. But I don't understand how to start apexbeat. I don't see any executable file named "apexbeat". I have everything using documentation.
This is a directory listing of apexbeat after make setup && make: .git .travis.yml LICENSE README.md apexbeat apexbeat.template-es2x.json apexbeat.test beater config fields.yml libbeat.yml main_test.go vendor
.gitignore CONTRIBUTING.md Makefile _meta apexbeat.full.yml apexbeat.template.json apexbeat.yml build docs libbeat.full.yml main.go tests vio-apex-isometric5.svg
as u can see - there is no file named apexbeat
sorry, in my previous message there is file name apexbeat - I tried to rename apexbeat.test and start it as apexbeat. but it doesn't work as beat
and this is docker container listing: /go # ls src/github.com/verticle-io/apexbeat/
CONTRIBUTING.md README.md apexbeat.template-es2x.json beater main.go
LICENSE _meta apexbeat.template.json config main_test.go
Makefile apexbeat.full.yml apexbeat.yml docs tests
netics-w
@netics-w
there is also no apexbeat executable file
Jens Saade
@jenssaade
If you want to build it from scratch your GO environment should be set up properly
when making apexbeat it will be copied to the corresponding directory
netics-w
@netics-w
My GO-environment is set properly. No any error or warning during build. All test are passing.
Jens Saade
@jenssaade
ok
so in my case I see the apexbeat executable in the ${GOPATH}/bin dir
Jens Saade
@jenssaade
when I run 'make' I get it created here ${GOPATH}/src/github.com/verticle-io/apexbeat
Jens Saade
@jenssaade
if building from scratch does not work out you can also try running the docker image, it will connect to Elasticsearch on localhost
is that suitable for you scenario?
netics-w
@netics-w
it is suitable for me. I've done docker pull verticleio/apexbeat . then I start container from that image in interactive shell - docker run -i -t verticleio/apexbeat /bin/sh. Then I see that no any apexbeat executable file on container's filesystem
Jens Saade
@jenssaade
$  docker run verticleio/apexbeat
starting apexbeat
2017/05/17 14:45:44.702564 beat.go:276: INFO Home path: [/go/src/app] Config path: [/go/src/app] Data path: [/go/src/app/data] Logs path: [/go/src/app/logs]
2017/05/17 14:45:44.702823 beat.go:182: INFO Setup Beat: apexbeat; Version: 6.0.0-alpha1
2017/05/17 14:45:44.702869 processor.go:44: DBG  Processors:
2017/05/17 14:45:44.702902 beat.go:188: DBG  Initializing output plugins
2017/05/17 14:45:44.704363 metrics.go:23: INFO Metrics logging every 30s
2017/05/17 14:45:44.703196 output.go:254: INFO Loading template enabled. Reading template file: /go/src/app/apexbeat.template.json
2017/05/17 14:45:44.711508 output.go:265: INFO Loading template enabled for Elasticsearch 2.x. Reading template file: /go/src/app/apexbeat.template-es2x.json
2017/05/17 14:45:44.711839 client.go:123: INFO Elasticsearch url: http://elasticsearch:9200
2017/05/17 14:45:44.711969 outputs.go:108: INFO Activated elasticsearch as output plugin.
2017/05/17 14:45:44.712115 publish.go:238: DBG  Create output worker
2017/05/17 14:45:44.712248 publish.go:280: DBG  No output is defined to store the topology. The server fields might not be filled.
2017/05/17 14:45:44.712342 publish.go:295: INFO Publisher name: 4e6e3be15ebd
2017/05/17 14:45:44.712977 async.go:63: INFO Flush Interval set to: 1s
2017/05/17 14:45:44.713020 async.go:64: INFO Max Bulk Size set to: 50
2017/05/17 14:45:44.713037 async.go:72: DBG  create bulk processing worker (interval=1s, bulk size=50)
2017/05/17 14:45:44.716309 beat.go:212: INFO apexbeat start running.
2017/05/17 14:45:44.716481 apexbeat.go:47: INFO apexbeat is running (port 8089)! Hit CTRL-C to stop it.
this is what it looks like on my machine
opening port 8089
should look similar on your machine
Jens Saade
@jenssaade
btw, you were looking for the binary, it's renamed/relocated to /go/bin/app:
FROM golang:alpine

MAINTAINER Jens Saade "jens@verticle.io"

RUN apk update && \
    apk upgrade && \
    apk add git

RUN cd /go/src/
RUN git clone https://github.com/verticle-io/apexbeat.git

RUN mv apexbeat /go/src/app
ADD beatconfig/apexbeat.yml /go/src/app/apexbeat.yml

RUN go get -d -v app
RUN go install -v app

ADD entrypoint.sh /entrypoint.sh
RUN chmod a+x /entrypoint.sh

VOLUME /go/src/app

CMD ["/entrypoint.sh"]
creating that is quite some days ago, but now I remembered ;)
Jens Saade
@jenssaade
you might want to change /go/src/app/apexbeat.yml though, I see it points to "elasticsearch:9200"
used that within a docker-compose scenario I guess
netics-w
@netics-w
Yes, that works. Thanks!
Jens Saade
@jenssaade
perfect ;)
heguanglong01
@heguanglong01

Hi,Jens When the Java -javaagent:apexAgent-v0.7.1-all.jar=myApexAgentConfig.properties is executed, the startup is successful and the error is not reported.
But without executing the Minimal.groovy script, I want to know the reason why I didn't execute Minimal.groovy script, where com.foo.Bar was created, and the console didn't output.

<apex> trying to weave...

<apex> weaving method...

<apex> successfully weaved method...
Foo? Bar!

Jens Saade
@jenssaade
Not sure if I understand correctly. Could you rephrase your problem?
heguanglong01
@heguanglong01
Hi,Jens,When the Java -javaagent:apexAgent-0.7-all.jar=myApexAgentConfig.properties -jar agent.jar is started, the console outputs the following error:
23:10:45.543 [main] INFO i.v.a.a.i.AgentClassFileTransformer - <apex> trying to weave com.foo.Bar
23:10:45.643 [main] ERROR i.v.a.a.i.AgentClassFileTransformer - <apex> Cannot find classes for signature [float]
Java.lang.ClassNotFoundException: float
At java.net.URLClassLoader.findClass (URLClassLoader.java:381) ~[na:1.8.0_151]
At java.lang.ClassLoader.loadClass (ClassLoader.java:424) ~[na:1.8.0_151]
At sun.misc.Launcher$AppClassLoader.loadClass (Launcher.java:335) ~[na:1.8.0_151]
At java.lang.ClassLoader.loadClass (ClassLoader.java:357) ~[na:1.8.0_151]
At java.lang.Class.forName0 (Native Method) ~[na:1.8.0_151]
At java.lang.Class.forName (Class.java:348) ~[na:1.8.0_151]
At io.verticle.apex.agent.instrument.AgentClassFileTransformer.getClass (AgentClassFileTransformer.java:154) ~[apexAgent-0.7-all.jar:0.7]
At io.verticle.apex.agent.instrument.AgentClassFileTransformer.lambda$transform$4 (AgentClassFileTransformer.java:70) ~[apexAgent-0.7-all.jar:0.7]
At java.util.ArrayList.forEach (ArrayList.java:1255) ~[na:1.8.0_151]
At io.verticle.apex.agent.instrument.AgentClassFileTransformer.transform (AgentClassFileTransformer.java:65) ~[apexAgent-0.7-all.jar:0.7]
At sun.instrument.TransformerManager.transform (TransformerManager.java:188) ~[na:1.8.0_151]
At sun.instrument.InstrumentationImpl.transform (InstrumentationImpl.java:428) ~[na:1.8.0_151]
At java.lang.ClassLoader.defineClass1 (Native Method) ~[na:1.8.0_151]
At java.lang.ClassLoader.defineClass (ClassLoader.java:763) ~[na:1.8.0_151]
At java.security.SecureClassLoader.defineClass (SecureClassLoader.java:142) ~[na:1.8.0_151]
At java.net.URLClassLoader.defineClass (URLClassLoader.java:467) ~[na:1.8.0_151]
At java.net.URLClassLoader.access$100 (URLClassLoader.java:73) ~[na:1.8.0_151]
At java.net.URLClassLoader$1.run (URLClassLoader.java:368) ~[na:1.8.0_151]
At java.net.URLClassLoader$1.run (URLClassLoader.java:362) ~[na:1.8.0_151]
At java.security.AccessController.doPrivileged (Native Method) ~[na:1.8.0_151]
At java.net.URLClassLoader.findClass (URLClassLoader.java:361) ~[na:1.8.0_151]
At java.lang.ClassLoader.loadClass (ClassLoader.java:424) ~[na:1.8.0_151]
At sun.misc.Launcher$AppClassLoader.loadClass (Launcher.java:335) ~[na:1.8.0_151]
At java.lang.ClassLoader.loadClass (ClassLoader.java:357) ~[na:1.8.0_151]
At sun.launcher.LauncherHelper.checkAndLoadMain (LauncherHelper.java:495) ~[na:1.8.0_151]
Jens Saade
@jenssaade
Ok, so the agent is unable to match that class/method with that signature
Is that class com.foo.Bar on your classpath?
float might also be the problem try to use java.lang.Float instead when matching the signature
Jens Saade
@jenssaade
image.png
I guess that is what causes your problem.
And I definitely should update the docs: http://toolkits.verticle.io/docs/index.html#configure-instrumentation ;)
still some TODOs in there ...
@heguanglong01 please let me know if your problem is solved.
heguanglong01
@heguanglong01
@jenssaade Thank you. According to your method, the parameter replacement (float-->java.lang.Float) is solved. But a new problem :
blob
heguanglong01
@heguanglong01
@jenssaade Upgrade the apexAgent-0.7-all.jar to the apexAgent-v0.7.1-all.jar problem solution. But apex-service-template accepts information that does not get to the application.com.foo.Bar call.
blob
Jens Saade
@jenssaade
@heguanglong01 could you please share your code (e.g. https://gist.github.com/) so I can have a look?
Or create a temporary sample project on github
heguanglong01
@heguanglong01
@jenssaade Thank you very much for the help. The problem has been solved!
Jens Saade
@jenssaade
Great! Thats good news 😊