Feature #1715

add configure option to set log dir and cgi log dir and phpapi log dir

Added by dnsmichi almost 3 years ago. Updated over 2 years ago.

Status:ResolvedStart date:07/12/2011
Priority:NormalDue date:
Assignee:dnsmichi% Done:

100%

Category:Configuration
Target version:Icinga 1.x - 1.5

Description

currently, the rpms are creating their own /var/log/icinga or similar, sed'ing this around. it would be better to target the logdir directly as configure option.

this is the same for the core logs and the cgis logs as well as the php api log dir.

furthermore, the api cmd file should be set via the normal core configure run, if the api is there.

Associated revisions

Revision dfaa8ccd
Added by dnsmichi almost 3 years ago

  • install: add configure option to set log dir and cgi log dir and phpapi log dir #1715
  • e.g. --with-phpapi-log-dir=/var/log/icinga/api --with-log-dir=/var/log/icinga --with-cgi-log-dir=/var/log/icinga/gui
  • apache user permissions
  • install: fix icinga.cmd and log dir replacement in icinga-api aubmodule #1573 #1715

refs #1573
refs #1715

Revision 16df0c03
Added by dnsmichi almost 3 years ago

move debug_file to LOGDIR location too #1715

refs #1715

Revision 1e081096
Added by dnsmichi almost 3 years ago

fix icinga.spec, fix install-cgis and cgilogdir #1715

refs #1715

History

#1 Updated by dnsmichi almost 3 years ago

  • Category set to Configuration
  • Status changed from New to Assigned
  • Assignee set to dnsmichi

#2 Updated by dnsmichi almost 3 years ago

  • Subject changed from add configure option to set log dir and cgi log dir to add configure option to set log dir and cgi log dir and phpapi log dir

#3 Updated by dnsmichi almost 3 years ago

  • % Done changed from 0 to 90
~/icinga/icinga-core $ ./configure --with-phpapi-log-dir=/var/log/icinga/api --with-log-dir=/var/log/icinga --with-cgi-log-dir=/var/log/icinga/gui --with-ext-cmd-file-dir=/var/icinga/rw

            Log directory:  /var/log/icinga
        cgi log directory:  /var/log/icinga/gui
     phpapi log directory:  /var/log/icinga/api

log

/usr/bin/install -c -m 775 -o nagios -g nagios -d /var/log/icinga
/usr/bin/install -c -m 775 -o nagios -g nagios -d /var/log/icinga/archives

$ cat sample-config/icinga.cfg | grep '/var/log/icinga'
log_file=/var/log/icinga/icinga.log
log_archive_path=/var/log/icinga/archives
debug_file=/var/log/icinga/icinga.debug

cgi log

/usr/bin/install -c -m 775 -o apache -g apache -d /var/log/icinga/gui

$ cat sample-config/cgi.cfg | grep '/var/log/icinga/gui'
cgi_log_file=/var/log/icinga/gui/icinga-cgi.log
cgi_log_archive_path=/var/log/icinga/gui

phpapi log

/usr/bin/install -c -m 775 -o apache -g apache -d /var/log/icinga/api

for file in log/*; \
        do /usr/bin/install -c -m 664 -o apache -g apache $file /var/log/icinga/api; done

$ cat module/icinga-api/objects/debug/debugTargets/icingaApiFileDebugger.php | grep '/var/log/icinga/api'
define("DEFAULT_API_LOG_FILE",dirname(__FILE__)."/var/log/icinga/api");

$ cat module/icinga-api/objects/command/IcingaApiCommandSendSsh.php | grep 'icinga.cmd'
                'ssh_pipe'              => '/var/icinga/rw/icinga.cmd',

furthermore fixed in p1.pl too -

use constant    DEBUG_LOG_PATH          => '/var/log/icinga' ;

#4 Updated by dnsmichi almost 3 years ago

  • Status changed from Assigned to Feedback
  • % Done changed from 90 to 100

it works at my stage, please test.

#5 Updated by dnsmichi over 2 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF