PRESESE - Unnötiges logging unterbinden

Begonnen von chris1284, 02 Oktober 2014, 20:13:48

Vorheriges Thema - Nächstes Thema

chris1284

Hi,

wäre es nicht sinnvoller Fheler die keine Fehler sind nicht mit zu loggen. Hintergund:
wenn Gerät aus bekommt PRESENSE bei lan-ping natürliche keine Antowort. Der Logeintrag sieht dann so aus:

Zitat2014.10.01 00:11:06 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1
2014.10.02 16:34:22 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:35:22 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:36:23 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:37:23 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:38:23 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:39:23 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:40:23 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:41:24 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:42:24 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:43:25 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:44:25 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:45:25 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:46:25 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:47:25 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:48:25 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:49:26 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:50:26 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:51:26 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:52:26 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:53:26 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:54:26 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:55:27 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
ping: unknown host CHRISTIAN-PC1
2014.10.02 16:56:27 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1""
2014.10.02 19:09:38 2: PRESENCE (Drucker) - error while processing check: Could not execute ping command: "ping -c 4 drucker01"
Das log ist bei entsprechendem Intervall und mehreren Geräten die offline sind ordentlich zugemüllt. muss man das wirklich loggen?
ist ja kein Fehler und ein erfolgreicher ping wird ja schließlich auch nicht geloggt.

Ich würde mich freuen wenn man das Verhalten ändern würde.

Gruß

christian

Tom111

#1
den "Fehler" kann ich nicht nachvollziehen, bei 22 Geräten die ich per PRESENCE über lan-ping abfrage habe ich solch eine Meldung noch nicht erhalten.
Auf welchen Wert steht denn bei dir "global verbose" ?

Beispiel einer meiner Geräte:
define Laptop_LAN PRESENCE lan-ping 192.168.178.7 130
FHEM 5.9 auf Raspberry Pi - 3B+ - Stretch-5.10.88+ | CUL868 CC1101 - USB - Lite module - V3 FW 1.67
Fritz!Box 7490 OS 07.29 / Fritz!Dect200 / Fritz!Powerline 546E
FS20ST-4/ FS20 DI-5/ FS20LS/ FS20 PIRI-2-KU/ FS20 TFK/ FS20S4A/FS20 SU-3/FS20 S20-3
HMS100TF/FHT80TF-2/ASH2200/S300TH/MiLight-Bridge V

chris1284

scheint ja auch kein Fehler zu sein, wir wohl nur als Fehler vom Modul interpretiert denn sowie die Geräte online sind ist alles i.O. da Antwort auf ping. DNS funktioniert problemlos und sonst auch keine Netzwerkprobleme.

global verbose ist 3, Standard halt, wurde nie angefasst

define CHRISTIAN_PC1 PRESENCE lan-ping CHRISTIAN-PC1 320 320
define Drucker PRESENCE lan-ping drucker01 320 320

(vorhin waren es noch 60 Sekunde, daher auch alle Minute eine Errormeldung im Log, jetzt nur alle 5 Minuten um es zu reduzieren)

Rückmeldung von ping auf dem Cubie gegen einen host der offline ist:

Zitat
root@ct01:~# ping -c 4 drucker01
PING drucker01.Speedport_W_724V_Typ_A_05011602_00_001 (192.168.2.30) 56(84) bytes of data.
From ct01 (192.168.2.24) icmp_seq=1 Destination Host Unreachable
From ct01 (192.168.2.24) icmp_seq=2 Destination Host Unreachable
From ct01 (192.168.2.24) icmp_seq=3 Destination Host Unreachable
From ct01 (192.168.2.24) icmp_seq=4 Destination Host Unreachable

--- drucker01.Speedport_W_724V_Typ_A_05011602_00_001 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3013ms
pipe 3

Tom111

Hallo nochmal,

also, wie gesagt, ich bekomme diese Meldung nicht wenn ein Gerät offline ist.

Deiner Meldung zufolge,...
2014.10.02 16:34:22 2: PRESENCE (CHRISTIAN_PC1) - error while processing check: Could not execute ping command: "ping -c 4 CHRISTIAN-PC1"
.... konnte der Ping-Befehl gar nicht erst ausgeführt werden! ???

Da scheint irgendetwas nicht zu stimmen. Ich habe kein Cubieboard, evtl. meldet sich ja mal einer der FHEM auf dem Cubie laufen hat,
um Probleme mit diesem Gerät und PRESENCE auszuschließen.

Gruß
Tom
FHEM 5.9 auf Raspberry Pi - 3B+ - Stretch-5.10.88+ | CUL868 CC1101 - USB - Lite module - V3 FW 1.67
Fritz!Box 7490 OS 07.29 / Fritz!Dect200 / Fritz!Powerline 546E
FS20ST-4/ FS20 DI-5/ FS20LS/ FS20 PIRI-2-KU/ FS20 TFK/ FS20S4A/FS20 SU-3/FS20 S20-3
HMS100TF/FHT80TF-2/ASH2200/S300TH/MiLight-Bridge V

chris1284

doch konnte er.... die Meldung ist halt falsch vom Modul. Siehe Ergebnis ping vom cubi selbst
ZitatFrom ct01 (192.168.2.24) icmp_seq=1 Destination Host Unreachable
und warum sollte der ping nicht gehen wenn die Geräte offline sind und wenn sie online sind geht er.. des weiteren wird ja der online Status richtig angezeigt.

ich habe fast das die case insensitive Prüfung des Ergebnisses von ping im Modul nicht greift. ändere ich im Modul
Zitatunreachable
in
ZitatUnreachable
bleiben die Fehler aus