Support Questions

Find answers, ask questions, and share your expertise

Ranger Audit tab doesn't show any data for Nifi

avatar
Expert Contributor

Hi ,

I enabled Nifi with Ranger and added all the policies , but no data is showing in the audit tab in Ranger.

Any thoughts?

Sanaz

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Hi @Sanaz Janbakhsh,

did you manage to install Ambari-Infra or external Solr, unless you store the logs into solr you will not be able to see the adit log information into the tab.

once you install the Ambari-Infra go to Ranger --> Configs --> Ranger Audits --> turn on AudittoSolr and SolrCloud (attached the figure here ) then restart the Ranger.

38582-audit-hdf-clstr.jpg

View solution in original post

7 REPLIES 7

avatar
Rising Star

Hi @Sanaz Janbakhsh, after enabling Nifi for Ranger, can you confirm Nifi is able to download policies from Ranger, if it is doing so Nifi service should be registered under Audits -> Plugins tab in Ranger-UI.

For nifi plugin to work, you can also get help from below articles,

https://community.hortonworks.com/articles/60842/hdf-20-defining-nifi-policies-in-ranger.html

https://community.hortonworks.com/articles/57980/hdf-20-apache-nifi-integration-with-apache-ambarir....

https://community.hortonworks.com/content/kbentry/60001/hdf-20-integrating-secured-nifi-with-secured...

avatar
Expert Contributor

Hi,

I already enabled and added the service too and i can see the logs in plugin but not in audit, Please find my attached below.

Thanks,

SJ

avatar
Super Collaborator

Hi @Sanaz Janbakhsh,

did you manage to install Ambari-Infra or external Solr, unless you store the logs into solr you will not be able to see the adit log information into the tab.

once you install the Ambari-Infra go to Ranger --> Configs --> Ranger Audits --> turn on AudittoSolr and SolrCloud (attached the figure here ) then restart the Ranger.

38582-audit-hdf-clstr.jpg

avatar
Rising Star

Hi @Sanaz Janbakhsh,

Is the audit functionality working for other services, As Nifi plugin is able to download pollicies, Ranger authorization seems to be working fine.
Can you check Nifi log for audit related errors, seems Nifi is not able to write audits to Solr ?
Also do mention the Ambari / HDF versions you are using.

avatar
Expert Contributor

Hi

I enabled Ranger in HDP just for Nifi and the plugin session and plugins tab works but both Access and Admin tab doesn't work. I couldn't see any error under

/var/log/ranger/admin logs files. Any other log files that I need to check? I also test the connection to mysql db and it works fine too.

HDF version: 2.1;Nifi:1.1.0;Ranger : 0.6.2;Ambari : 2.4

SJ

avatar
Rising Star

@Sanaz Janbakhsh,

If /var/log/ranger/admin is empty or is not available, logs for Ranger will be available under /usr/hdf/current/ranger-admin/ews/logs on the host where Ranger-Admin is installed in case of a multi-node setup.

For Nifi audit not working, can you check the Nifi logs, looks like Nifi is unable to Audit to Solr, what is the Solr you are using, is it installed from Ambari as Ambari-Infra service ?

avatar
Expert Contributor

Hi vsuvagia,

I checked the logs. it is successful call but still there is not data avaialable in the audit tab- access log.

[25/Nov/2017:10:46:27 -0700] "GET /service/assets/accessAudit?XXXXX HTTP/1.1" 200 119

I enabled the Amabari-infra service for the ranger. Please find the screenshot.

SJ.untitled.png