forked from theforeman/foreman
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes theforeman#4659 - added foreman-tail tool
- Loading branch information
Showing
14 changed files
with
114 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
foreman\-tail(8) | ||
================ | ||
:man source: foreman-tail | ||
:man manual: Foreman Manual | ||
|
||
NAME | ||
---- | ||
foreman-tail - Tool for calling tail on Foreman logs | ||
|
||
SYNOPSIS | ||
-------- | ||
|
||
foreman-tail | ||
|
||
foreman-tail rails | ||
|
||
foreman-tail [component] | ||
|
||
foreman-tail -l | ||
|
||
foreman-tail -h | ||
|
||
DESCRIPTION | ||
----------- | ||
|
||
The foreman-tail is an utility which calls tail with appropriate log files. | ||
|
||
OPTIONS | ||
------- | ||
|
||
When used without any parameters, it tails all relevant Foreman log files. | ||
|
||
When used with one or more parameters, it tails those provided. | ||
|
||
Foreman plugins can extend foreman-tail, use this command to find all | ||
possible components that are valid: | ||
|
||
foreman-tail -l | ||
|
||
Example components are "rails" for Rails production log or "proxy" for Foreman | ||
Proxy production logs. There are components for Apache http daemon, Puppet | ||
Master or cron available. | ||
|
||
SEE ALSO | ||
-------- | ||
*foreman-debug*(8) | ||
GETTING HELP | ||
------------ | ||
|
||
For support, please see http://theforeman.org/support.html, the | ||
[email protected] mailing list or #theforeman on Freenode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
dir=/usr/share/foreman/script/foreman-tail.d | ||
opts="-Fn100" | ||
|
||
if [ "$1" == "-h" ]; then | ||
man foreman-tail; exit 1 | ||
fi | ||
if [ "$1" == "-l" ]; then | ||
ls $dir | cut -d- -f2; exit 1 | ||
fi | ||
|
||
if [ -z "$1" ]; then | ||
tail $opts $(eval echo $(cat $dir/*)) | ||
else | ||
if [ "$#" -eq 1 ]; then | ||
tail $opts $(eval echo $(cat $dir/*-$1)) | ||
else | ||
args=$(IFS=","; echo "$*") | ||
tail $opts $(cat $(eval echo $dir/*-{$args})) | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/var/log/foreman/cron.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/var/log/foreman/db_{migrate,seed}.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/var/log/puppet/masterhttp.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/var/log/foreman-proxy/{access,proxy}.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/var/log/foreman/production.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/var/log/syslog | ||
/var/log/daemon.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/var/log/apache2/*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/var/log/messages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/var/log/named/*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/var/log/httpd/*.log |