What is about integration glowroot agent with other collectors?

821 views
Skip to first unread message

knik...@gmail.com

unread,
Jan 27, 2017, 6:47:05 AM1/27/17
to Glowroot
Can I integrate glowroot-agent with other monitoring systems?

For example Graphite, Prometheus or DataDog.

Trask Stalnaker

unread,
Jan 30, 2017, 4:07:32 AM1/30/17
to Glowroot, knik...@gmail.com
Hi,

What kind of data do you want to send to another monitoring system?  Is this in addition to storing the data in glowroot, or instead of storing the data in glowroot?

Thanks,
Trask
Message has been deleted

knik...@gmail.com

unread,
Jan 30, 2017, 5:27:31 AM1/30/17
to Glowroot, knik...@gmail.com
Hi,

I want to send to another monitoring system counters, gauges and timers that Glowroot had exposed.  
This is instead of storing the data in the central collector.

I have spring application with endpoints. I want to send information about a time of execution requests this endpoint to the other monitoring system.
Also I have the method of business logic. I want to set the timer on the method and to send the information about a time of execution this method to the other monitoring system.


Thanks,
Konstantin

понедельник, 30 января 2017 г., 12:07:32 UTC+3 пользователь Trask Stalnaker написал:

Trask Stalnaker

unread,
Feb 1, 2017, 4:31:10 AM2/1/17
to Glowroot, knik...@gmail.com
Hi,

You can run the agent with your own implementation of the Collector interface, which would allow you to process and send the data however you like:


There's an example at https://github.com/trask/glowroot-example-collector, but the example is out of date and doesn't work with the current glowroot version.

Let me know if you are interested in this, and I will update the example to work with the current glowroot version.

Thanks,
Trask

knik...@gmail.com

unread,
Feb 7, 2017, 5:18:41 AM2/7/17
to Glowroot, knik...@gmail.com
I'm interested in this. Could you update the example, please?

среда, 1 февраля 2017 г., 12:31:10 UTC+3 пользователь Trask Stalnaker написал:

Trask Stalnaker

unread,
Feb 8, 2017, 2:38:09 AM2/8/17
to Glowroot, knik...@gmail.com
Hi Konstantin,

https://github.com/trask/glowroot-example-collector is updated now.

After building it, create a directory named "services" directly under your glowroot folder, and put the jar file in that "services" directory.

Glowroot will find and use this when it starts up, instead of the built-in collector.

You should see something like this in the glowroot log:

2017-02-08 07:36:03.400 INFO  org.glowroot - using collector: org.example.GlowrootCollector

Thanks,
Trask

knik...@gmail.com

unread,
Feb 8, 2017, 5:05:07 AM2/8/17
to Glowroot, knik...@gmail.com
Hi Trask,

All work. Thanks!

среда, 8 февраля 2017 г., 10:38:09 UTC+3 пользователь Trask Stalnaker написал:

ant.e....@gmail.com

unread,
Apr 6, 2018, 9:19:22 AM4/6/18
to Glowroot
Hi everyone.

Can anyone provide an example of the 'build' bit? :)

I'm no Java expert but I think I need to compile the example collector. I'm assuming it's expecting me to compile the .java file with the javac command but I'm getting errors that the Glowroot package don't exist when attempting to import them. So far the best I've come up with is ...

# javac -cp /opt/glowroot/tmp/glowroot.jar GlowrootExampleCollector.java

... but I'm probably so far of being correct.

Anthony.

Anthony Roberts

unread,
Apr 6, 2018, 12:44:47 PM4/6/18
to Glowroot
Hi everyone.

A very quick follow up.

The import statements in the example collector contains ...

import org.glowroot.agent.shaded.glowroot.wire.api.model.AgentConfigOuterClass.AgentConfig; import org.glowroot.agent.shaded.glowroot.wire.api.model.CollectorServiceOuterClass.Environment; import org.glowroot.agent.shaded.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValue; import org.glowroot.agent.shaded.glowroot.wire.api.model.CollectorServiceOuterClass.LogEvent;

... but /opt/glowroot/glowroot.jar contains ...

# jar tf /opt/glowroot/glowroot.jar | grep AgentConfigOuterClass.AgentConfig | head -n1 org/glowroot/agent/shaded/org/glowroot/wire/api/model/AgentConfigOuterClass$AgentConfig$AlertConfig$AlertCondition$Builder.class

So there's a missing .org. in the example code. It should read ...

import org.glowroot.agent.shaded.org.glowroot.wire.api.model.AgentConfigOuterClass.AgentConfig; import org.glowroot.agent.shaded.org.glowroot.wire.api.model.CollectorServiceOuterClass.Environment; import org.glowroot.agent.shaded.org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValue; import org.glowroot.agent.shaded.org.glowroot.wire.api.model.CollectorServiceOuterClass.LogEvent;

This is based on my interpretation of the error rather than any expertise on Java programming. However, it compiled without any errors which is always a good thing!

Anthony.

Trask Stalnaker

unread,
Apr 11, 2018, 2:56:28 AM4/11/18
to Glowroot
Hi Anthony,

Thanks for reporting the build issue.  I have updated it to work with the latest glowroot version now.  Best to build with maven:

mvn clean package

Thanks,
Trask

Anuj Pandey

unread,
Apr 4, 2022, 12:46:07 AM4/4/22
to Glowroot
Hi Trask

I used the example collector and exported trace data in the file system but I only got startup traces and no web traces were captured what should I do.
Please respond asap.

Reply all
Reply to author
Forward
0 new messages