How to use Syslog?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
AndrewJ
Normal user
Posts: 229
Joined: 14 Feb 2017, 12:38

How to use Syslog?

#1 Post by AndrewJ » 14 Jul 2017, 21:33

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

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: How to use Syslog?

#2 Post by grovkillen » 15 Jul 2017, 07:46

Google is your friend.

But for debugging one unit only I connect the unit to a computer and listen to the serial port.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

JR01
Normal user
Posts: 260
Joined: 14 Feb 2016, 21:04
Location: South Africa

Re: How to use Syslog?

#3 Post by JR01 » 16 Jul 2017, 12:57

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/
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.

AndrewJ
Normal user
Posts: 229
Joined: 14 Feb 2017, 12:38

Re: How to use Syslog?

#4 Post by AndrewJ » 16 Jul 2017, 17:47

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

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: How to use Syslog?

#5 Post by Drum » 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.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: How to use Syslog?

#6 Post by papperone » 17 Jul 2017, 12:03

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!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

AndrewJ
Normal user
Posts: 229
Joined: 14 Feb 2017, 12:38

Re: How to use Syslog?

#7 Post by AndrewJ » 17 Jul 2017, 14:34

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

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: How to use Syslog?

#8 Post by Drum » 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.

@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....

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: How to use Syslog?

#9 Post by papperone » 16 Sep 2017, 23:06

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?
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: How to use Syslog?

#10 Post by Drum » 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.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: How to use Syslog?

#11 Post by papperone » 17 Sep 2017, 09:39

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!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 33 guests