- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Log file location - Is there a way to change /var/log location to /var/log/hdp during the install ?
- Labels:
-
Apache Ambari
Created 11-19-2015 05:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Log file location - Is there a way to change /var/log location to /var/log/hdp during the install ?
Created 11-19-2015 06:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The best time to change log directories is at installation where each of the different components will expose their log directory prefix. This is where you can choose an alternate log directory prefix for which all component-specific logs will be created under.log-dir-prefix.png
Created 11-19-2015 05:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's no single point where this change can be made. The reason is many components in the HDP stack will have their own log locations all set to /var/log.
The good news is most of the components already create a subdir for their logs under /var/log.
You could try symlinking /var/log/<component> to /var/log/hdp/<component> post-install, but the downside is having to apply the change on every node and deviating from defaults.
Created 11-19-2015 05:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! No symlinks allowed at corporate level.
Created 11-19-2015 06:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The best time to change log directories is at installation where each of the different components will expose their log directory prefix. This is where you can choose an alternate log directory prefix for which all component-specific logs will be created under.log-dir-prefix.png
Created 11-20-2015 08:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you've missed a folder at install time, you can use the API to amend it post-install, First, you will need to stop the service. You can then use the configs.sh script to easily modify it.
configs.sh is located in /var/lib/ambari-server/resources/scripts on your ambari server
If you would like to change the zookeeper log dir.
./configs.sh set localhost <clustername> zookeeper-env zk_log_dir “/my/new/zookeeper/log/directory”
Created 03-14-2016 07:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used:
grep '/var/log' /var/lib/ambari-agent/cache/cluster_configuration/*
to identify all locations that need to be changed then Ambari/configs.sh to make the adjustments.
Created 03-31-2017 09:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's simple to change it with ambari UI. Otherwise use the ambari configs.sh script and restart all the services. It's smooth and easy.
