Support Questions
Find answers, ask questions, and share your expertise

How to fetch ranger live logs from solr?

Expert Contributor

Hi Everyone,

I have downloaded HDP 2.5 on which ranger is by default configured with solr.In earlier HDP version it was configured with postgres to store audit logs,so it was easy job to fetch the logs from DB using java code.but now i don't understand How can i fetch all the audit logs from solr using java?

And there is one more doubt,I did so many task in hive and all logs are getting reflected correctly with current date in ranger audit tab.but After querying on solr UI it's displaying old logs i think logs are not getting stored in solr.

so what could be the reason behind that?

As i am very ne to use solr so could you please guys, guid me in fetching those logs from solr.

I queried in solr as given below:




Apache Ambari Audit configuration tab:


Please help me to solve this issue.

Thanks in advance,


Re: How to fetch ranger live logs from solr?

SolrJ is a great way to query Solr using Java: