Re: [External]Re: Exporter usage of Ignite 2.8.0
Thanks for providing the config! I copied/pasted it into my example-default.xml. Afterwards I started a server node using ./ignite.sh ../examples/config/example-default.xml. I am using Ignite 2.8.1 btw. Unfortunately I am still getting no result. The root cause must lie somewhere else. Interestingly enough https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/opencensus/OpenCensusMetricsExporterExample.java works totally fine. In fact the above config is entirely based on it. Best, Vincent -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [External]Re: Exporter usage of Ignite 2.8.0
I more-or-less just copy-and-pasted your example: https://github.com/GridGain-Demos/ignite-prometheus/blob/main/src/main/resources/ignite-prometheus.xml Regards, Stephen > On 4 Feb 2021, at 15:41, VincentCE wrote: > > Hi Stephen, > > I am glad to here that the configuration works for you! Unfortunately I > already tried different ports but this didn't solve my problem, also I am > not running ignites REST server. Could you possibly share the ignite > configuration which is working for you? > > Best, > Vincent > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [External]Re: Exporter usage of Ignite 2.8.0
Hi Stephen, I am glad to here that the configuration works for you! Unfortunately I already tried different ports but this didn't solve my problem, also I am not running ignites REST server. Could you possibly share the ignite configuration which is working for you? Best, Vincent -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [External]Re: Exporter usage of Ignite 2.8.0
That’s a good trick! I couldn’t figure out the Spring magic required to call a static method, but that works for me. (I had written a small lifecycle bean, which also works, but this is better.) I would try to have your collector running on a port other than 8080. That’s a pretty common port for web services, including Ignite’s own REST server if you have that running. Regards, Stephen > On 4 Feb 2021, at 14:19, VincentCE wrote: > > Hi! > > We would like to use the prometheus/opencensus exporter for our server nodes > which we start using an xml configuration. Facundo.maldonado mentioned > before that this can be done wrapping the collector and http server in > another bean. This is what I tried which is probably not exactly as > suggested: > > > http://www.springframework.org/schema/beans"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xmlns:util="http://www.springframework.org/schema/util"; > xsi:schemaLocation=" >http://www.springframework.org/schema/beans >http://www.springframework.org/schema/beans/spring-beans.xsd >http://www.springframework.org/schema/util >http://www.springframework.org/schema/util/spring-util.xsd";> > class="org.apache.ignite.configuration.IgniteConfiguration"> > > > > > class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> > > class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"> > > > >127.0.0.1:47500..47509 > > > > > > > > > class="org.apache.ignite.spi.metric.opencensus.OpenCensusMetricExporterSpi"> > > > > > > class="org.springframework.beans.factory.config.MethodInvokingBean"> > value="io.opencensus.exporter.stats.prometheus.PrometheusStatsCollector.createAndRegister" > /> > > > > > > > > > > Using this config the ignite server node starts as desired and the same > holds for the inner http server. However no metrics are collected (Nothing > is displayed on http://localhost:8080/), it seems as if > prometheusStatsCollector is not successfully registering with the internally > used default registry. Can someone see the issue with the above > configuration? > > Thanks! > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [External]Re: Exporter usage of Ignite 2.8.0
Hi! We would like to use the prometheus/opencensus exporter for our server nodes which we start using an xml configuration. Facundo.maldonado mentioned before that this can be done wrapping the collector and http server in another bean. This is what I tried which is probably not exactly as suggested: http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:util="http://www.springframework.org/schema/util"; xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd";> 127.0.0.1:47500..47509 Using this config the ignite server node starts as desired and the same holds for the inner http server. However no metrics are collected (Nothing is displayed on http://localhost:8080/), it seems as if prometheusStatsCollector is not successfully registering with the internally used default registry. Can someone see the issue with the above configuration? Thanks! -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [External]Re: Exporter usage of Ignite 2.8.0
Hello! This sounds like a correct approach. Regards, -- Ilya Kasnacheev чт, 14 янв. 2021 г. в 15:07, facundo.maldonado : > As far as I know it's not possible to call statically a non-factory > method, a > void method like PrometheusStatsCollector.createAndRegister(). > > I resolved that creating another bean wrapping the collector and http > server > creation. > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
Re: [External]Re: Exporter usage of Ignite 2.8.0
As far as I know it's not possible to call statically a non-factory method, a void method like PrometheusStatsCollector.createAndRegister(). I resolved that creating another bean wrapping the collector and http server creation. -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [External]Re: Exporter usage of Ignite 2.8.0
Hello! It should be doable: just transfer these object instantiations and static method calls to Spring XML. Make sure that they happen in the correct order. I genuinely don't know if there's an easier way, I expect there's not. Regards, -- Ilya Kasnacheev ср, 6 янв. 2021 г. в 20:05, facundo.maldonado : > Hi everyone, is there a way to set up this via XML configuration? > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
Re: [External]Re: Exporter usage of Ignite 2.8.0
Hi everyone, is there a way to set up this via XML configuration? -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: [External]Re: Exporter usage of Ignite 2.8.0
Hello, Kamlesh! Thanks for trying out open census integration. You can find self-explained example in Ignite sources [1]. To integrate with prometheus you have: 1. Enable `ignite-opencensus`. 2. Configure opencensus exporter in IgniteConfiguration: ``` OpenCensusMetricExporterSpi openCensusMetricExporterSpi = new OpenCensusMetricExporterSpi(); // Metrics written to the collector each 1 second. openCensusMetricExporterSpi.setPeriod(PERIOD); cfg.setMetricExporterSpi(openCensusMetricExporterSpi); ``` 3. Enable opencensus http server(after it you can view metrics values with the http://HOST:PORT/ URL): ``` // Setting up prometheus stats collector. PrometheusStatsCollector.createAndRegister(); // Setting up HTTP server that would serve http://localhost:8080 requests. HTTPServer srv = new HTTPServer(HOST, PORT, true); ``` 4. Grab metrics values in the prometheus: prometheus.yml ``` scrape_configs: - job_name: ‘ignite' static_configs: - targets: [‘localhost:8080’] # - same host and port as at step 3. ``` [1] https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/opencensus/OpenCensusMetricsExporterExample.java > 25 марта 2020 г., в 12:01, Kamlesh Joshi написал(а): > > Thanks for the update Anton. > > Have some queries as below: > 1. How do we feed the Ignite cluster data which is exposed on JMX port > to custom exporter given on > (https://opencensus.io/exporters/supported-exporters/java/prometheus/) ? > 2. If we move opencensus lib to $IGNITE_HOME/libs/ will it be exposed > on some default port (likewise ignite-rest)? How does exactly opencensus will > affect the cluster? > > Thanks and Regards, > Kamlesh Joshi > > -Original Message- > From: akurbanov > Sent: 24 March 2020 19:28 > To: user@ignite.apache.org > Subject: [External]Re: Exporter usage of Ignite 2.8.0 > > The e-mail below is from an external source. Please do not open attachments > or click links from an unknown or suspicious origin. > > Hello, > > Unfortunately, the documentation is not available yet on the website, but you > can use org.apache.ignite.spi.metric.opencensus.OpenCensusMetricExporterSpi > that comes with ignite-opencensus in distribution: > $IGNITE_HOME/libs/optional/ignite-opencensus. > > The metric exporter should be registered in IgniteConfiguration, please see > the Java example: > https://github.com/nizhikov/ignite/blob/b362cfad309ec8f31c6cba172391c74589c9191f/modules/opencensus/src/test/java/org/apache/ignite/internal/processors/monitoring/opencensus/OpenCensusMetricExporterSpiTest.java > > Prometeus: > https://opencensus.io/exporters/supported-exporters/java/prometheus/ > Documentation waiting list: > http://apache-ignite-developers.2346864.n4.nabble.com/Ignite-2-8-documentation-td46008.html > IEP 35: > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=112820392&src=sidebar > > Best regards, > Anton > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ > > > "Confidentiality Warning: This message and any attachments are intended only > for the use of the intended recipient(s), are confidential and may be > privileged. If you are not the intended recipient, you are hereby notified > that any review, re-transmission, conversion to hard copy, copying, > circulation or other use of this message and any attachments is strictly > prohibited. If you are not the intended recipient, please notify the sender > immediately by return email and delete this message and any attachments from > your system. > > Virus Warning: Although the company has taken reasonable precautions to > ensure no viruses are present in this email. The company cannot accept > responsibility for any loss or damage arising from the use of this email or > attachment." >
RE: [External]Re: Exporter usage of Ignite 2.8.0
Thanks for the update Anton. Have some queries as below: 1. How do we feed the Ignite cluster data which is exposed on JMX port to custom exporter given on (https://opencensus.io/exporters/supported-exporters/java/prometheus/) ? 2. If we move opencensus lib to $IGNITE_HOME/libs/ will it be exposed on some default port (likewise ignite-rest)? How does exactly opencensus will affect the cluster? Thanks and Regards, Kamlesh Joshi -Original Message- From: akurbanov Sent: 24 March 2020 19:28 To: user@ignite.apache.org Subject: [External]Re: Exporter usage of Ignite 2.8.0 The e-mail below is from an external source. Please do not open attachments or click links from an unknown or suspicious origin. Hello, Unfortunately, the documentation is not available yet on the website, but you can use org.apache.ignite.spi.metric.opencensus.OpenCensusMetricExporterSpi that comes with ignite-opencensus in distribution: $IGNITE_HOME/libs/optional/ignite-opencensus. The metric exporter should be registered in IgniteConfiguration, please see the Java example: https://github.com/nizhikov/ignite/blob/b362cfad309ec8f31c6cba172391c74589c9191f/modules/opencensus/src/test/java/org/apache/ignite/internal/processors/monitoring/opencensus/OpenCensusMetricExporterSpiTest.java Prometeus: https://opencensus.io/exporters/supported-exporters/java/prometheus/ Documentation waiting list: http://apache-ignite-developers.2346864.n4.nabble.com/Ignite-2-8-documentation-td46008.html IEP 35: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=112820392&src=sidebar Best regards, Anton -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/ "Confidentiality Warning: This message and any attachments are intended only for the use of the intended recipient(s). are confidential and may be privileged. If you are not the intended recipient. you are hereby notified that any review. re-transmission. conversion to hard copy. copying. circulation or other use of this message and any attachments is strictly prohibited. If you are not the intended recipient. please notify the sender immediately by return email. and delete this message and any attachments from your system. Virus Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email. The company cannot accept responsibility for any loss or damage arising from the use of this email or attachment."
Re: Exporter usage of Ignite 2.8.0
Kamlesh, Anton, There are documentation pages that should answer your questions: https://apacheignite.readme.io/docs/new-metrics#section-exporters Just in case, looping in Nikolay who is a primary contributor to the feature. - Denis On Mon, Mar 23, 2020 at 4:02 AM Kamlesh Joshi wrote: > Hi Team, > > > > Can you help how to use inbuilt exporter for Ignite 2.8.0. I read it in > release notes that ‘*Added monitoring API - an exporter of Ignite metrics > to external recipients*’. > > > > Do we have to manually expose these exporters on some port ? Or are they > exposed on any default port ? So that these exporters then can directly be > consumed by Prometheus. > > > > *Thanks and Regards,* > > *Kamlesh Joshi* > > > > > "*Confidentiality Warning*: This message and any attachments are intended > only for the use of the intended recipient(s), are confidential and may be > privileged. If you are not the intended recipient, you are hereby notified > that any review, re-transmission, conversion to hard copy, copying, > circulation or other use of this message and any attachments is strictly > prohibited. If you are not the intended recipient, please notify the sender > immediately by return email and delete this message and any attachments > from your system. > > *Virus Warning:* Although the company has taken reasonable precautions to > ensure no viruses are present in this email. The company cannot accept > responsibility for any loss or damage arising from the use of this email or > attachment." >
Re: Exporter usage of Ignite 2.8.0
Hello, Unfortunately, the documentation is not available yet on the website, but you can use org.apache.ignite.spi.metric.opencensus.OpenCensusMetricExporterSpi that comes with ignite-opencensus in distribution: $IGNITE_HOME/libs/optional/ignite-opencensus. The metric exporter should be registered in IgniteConfiguration, please see the Java example: https://github.com/nizhikov/ignite/blob/b362cfad309ec8f31c6cba172391c74589c9191f/modules/opencensus/src/test/java/org/apache/ignite/internal/processors/monitoring/opencensus/OpenCensusMetricExporterSpiTest.java Prometeus: https://opencensus.io/exporters/supported-exporters/java/prometheus/ Documentation waiting list: http://apache-ignite-developers.2346864.n4.nabble.com/Ignite-2-8-documentation-td46008.html IEP 35: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=112820392&src=sidebar Best regards, Anton -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/