This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1] 2
1
Apache / Re: Logrotate domlogs
« on: February 26, 2019, 07:34:22 AM »
Read all the previous posts?
2
Apache / Re: Logrotate domlogs
« on: February 24, 2019, 11:23:21 PM »
Could be for some, I have log files in that directory with root:root
3
Apache / Re: Logrotate domlogs
« on: February 24, 2019, 08:23:48 PM »
tokar86a? I created the following conf file for my domlogs folder - hope it helps
"/usr/local/apache/domlogs/*" {
weekly
create 0644 root root
rotate 3
size 10M
dateext
missingok
notifempty
}
"/usr/local/apache/domlogs/*" {
weekly
create 0644 root root
rotate 3
size 10M
dateext
missingok
notifempty
}
4
Apache / Re: Logrotate domlogs
« on: February 24, 2019, 08:22:31 PM »
Decided to just go ahead and create the conf files and they appear to be working as expected - still not sure why the error is thrown but if it isn't interfering with the process..
Thanks for your time and input Netino
Thanks for your time and input Netino
5
Apache / Re: Logrotate domlogs
« on: February 23, 2019, 10:38:23 PM »
I've created new CONF files and on saving in the CWP Logrotate editor receive the following error:
Notice: Undefined variable: file_size in /usr/local/cwpsrv/htdocs/resources/admin/modules/file_editor.php on line 0
The conf file entry is the following
"/opt/alt/php-fpm71/usr/var/log/php-fpm.log" {
weekly
create 0644 root root
rotate 3
size 50M
missingok
notifempty
}
If after saving the above I open it again for editing and save it (with NO changes) there is no error message returned, there is a success message..
Notice: Undefined variable: file_size in /usr/local/cwpsrv/htdocs/resources/admin/modules/file_editor.php on line 0
The conf file entry is the following
"/opt/alt/php-fpm71/usr/var/log/php-fpm.log" {
weekly
create 0644 root root
rotate 3
size 50M
missingok
notifempty
}
If after saving the above I open it again for editing and save it (with NO changes) there is no error message returned, there is a success message..
6
Apache / Re: Logrotate domlogs
« on: February 23, 2019, 10:26:55 PM »
Hey Netino, I'd thought of that but then couldn't understand why the same error is appearing from the syslog rotate file? That one is a system default (I believe) and hasn't been changed by me. I also used the CWP interface to the Logrotate manager to create my custom job and typed the commands in manually. I will try the double quotes... when you say double quotes you mean of the entire file path, correct?
Well, that is interesting... I have looked in the log file directory and found a NEW log file has been created and renamed php-fpm.log-20190224
Date/time stamp is 22/02/19 02:43
There is another log in the directory php-fpm.log with a time stamp of 24/02/19 03:14 so something is working/happening. I think I'll change the occurrence of log rotation to hourly to see if it is in fact generating new files
Well, that is interesting... I have looked in the log file directory and found a NEW log file has been created and renamed php-fpm.log-20190224
Date/time stamp is 22/02/19 02:43
There is another log in the directory php-fpm.log with a time stamp of 24/02/19 03:14 so something is working/happening. I think I'll change the occurrence of log rotation to hourly to see if it is in fact generating new files
7
Apache / Re: Logrotate domlogs
« on: February 23, 2019, 10:21:33 PM »
Hey Netino, I'd thought of that but then couldn't understand why the same error is appearing from the syslog rotate file? That one is a system default (I believe) and hasn't been changed by me. I also used the CWP interface to the Logrotate manager to create my custom job and typed the commands in manually. I will try the double quotes... when you say double quotes you mean of the entire file path, correct?
8
Apache / Re: Logrotate domlogs
« on: February 23, 2019, 03:33:54 AM »
Syslog returns the following in debug mode
reading config file /etc/logrotate.d/syslog
error: /etc/logrotate.d/syslog:1 lines must begin with a keyword or a filename (possibly in double quotes)
error: /etc/logrotate.d/syslog:12, unexpected text after }
Allocating hash table for state file, size 15360 B
Handling 1 logs
rotating pattern: /var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
after 1 days (30 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/cron
log does not need rotating (log has been rotated at 2019-2-23 3:49, that is not day ago yet)
considering log /var/log/maillog
log does not need rotating (log has been rotated at 2019-2-23 3:49, that is not day ago yet)
considering log /var/log/messages
log does not need rotating (log has been rotated at 2019-2-23 3:49, that is not day ago yet)
considering log /var/log/secure
log does not need rotating (log has been rotated at 2019-2-23 3:49, that is not day ago yet)
considering log /var/log/spooler
log does not need rotating (log is empty)not running postrotate script, since no logs were rotated
From FPM56 I get the following
reading config file /etc/logrotate.d/FPM56
error: /etc/logrotate.d/FPM56:1 lines must begin with a keyword or a filename (possibly in double quotes)
Allocating hash table for state file, size 15360 B
Handling 1 logs
rotating pattern: /opt/alt/php-fpm56/usr/var/log/php-fpm.log weekly (1 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/alt/php-fpm56/usr/var/log/php-fpm.log
log does not need rotating (log has been already rotated
If I run the logrotate command from the CWP interface for FPM56, it renames the log file with an .1 extension. Thanks for all your assistance
reading config file /etc/logrotate.d/syslog
error: /etc/logrotate.d/syslog:1 lines must begin with a keyword or a filename (possibly in double quotes)
error: /etc/logrotate.d/syslog:12, unexpected text after }
Allocating hash table for state file, size 15360 B
Handling 1 logs
rotating pattern: /var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
after 1 days (30 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/cron
log does not need rotating (log has been rotated at 2019-2-23 3:49, that is not day ago yet)
considering log /var/log/maillog
log does not need rotating (log has been rotated at 2019-2-23 3:49, that is not day ago yet)
considering log /var/log/messages
log does not need rotating (log has been rotated at 2019-2-23 3:49, that is not day ago yet)
considering log /var/log/secure
log does not need rotating (log has been rotated at 2019-2-23 3:49, that is not day ago yet)
considering log /var/log/spooler
log does not need rotating (log is empty)not running postrotate script, since no logs were rotated
From FPM56 I get the following
reading config file /etc/logrotate.d/FPM56
error: /etc/logrotate.d/FPM56:1 lines must begin with a keyword or a filename (possibly in double quotes)
Allocating hash table for state file, size 15360 B
Handling 1 logs
rotating pattern: /opt/alt/php-fpm56/usr/var/log/php-fpm.log weekly (1 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/alt/php-fpm56/usr/var/log/php-fpm.log
log does not need rotating (log has been already rotated
If I run the logrotate command from the CWP interface for FPM56, it renames the log file with an .1 extension. Thanks for all your assistance
9
Apache / Re: Logrotate domlogs
« on: February 21, 2019, 09:44:32 PM »
Created and left the job to run, received this
error: FPM56:1 lines must begin with a keyword or a filename (possibly in double quotes)
error: syslog:1 lines must begin with a keyword or a filename (possibly in double quotes)
error: syslog:12, unexpected text after }
logrotate_script: $'\r': command not found
any more thoughts that might assist with this setup, gratefully accepted
error: FPM56:1 lines must begin with a keyword or a filename (possibly in double quotes)
error: syslog:1 lines must begin with a keyword or a filename (possibly in double quotes)
error: syslog:12, unexpected text after }
logrotate_script: $'\r': command not found
any more thoughts that might assist with this setup, gratefully accepted
10
Apache / Re: Logrotate domlogs
« on: February 20, 2019, 04:23:59 AM »
Hey Netino, thanks for the reply
Have checked the logrotate.status file and this line is present
"/opt/alt/php-fpm56/usr/var/log/php-fpm.log" 2019-2-20-9:19:55
I'm assuming this means that the logration action for php-fpm56 has fired? After changing the order of the missingok directive and pressing the Run Now button in CWP, the log file has an extension of .1 so php-fpm.log.1 however, it still generates the following error
error: /etc/logrotate.d/FPM56:1 lines must begin with a keyword or a filename (possibly in double quotes)
Thanks for your assistance
Have checked the logrotate.status file and this line is present
"/opt/alt/php-fpm56/usr/var/log/php-fpm.log" 2019-2-20-9:19:55
I'm assuming this means that the logration action for php-fpm56 has fired? After changing the order of the missingok directive and pressing the Run Now button in CWP, the log file has an extension of .1 so php-fpm.log.1 however, it still generates the following error
error: /etc/logrotate.d/FPM56:1 lines must begin with a keyword or a filename (possibly in double quotes)
Thanks for your assistance
11
Apache / Re: Logrotate domlogs
« on: February 19, 2019, 11:23:28 PM »
I have since run the Run Now action from CWP again and it has renamed the log file to php-fpm.log.1 but still returns the error. Running it multiple times appears to do nothing.... running the logrotate command from shell gives me the unsurprising (the log file has been renamed by the Run Now action) following
reading config file /etc/logrotate.d/FPM56
error: /etc/logrotate.d/FPM56:1 lines must begin with a keyword or a filename (possibly in double quotes)
Allocating hash table for state file, size 15360 B
Handling 1 logs
rotating pattern: /opt/alt/php-fpm56/usr/var/log/php-fpm.log forced from command line (1 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/alt/php-fpm56/usr/var/log/php-fpm.log
log /opt/alt/php-fpm56/usr/var/log/php-fpm.log does not exist -- skipping
In the long/short term I'd like to be able to create logrotate conf files for all files in my domlogs folder that are getting quite large as well as the php-fpm.log files that are also increasing in size... I currently have 4 versions of PHP installed/being used
reading config file /etc/logrotate.d/FPM56
error: /etc/logrotate.d/FPM56:1 lines must begin with a keyword or a filename (possibly in double quotes)
Allocating hash table for state file, size 15360 B
Handling 1 logs
rotating pattern: /opt/alt/php-fpm56/usr/var/log/php-fpm.log forced from command line (1 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/alt/php-fpm56/usr/var/log/php-fpm.log
log /opt/alt/php-fpm56/usr/var/log/php-fpm.log does not exist -- skipping
In the long/short term I'd like to be able to create logrotate conf files for all files in my domlogs folder that are getting quite large as well as the php-fpm.log files that are also increasing in size... I currently have 4 versions of PHP installed/being used
12
Apache / Re: Logrotate domlogs
« on: February 19, 2019, 11:16:29 PM »
I'd like some assistance with this as well. As a test I have done the following (though NOT for files in the Apache/domlogs folder - trying to get one working first) Testing with PHP-FPM log files:
It appears from the above that the logrotate action DOES execute BUT it throws the initial error, however, looking in the directory there are NO extra/new logs in the folder?
Any thoughts greatly appreciated
- In CWP -> File Management -> Logrotate Manager created a new Conf file - FPM56. Verified that the file was created at /etc/logrotate.d
- Added simple content as follows
/opt/alt/php-fpm56/usr/var/log/php-fpm.log {
weekly
rotate 1
notifempty
missingok
} - From the CWP logrotate interface clicked on the Run Now button for the new entry
- Received an error: lines must begin with a keyword or a filename (possibly
- From shell ran logrotate -df /etc/logrotate.d/FPM56
- Received the following:
- reading config file /etc/logrotate.d/FPM56
error: /etc/logrotate.d/FPM56:1 lines must begin with a keyword or a filename (possibly in double quotes)
Allocating hash table for state file, size 15360 B
Handling 1 logs
rotating pattern: /opt/alt/php-fpm56/usr/var/log/php-fpm.log forced from command line (1 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/alt/php-fpm56/usr/var/log/php-fpm.log
log needs rotating
rotating log /opt/alt/php-fpm56/usr/var/log/php-fpm.log, log->rotateCount is 1
dateext suffix '-20190220'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /opt/alt/php-fpm56/usr/var/log/php-fpm.log.1 to /opt/alt/php-fpm56/usr/var/log/php-fpm.log.2 (rotatecount 1, logstart 1, i 1),
renaming /opt/alt/php-fpm56/usr/var/log/php-fpm.log.0 to /opt/alt/php-fpm56/usr/var/log/php-fpm.log.1 (rotatecount 1, logstart 1, i 0),
renaming /opt/alt/php-fpm56/usr/var/log/php-fpm.log to /opt/alt/php-fpm56/usr/var/log/php-fpm.log.1
removing old log /opt/alt/php-fpm56/usr/var/log/php-fpm.log.2
error: error opening /opt/alt/php-fpm56/usr/var/log/php-fpm.log.2: No such file or directory
It appears from the above that the logrotate action DOES execute BUT it throws the initial error, however, looking in the directory there are NO extra/new logs in the folder?
Any thoughts greatly appreciated
13
CentOS-WebPanel GUI / Re: Access and Error Logs
« on: February 05, 2019, 10:30:21 PM »
Is there any way to ADD to the entries to the Domains drop down box if your domains AREN'T listed there? (they haven't/weren't created using the CWP)
14
CentOS-WebPanel Bugs / Re: Creating CRON jobs in CWP
« on: January 19, 2019, 08:55:49 PM »
Edited the CRON jobs manually in /var/spool/cron and it appears to be keeping the changes
15
CentOS-WebPanel Bugs / Re: Creating CRON jobs in CWP
« on: January 19, 2019, 01:48:51 AM »
I just tried to create a CRON job for a user not listed (but able to be selected) CWP returned the successful message BUT the new CRON and user specified is NOT listed in the crontab for users window
Pages: [1] 2