Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #1715] add configure option to set log dir and cgi log dir and phpapi log dir #679

Closed
icinga-migration opened this issue Jul 12, 2011 · 5 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/1715

Created by mfriedrich on 2011-07-12 06:41:05 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2011-07-29 14:33:58 +00:00)
Target Version: 1.5
Last Update: 2011-07-29 14:33:58 +00:00 (in Redmine)


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.

Changesets

2011-07-12 16:20:52 +00:00 by mfriedrich dfaa8cc

* 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

2011-07-12 16:22:53 +00:00 by mfriedrich 16df0c0

move debug_file to @LOGDIR@ location too #1715

refs #1715

2011-07-12 17:10:07 +00:00 by mfriedrich 1e08109

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

refs #1715
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-07-12 11:11:44 +00:00

  • Category set to Configuration
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-07-12 15:33:15 +00:00

  • 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

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-07-12 17:02:17 +00:00

  • 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' ;

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-07-16 16:15:17 +00:00

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

it works at my stage, please test.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-07-29 14:33:58 +00:00

  • Status changed from Feedback to Resolved

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant