Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Ambari Audit log

avatar

Where can I find an audit trail of every changes done via Ambari ? I would like something similar to the configuration diff that we can do using the UI with the addition of the username.

Eg Olivier has changed umask to 077 in hdfs-site on Monday 5th of December 2014 at 2:20:21.123

I've found /var/log/ambari-server/ambari-config-changes.log but it doesn't show the specific change which has happened. I understand that I've got the version and i can diff w/ the previous version but i was wondering if we were recording it somewhere else.

1 ACCEPTED SOLUTION

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
13 REPLIES 13

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar

Awesome stuff!

avatar

thanks 🙂

avatar
Master Mentor

@Jonas Straub nice!!!

avatar
Master Guru

@Jonas Straub - Cool stuff!!

avatar

Great help, thanks a lot

avatar
Expert Contributor

Looks useful, but exactly which python binary is this intended to work with? It fails immediately with a complaint about not being able to find the 'request' package. I grepped the /usr/hdp tree, but cannot find a 'request.py' module.

avatar
Master Mentor

@Steven Hirsch @Jonas Straub

[root@phdns01 ~]# find / -name audit.py

/usr/lib64/python2.6/site-packages/audit.py

/usr/lib64/python2.6/site-packages/sepolgen/audit.py

[root@phdns01 ~]#

[root@phdns01 ~]# find / -name request.py

/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/request.py

/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py

/usr/lib/python2.6/site-packages/urllib3/request.py

/usr/lib/python2.6/site-packages/urllib3/util/request.py

/usr/lib/python2.6/site-packages/rbtools/api/request.py

/usr/lib/python2.6/site-packages/boto/ec2/autoscale/request.py

/usr/lib64/python2.6/site-packages/mercurial/hgweb/request.py

[root@phdns01 ~]#

avatar

@Steven Hirsch

The python script is using the following modules:

requests
json
getpass
logging
sys
getopt

On most of the systems you only have to install getpass and requests.

Requests is not python script, its a complete package that makes it easier to submit API requests, see this page http://docs.python-requests.org/en/master/ (You can install it with "pip install requests")

Let me know if you need any help with the script, I am happy to help and improve the script 🙂