Log4J 1.2 Micrometer metrics - micrometer

It seems that micrometer metrics is available only for Log4J2 and Logback.
But there is not metrics for Log4J 1.2.
Is there any simple way to get log4j 1.2 integration for micrometer metrics?

You could create an appender that records counts.
DropWizard has an InstrumentedAppender that you could mimic. Here is a usage example: https://metrics.dropwizard.io/4.1.2/manual/log4j.html

Related

Spark metrics - Disable all metrics

I'm building a monitoring system for our Spark. I sent the metrics with spark's graphite sink. I want to have the ability to stop all the metrics dynamically. So that means I need to set it with sc.set.
How can I just disable all metrics in the spark configuration? Because I couldn't find something like spark.metrics.enable property.
I couldn't find a way of disabling it. What I do is only set it if I want to monitor (per application).
sc.set("spark.metrics.conf.*.sink.graphite.class", "org.apache.spark.metrics.sink.GraphiteSink")

Which version of Kafka are impacted due to Log4j CVE-2021-44228?

Which versions of Kafka are impacted by CVE-2021-44228?
Nothing is yet updated on Apache Kafka Security Vulnerabilities about this vulnerability.
Update 2021-12-15
APACHE KAFKA SECURITY VULNERABILITIES has confirmed:
CVE-2021-45046
Users should NOT be impacted by this vulnerability
CVE-2021-44228
Users should NOT be impacted by this vulnerability
CVE-2021-4104
Version 1.x of Log4J can be configured to use JMS Appender, which publishes log events to a JMS Topic. Log4j 1.x is vulnerable if the deployed application is configured to use JMSAppender.
So please check the site for details.
Update 2021-12-13
As suggested by bovine, log4j1.x may also be affected to this vulnerability.
strictly speaking, applications using Log4j 1.x may be impacted if their configuration uses JNDI. However, the risk is much lower.
please refer to this link for latest status.
Evidence for not using log4j2
By checking dependencies.gradle of Kafka:
1.0.0 and 3.0.0
both are using 1.2.17.
As the issue is affecting version from 2.0-beta9 to 2.14.1, Kafka is not affected by this security vulnerabilities.

How to store Log4j logs directly in HBase?

How can I store log4j logs in HBase?
Is there any predefined log4j appender available in log4j.
Or any other logging framework support it?

How to stop Hazelcast from automatic console print?

I'm using Hazelcast as a library in my program.
I don't want Hazelcast to print all the stuff to console while adding a node or creating newHazelcastInstance.
It should just add node in background without printing? How can I achieve this?
It depends on your logging framework you are using, or how you have configured Hazelcast.
For example if you are using log4j and have selected the log4j logger in Hazelcast, then you could filter out the Hazelcast log entries.

how to inserts the log4j logs into cassandra

I was trying to insert log4j logs from a Java application into Cassandra. I got the configuration for the log4j properties from http://www.datastax.com/docs/datastax_enterprise2.0/logging/log4j_logging.
I was not able to get the com.datastax.logging.appender.CassandraAppender. Can anybody let me know where to get the Cassandra appender, or is there a way we can integrate log4j and Cassandra?
The log4j appender is part of DataStax Enterprise; it's not included in Apache Cassandra by itself. If you're already using DataStax Enterprise, make sure that you've added path/to/dse/resources/log4j-appender/lib/ to the classpath for your application.

Resources