Pour ce tuto : http://mondedie.fr/d/6936
Merci de me rapporter erreurs, suggestions, critiques, ou même félicitations ^^.
Merci de me rapporter erreurs, suggestions, critiques, ou même félicitations ^^.
##journalctl -xn
-- L'unité (unit) monit.service a commencé à démarrer.
juil. 30 17:15:59 pistach3 monit[32527]: Starting daemon monitor: monit/etc/monit/conf.d/system:10: syntax error 'cpu'
juil. 30 17:15:59 pistach3 monit[32527]: failed!
juil. 30 17:15:59 pistach3 systemd[1]: monit.service: control process exited, code=exited status=1
juil. 30 17:15:59 pistach3 systemd[1]: Failed to start LSB: service and resource monitoring daemon.
-- Subject: L'unité (unit) monit.service a échoué
-- Defined-By: systemd
##/etc/monit/conf.d/system
check system $HOST
if loadavg (1min) > 3 then alert
if loadavg (5min) > 2 then alert
if loadavg (15min) > 1 then alert
if memory usage > 80% for 4 cycles then alert
if swap usage > 20% for 4 cycles then alert
if cpu usage (user) > 80% for 2 cycles then alert
if cpu usage (system) > 20% for 2 cycles then alert
if cpu usage (wait) > 80% for 2 cycles then alert
if cpu usage > 200% for 4 cycles then alert
check program CPU0 with path "/etc/monit/script/temp"
group temperature
if status > 75 then alert
A tout les coups elle sert a rien en plus, comme si il manquait des infos [ (user) (system) (wait) ] et le 200% (sans deconné 200% de mon cpu ) How it's possible ! #!/bin/bash
CPU0=$(sensors -u | grep "temp2_input" | awk '{printf "%d",$2}')
exit $CPU0
qui apparement ne me retourne aucune valeur si j'ai bien compris le log :log wrote: [CEST Jul 30 18:05:33] error : 'CPU0' '/etc/monit/script/temp' failed with exit status (158) -- no output
[CEST Jul 30 18:07:35] error : 'CPU0' '/etc/monit/script/temp' failed with exit status (102) -- no output
# sensors -u
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:
temp1_input: 37.000
temp1_max: 85.000
temp1_crit: 105.000
temp1_crit_alarm: 0.000
Core 0:
temp2_input: 33.000
temp2_max: 85.000
temp2_crit: 105.000
temp2_crit_alarm: 0.000
Core 1:
temp3_input: 36.000
temp3_max: 85.000
temp3_crit: 105.000
temp3_crit_alarm: 0.000
Core 2:
temp4_input: 30.000
temp4_max: 85.000
temp4_crit: 105.000
temp4_crit_alarm: 0.000
Core 3:
temp5_input: 33.000
temp5_max: 85.000
temp5_crit: 105.000
temp5_crit_alarm: 0.000
nct6775-isa-0290
Adapter: ISA adapter
Vcore:
in0_input: 0.848
in0_min: 0.000
in0_max: 1.744
in0_alarm: 0.000
in1:
in1_input: 1.104
in1_min: 0.000
in1_max: 0.000
in1_alarm: 1.000
AVCC:
in2_input: 3.376
in2_min: 2.976
in2_max: 3.632
in2_alarm: 0.000
+3.3V:
in3_input: 3.376
in3_min: 2.976
in3_max: 3.632
in3_alarm: 0.000
in4:
in4_input: 1.016
in4_min: 0.000
in4_max: 0.000
in4_alarm: 1.000
in5:
in5_input: 1.040
in5_min: 0.000
in5_max: 0.000
in5_alarm: 1.000
in6:
in6_input: 1.064
in6_min: 0.000
in6_max: 0.000
in6_alarm: 1.000
3VSB:
in7_input: 3.376
in7_min: 2.976
in7_max: 3.632
in7_alarm: 0.000
Vbat:
in8_input: 3.280
in8_min: 2.704
in8_max: 3.632
in8_alarm: 0.000
fan1:
fan1_input: 0.000
fan1_min: 0.000
fan1_alarm: 0.000
fan1_div: 128.000
fan2:
fan2_input: 0.000
fan2_min: 0.000
fan2_alarm: 0.000
fan2_div: 128.000
fan3:
fan3_input: 0.000
fan3_min: 0.000
fan3_alarm: 0.000
fan3_div: 128.000
fan4:
fan4_input: 0.000
fan4_alarm: 0.000
fan4_div: 128.000
SYSTIN:
temp1_input: 34.000
temp1_max: 0.000
temp1_max_hyst: 0.000
temp1_alarm: 1.000
temp1_type: 1.000
temp1_offset: 0.000
CPUTIN:
temp2_input: 31.000
temp2_max: 80.000
temp2_max_hyst: 75.000
temp2_alarm: 0.000
temp2_type: 1.000
temp2_offset: 0.000
AUXTIN:
temp3_input: 119.000
temp3_max: 80.000
temp3_max_hyst: 75.000
temp3_alarm: 0.000
temp3_type: 1.000
temp3_offset: 0.000
PCH_CHIP_TEMP:
temp4_input: 52.000
PECI Agent 1:
temp8_input: 0.000
temp8_max: 80.000
temp8_max_hyst: 75.000
PECI Agent 0:
temp9_input: 37.000
temp9_max: 80.000
temp9_max_hyst: 75.000
cpu0_vid:
cpu0_vid: 0.000
intrusion0:
intrusion0_alarm: 0.000
j'ai bien "temp2_input" ça devrais coller non ?if cpu usage > 200% for 4 cycles then alert
Sur mon debian squeeze ça marche niquel, mais pas sur mon Jessie, surement un changement de version, j'ai mis à jour le tuto.root@xataz-laptop:/home/xataz/Documents/Projects/mfs# sensors -u
acpitz-virtual-0
Adapter: Virtual device
temp1:
temp1_input: 55.000
temp1_crit: 103.000
nouveau-pci-0100
Adapter: PCI adapter
temp1:
ERROR: Can't get value of subfeature temp1_input: Can't read
temp1_max: 95.000
temp1_max_hyst: 3.000
temp1_crit: 105.000
temp1_crit_hyst: 5.000
temp1_emergency: 135.000
temp1_emergency_hyst: 5.000
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:
temp1_input: 57.000
temp1_max: 86.000
temp1_crit: 100.000
temp1_crit_alarm: 0.000
Core 0:
temp2_input: 51.000
temp2_max: 86.000
temp2_crit: 100.000
temp2_crit_alarm: 0.000
Core 1:
temp3_input: 56.000
temp3_max: 86.000
temp3_crit: 100.000
temp3_crit_alarm: 0.000
asus-isa-0000
Adapter: ISA adapter
temp1:
temp1_input: 55.000
Je veux le résultat du Core 1 du CPU, le sensor utilisé est coretemp-isa-0000 dans mon script je fait donc :
#!/bin/bash
CPU1=$(sensors -u coretemp-isa-0000 | grep "temp3_input" | awk '{printf "%d",$2}')
exit $CPU1
wget https://mmonit.com/monit/dist/binary/5.14/monit-5.14-linux-x64.tar.gz
Tu le décompresse :
tar xzvf monit-5.14-linux-x64.tar.gz
Et tu copie le binaire et tu le rends exécutable :
cp monit-5.14/bin/monit /usr/bin/monit && chmod +x /usr/bin/monit
Et la faut le relancer complètement, pas juste un reload.cp monit-5.14/bin/monit /usr/bin/monit
cp: impossible de créer le fichier standard « /usr/bin/monit »: Fichier texte occupé
[EDIT] J'ai rm le /usr/bin/monit qui était deja installer et cp avec le nouveaux tout fonctionne !!Not Found
There is no service by that name
monit 5.6
Je comprends pas, par contre monit status fonctionne :The Monit daemon 5.6 uptime: 8m
System 'glace.mister-s.ovh'
status Running
monitoring status Monitored
load average [0.16] [0.18] [0.09]
cpu 3.7%us 0.2%sy 0.1%wa
memory usage 784368 kB [11.1%]
swap usage 0 kB [0.0%]
data collected Fri, 21 Oct 2016 15:58:31
location /monit {
rewrite ^/monit/(.*) /$1 break;
proxy_ignore_client_abort on;
proxy_pass https://127.0.0.1:2812;
proxy_set_header Host $host;
}
Je regarde ça dans le week end
y 'a t'il des personnes qui utilise M/monit parmis les gens du forum, a part xataz?
C'est pour savoir si on pouvait compléter le tutoriel avec une partie dédié à M/monit ?
Oui ça doit pouvoir ce faire, je mets ça dans ma todo list.