Page 1 of 1

How to use Syslog?

Posted: 14 Jul 2017, 21:33
by AndrewJ
Hi everyone,
Can someone please point me to a "how to" for setting up and using syslog to receive logs from ESPEasy nodes?
I think it would be useful when de-bugging rules, easier to follow what is happening perhaps than via the web interface log page.
I've a Raspberry Pi 3 running OpenHAB, so my idea would be to set this up to collect the syslog information.
TIA.
AndrewJ

Re: How to use Syslog?

Posted: 15 Jul 2017, 07:46
by grovkillen
Google is your friend.

But for debugging one unit only I connect the unit to a computer and listen to the serial port.

Re: How to use Syslog?

Posted: 16 Jul 2017, 12:57
by JR01
Setup a syslog server, on a RPi or linux server. Then point the esp to that ip, after starting the syslig server.

The syslog will have all the esp events

Configuring a SysLog server on Ubuntu:
https://community.spiceworks.com/how_to ... log-server

sudo nano /etc/rsyslog.conf
Restart: sudo service rsyslog restart
Logs are in:
/var/log directory

---------------
https://syslog-ng.org/

Re: How to use Syslog?

Posted: 16 Jul 2017, 17:47
by AndrewJ
Many thanks for your help, @grovkillen and @JR01!
I now have it working for one of my NodeMCU's which is running ESPEasy, and it will be easy to apply it to other units as I need to. :D
I'll probably disable it again when I've done with my debugging, as I won't want to fill up my Raspi SD card too much!
Regards
Andrew

Re: How to use Syslog?

Posted: 16 Jul 2017, 22:45
by Drum
I have a QNAP NAS which has syslog server. I was never able to get it working properly on my RaspberryPI but really easy on the QNAP.

Re: How to use Syslog?

Posted: 17 Jul 2017, 12:03
by papperone
Drum wrote: 16 Jul 2017, 22:45 I have a QNAP NAS which has syslog server. I was never able to get it working properly on my RaspberryPI but really easy on the QNAP.
Can you share more info on the QNap syslog install & setup?
Thanks!

Re: How to use Syslog?

Posted: 17 Jul 2017, 14:34
by AndrewJ
Hello @Drum,
I've not (yet) tried it on a QNAP NAS, but glad to hear it works well there. (A NAS is on my list of future projects.)
Are you still interested in trying it again on the Raspberry Pi? - if so, I can share how I did mine (a Pi3 running Openhabian) if it helps.
Andrew

Re: How to use Syslog?

Posted: 16 Sep 2017, 22:54
by Drum
@paperone, sorry I missed this one. If you have the current qnap nas firmware, syslog server should be installed already and just needs to be turned on. You need to turn on in espeasy and enter the ip and port for the nas. If you are not able to figure out, let me know and I will try to give more details.

@AndrewJ, At some point I may try to setup syslog on a pi, but I have a linux server I would probably try first. For now it is too easy to just use the qnap nas. If I remember correctly, I pretty much just had to tick a box and it worked. If only windows 10 was so easy....

Re: How to use Syslog?

Posted: 16 Sep 2017, 23:06
by papperone
Drum wrote: 16 Sep 2017, 22:54 @paperone, sorry I missed this one. If you have the current qnap nas firmware, syslog server should be installed already and just needs to be turned on. You need to turn on in espeasy and enter the ip and port for the nas. If you are not able to figure out, let me know and I will try to give more details.
I do have QNAP running with latest firmware, but can't find any reference to syslog server in its control panel, how can be turned on and then how can be utilized from remote PCs?

Re: How to use Syslog?

Posted: 16 Sep 2017, 23:33
by Drum
I just loggged in to check, it is in the control panel, under applications just below sql server. There is a check box to activate. I am not sure what you want to do from a remote pc, all I do is use the syslog viewer on the nas... Third tab on top of the syslog page.

I believe it is possible to get to the files if you need to, but I have not needed to.

Re: How to use Syslog?

Posted: 17 Sep 2017, 09:39
by papperone
Drum wrote: 16 Sep 2017, 23:33 I just loggged in to check, it is in the control panel, under applications just below sql server. There is a check box to activate. I am not sure what you want to do from a remote pc, all I do is use the syslog viewer on the nas... Third tab on top of the syslog page.

I believe it is possible to get to the files if you need to, but I have not needed to.
:( my bad, now I've seen it :) and yes I meant to analyze the output of the syslog and as you said this can be doen from the 3rd tab! thanks!