Improved documentation.

This commit is contained in:
Christian P. MOMON 2024-08-19 00:54:25 +02:00
parent 3740992dd1
commit 93284171d9

View file

@ -90,16 +90,60 @@ Usage:
statoolinfos list errlog <logfilesorconfigfile> display http error log lines
```
### htmlize removed
### Simple configuration file
Example of `libre-service.eu.conf`:
```
# [Configuration] conf + organization + services + machines + metrics
conf.class=federation
conf.protocol=StatoolInfos-0.6.0
conf.crawl.input=https://www.libre-service.eu/.well-known/statoolinfos/libre-service.eu.properties
conf.crawl.cache=/srv/statoolinfos/cache/
```
The field `input` gives the federation properties URL file. Reminder, the StatoolInfos Protocol requires that the federation properties file is exposed on the Web.
The field `cache` gives local directory used as data cache.
## Crawl
Example of cron configuration:
```
55 * * * * root /srv/statoolinfos/bin/statoolinfos crawl /srv/statoolinfos/conf/libre-service.eu.conf >> /srv/statoolinfos/statoolinfos-cron.log
```
## Uptime
This command is very useful to collect the uptime of services. It's just to share which services are down and since how many time. It is not a monitoring feature because an one hour check is enough for this. Actually, only website are checked.
Example of cron configuration:
```
4 * * * * root /srv/statoolinfos/bin/statoolinfos uptime /srv/statoolinfos/conf/libre-service.eu.conf >> /srv/statoolinfos/statoolinfos-cron.log
```
One check per hour is a good idea. In the uptime page, the mouse over a yellow status icon show the list of the check results.
## Htmlize removed
The htmlize command is removed since 2024-07.
As a reminder, the htmlize command generated absolutely all the pages needed for a static site.
As a reminder, the htmlize command generated absolutely all the pages needed for a static website.
As the number of pages generated became too large (> 10000 with 100 organizations), the decision was made to separate the html valuation into a separate project, StatoolInfosWeb.
A dynamic web site allows to generate page only when it is necessary.
## Generate metrics files
## Probe (Generate metrics files)
### Basics
@ -291,6 +335,7 @@ conf.prob.httperrorlog.datetimepattern=
Warning: to have month metric values, you have to set **retention log to 7 weeks or 50 days** in Nginx or Apache logrotate configuration.
For Nginx, éditer le fichier `/etc/logrotate.d/nginx` :
```
/var/log/nginx/*.log {
weekly
@ -299,9 +344,23 @@ For Nginx, éditer le fichier `/etc/logrotate.d/nginx` :
```
For Apache, éditer le fichier `/etc/logrotate.d/apache2` :
```
/var/log/apache2/*.log {
weekly
missingok
rotate 7
```
### Cron all task
A situation you will encounter is the need to do several tasks from the same machine. In this case, avoid multiple cron in the same time. Put all in Bash script and call it with only one cron.
Example:
```
4 0,12,23 * * * root /srv/statoolinfos/bin/refresh >> /srv/statoolinfos/statoolinfos-cron.log
4 1-11,13-22 * * * root /srv/statoolinfos/bin/statoolinfos uptime /srv/statoolinfos/conf/libre-service.eu.conf >> /srv/statoolinfos/statoolinfos-cron.log
```