Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.
/ logs-checker Public archive

Script for checking server's log-files updates.

License

Notifications You must be signed in to change notification settings

codex-team/logs-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logs checker

PHP-script for checking log-files updates.

How it works

Script checks each log-file size. If file is not empty then script sends a message to you and moves all content to the "archive" for this file.

Install

  1. Clone this rep

  2. Set up config.php

# For each log-file you should add config array
array(
    'domain'       => 'CodeX dev server',
    'logFilePath'  => '/var/log/apache2/error.log',
    'codexBotLink' => 'https://bot3.ifmo.su/notifications/ABCD1234',
),

Get codexBotLink from @codex_bot

  1. Set up autorun

Edit cron

crontab -e

To run script every 5 min add this line

*/5 * * * * php -q /root/logs-checker/script.php

About

Script for checking server's log-files updates.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages