75 lines
1.4 KiB
Markdown
75 lines
1.4 KiB
Markdown
# Collectd
|
|
|
|
Réalisé sur la machine **epsi_b2_g1_1** port web: 21801
|
|
|
|
## Installation
|
|
|
|
yum install collectd collectd-apache collectd-rrdtool collectd-web
|
|
|
|
systemctl enable --now collectd
|
|
|
|
ls -l /var/lib/collectd/rrdtool/epsi...
|
|
|
|
## Configuration
|
|
|
|
fichier /etc/collectd.conf (sans les commentaires):
|
|
|
|
```
|
|
LoadPlugin syslog
|
|
LoadPlugin cpu
|
|
LoadPlugin interface
|
|
LoadPlugin load
|
|
LoadPlugin memory
|
|
Include "/etc/collectd.d"
|
|
```
|
|
|
|
## Interface web
|
|
|
|
remplacer "require local" par "require all granted" dans /etc/httpd/conf.d/collectd.conf
|
|
|
|
Relancer apache
|
|
|
|
## Monitoring apache
|
|
|
|
### Configurer apache
|
|
|
|
Rajouter le fichier /etc/httpd/conf.d/status.conf
|
|
```
|
|
<Location /status>
|
|
setHandler server-status
|
|
require all granted
|
|
</Location>
|
|
```
|
|
|
|
Relancer apache
|
|
|
|
tester: http://cours.opendoor.fr:21801/status
|
|
|
|
```
|
|
url http://localhost/status?auto
|
|
Total Accesses: 41
|
|
Total kBytes: 35
|
|
CPULoad: .0728643
|
|
Uptime: 398
|
|
ReqPerSec: .103015
|
|
BytesPerSec: 90.0503
|
|
BytesPerReq: 874.146
|
|
BusyWorkers: 1
|
|
IdleWorkers: 74
|
|
...
|
|
```
|
|
|
|
### Configurer collectd:
|
|
```
|
|
#/etc/collectd.d/apache.conf
|
|
LoadPlugin apache
|
|
<Plugin apache>
|
|
<Instance "apache80">
|
|
URL "http://localhost/status?auto"
|
|
</Instance>
|
|
</Plugin>
|
|
```
|
|
|
|
relancer collectd et patienter un peu. Un répertoire "apache-apache80" doit apparaître dans /var/lib/collectd/rrdtool/NOMMACHINE
|
|
|
|
en visitant http://cours.opendoor.fr:21801/collectd/bin/index.cgi on doit pouvoir visualiser les différentes statistiques. |