Monitoring Domoticz

Forum dédié aux questions concernant la configuration de votre serveur sous Linux
hervesz
Messages : 19
Inscription : 14 janv. 2015, 21:19

Monitoring Domoticz

Message par hervesz »

Après de nombreux plantages de Domoticz, je voulais installer le Monitoring. J'ai donc suivi le wiki.

Par contre, en passant à l’étape Finish Up et que je lance le "monit start all", j'ai le message suivant :

monit : action failed -- There is no service by that name

Auriez-vous une idée ?
Quelqu'un a t'il déjà installé le monitoring ?
Raspberry + Domoticz + RFXTrx433
jackslayter
Messages : 1040
Inscription : 30 sept. 2014, 14:40
Localisation : Isère (38)

Re: Monitoring Domoticz

Message par jackslayter »

tu peux checker domoticz sans monit, en passant par un script shell

Code : Tout sélectionner

#!/bin/sh

pgrep domoticz
retval=$?
if [ "$retval" -eq 1 ]
then
service domoticz.sh restart
echo "Subject: Domoticz a ete demarre a" $(date "+%H:%M %d-%m-%Y") > /var/tmp/mes.txt
echo >> /var/tmp/mes.txt
curl --url "smtps://smtp.gmail.com:465" --ssl-reqd  --mail-from "EMETTEUR" --mail-rcpt "DESTINATAIRE"   --upload-file /var/tmp/mes.txt --user "COMPTE:MDP"
fi
un crontab -e qui check toute les 5 minutes
*/5 * * * * sudo /home/pi/domoticz/scripts/check.sh 2>&1 >> /dev/null
Raspberry Pi + RFLink + Domoticz Beta
Oregon - 3x Thgr122Nx / Chacon - micromodule 200w, télécommande 3b et 16b, 2x module 1000w, détecteur de fumée, contact de porte, 2x prise 3500w / OWL - CM180 / TRC02 v2 RGB 3M / Cheap - PIR, contact de porte
hervesz
Messages : 19
Inscription : 14 janv. 2015, 21:19

Re: Monitoring Domoticz

Message par hervesz »

Merci de ta réponse jackslayter !

Je suis un peu novice alors, comment mettre en place ce script ??
Raspberry + Domoticz + RFXTrx433
jackslayter
Messages : 1040
Inscription : 30 sept. 2014, 14:40
Localisation : Isère (38)

Re: Monitoring Domoticz

Message par jackslayter »

Code : Tout sélectionner

cd ~/domoticz/scripts/
sudo nano check.sh
coller le code si dessus (remplir les cases pour l'envoi de mail ou supprimer les lignes 'echo' et 'curl')
faire 'ctrl x' 'o' 'entrée'
sudo chmod 777 check.sh
crontab -e
aller tout en bas
coller  */5 * * * * sudo /home/pi/domoticz/scripts/check.sh 2>&1 >> /dev/null 
faire 'ctrl x' 'o' 'entrée'
Raspberry Pi + RFLink + Domoticz Beta
Oregon - 3x Thgr122Nx / Chacon - micromodule 200w, télécommande 3b et 16b, 2x module 1000w, détecteur de fumée, contact de porte, 2x prise 3500w / OWL - CM180 / TRC02 v2 RGB 3M / Cheap - PIR, contact de porte
hervesz
Messages : 19
Inscription : 14 janv. 2015, 21:19

Re: Monitoring Domoticz

Message par hervesz »

Merci jackslayter !

J'ai maintenant installé le script et par sécurité j'ai changé également ma carte SD

A suivre ...

Merci beaucoup pour ton aide
Raspberry + Domoticz + RFXTrx433
jackslayter
Messages : 1040
Inscription : 30 sept. 2014, 14:40
Localisation : Isère (38)

Re: Monitoring Domoticz

Message par jackslayter »

de rien ;)
Raspberry Pi + RFLink + Domoticz Beta
Oregon - 3x Thgr122Nx / Chacon - micromodule 200w, télécommande 3b et 16b, 2x module 1000w, détecteur de fumée, contact de porte, 2x prise 3500w / OWL - CM180 / TRC02 v2 RGB 3M / Cheap - PIR, contact de porte
hervesz
Messages : 19
Inscription : 14 janv. 2015, 21:19

Re: Monitoring Domoticz

Message par hervesz »

Même problème...

Domoticz Offline, alors que le status de domoticz.sh est démarré. Cela est arrivé 2 fois depuis l'installation du script

Un restart manuel du service permet de refaire fonctionner l'ensemble ...

Il y a-t-il un moyen de contrôler des logs ou autre ?
Raspberry + Domoticz + RFXTrx433
patrice
Messages : 1720
Inscription : 22 sept. 2014, 21:51

Re: Monitoring Domoticz

Message par patrice »

Bonjour
Je suis étonné que tu soit obligé de redémarrer manuellement domoticz puisque le script donné par JackSlayter doit le faire tout seul lorsque il trouve que Domoticz n'est pas lancé
Raspberry pi 3, Dongle RfxCom et Zigate +, plugin de pipiche, Volets Roulants profalux, contrôle d'éclairage, détecteurs de présence, alarme incendie, pilotage livebox ...
Objectif : WAF > 1
jackslayter
Messages : 1040
Inscription : 30 sept. 2014, 14:40
Localisation : Isère (38)

Re: Monitoring Domoticz

Message par jackslayter »

@hervesz c'est pour ça que dans mon script je fais restart et non pas start
Raspberry Pi + RFLink + Domoticz Beta
Oregon - 3x Thgr122Nx / Chacon - micromodule 200w, télécommande 3b et 16b, 2x module 1000w, détecteur de fumée, contact de porte, 2x prise 3500w / OWL - CM180 / TRC02 v2 RGB 3M / Cheap - PIR, contact de porte
mulot35
Messages : 200
Inscription : 20 déc. 2014, 00:27

Re: Monitoring Domoticz

Message par mulot35 »

Merci pour le partage fonctionne nickel
Raspi B+ avec Domoticz ,6 Chacon 2300W , 6 Sondes Oregon, 1 Sonde DIY Oregon ds18b20, Téléinfo sur photovoltaique, script backup ftp & anti offline.
Répondre