Skip to content

Commit

Permalink
Merge pull request #3 from sitewards/ADHOC-improve-readme
Browse files Browse the repository at this point in the history
ADHOC fix (docs): proper shutdown command
  • Loading branch information
toxix authored Oct 23, 2019
2 parents fafb1e7 + 249ad4c commit f6dbaca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defaults/main.yml file
### Parsing log file with the tool

```
php monitor.php --logfile /var/log/php_errors.log --interval 4hours --termination "shutdown"
php monitor.php --logfile /var/log/php_errors.log --interval 4hours --termination "/sbin/shutdown -h now"
```

this will check if machine is running longer than `4 hours` and if last entry in the `/var/log/php_errors.log` file was
Expand All @@ -45,7 +45,7 @@ made at least `4 hours` ago, if both are true - "shutdown" command will be execu

it is also possible to parse log file manually and feed it in the script:
```
grep nginx /var/log/syslog | grep -v "health_check" | tail -1 | php monitor.php --interval 20minutes --termination "shutdown"
grep nginx /var/log/syslog | grep -v "health_check" | tail -1 | php monitor.php --interval 20minutes --termination "/sbin/shutdown -h now"
```

PLEASE NOTE: only the last line of STDIN will be processed in this case, `--logfile` is ignored in this mode.
Expand Down

0 comments on commit f6dbaca

Please sign in to comment.