configure logarr

bubbadk

Legendary Member
Original poster
Staff
Local time
2:51 AM
Mar 18, 2018
318
77
Denmark
Hi guys. How is logarr configured. i'm running a hetzner, but the logarr is configured to check sonarr and radarr at c:\programfiles (and thats not linux) :unsure::D
 

Admin9705

Administrator
Project Manager
Local time
8:51 PM
Jan 17, 2018
4,760
1,809
Ya I was wondering to. I'm doing container rewrites and etc. I'll work on logger next. Was going in ABC order but can make the next push. Logger was added just to get it going in case someone wanted to push a fix.
 

LckyLuciano

Junior Member
Local time
7:51 PM
Oct 3, 2018
10
6
I was able to get this going. You have to manually edit the config.php file to add your log locations:

sudo nano /opt/appdata/logarr/www/logarr/assets/config/config.php

Scroll down and set your timezone:
'timezone' => 'UTC',

Then scroll down and set your log locations in the section with the log file examples. Here is my example config:

Code:
// ** Add Logs BELOW this line **

        "Deluge" => '/opt/appdata/deluge/deluged.log',

        "Jackett" => '/opt/appdata/jackett/Jackett/log.txt',

        "LazyLibrarian" => '/opt/appdata/lazylibrarian/log/lazylibrarian.log',

        "PlexMediaServer" => '/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log',

        "PlexMediaScanner" => '/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Logs/Plex Media Scanner.log',

        "Sonarr" => '/opt/appdata/sonarr/logs/sonarr.txt',

        "Radarr" => '/opt/appdata/radarr/logs/radarr.txt',

        "Tautulli" => '/opt/appdata/tautulli/logs/tautulli.log'

// ** Add Logs ABOVE this line **
Make sure you have a comma after each line - except the last one. The page won't load unless you do.

Save the file CTRL+O then ENTER then CTRL+X

Then go to the URL and see if it worked.

One suggestion: By default the container is setup with full R/W access to the /opt/ folder on the server. I changed that volume in Portainer to be read-only to be safe. Seems to work fine.
 
  • Like
Reactions: macfreaker

LckyLuciano

Junior Member
Local time
7:51 PM
Oct 3, 2018
10
6
I had some more fun with this yesterday. I wrote a script that creates some extra log files that I can import into logarr. This avoids me having to change the permissions on syslogs and also creates smaller log samples that work better in logarr anyways. It's really nice to see all my various logs together at one time.

createlogs.sh:
Code:
#!/bin/bash
#Log showing rclone copy status
tail -n 800 /opt/appdata/plexguide/rclone | tee /opt/backup/logs/rclone_log.txt
wait
#Log showing contents of /mnt/move
tree /mnt/move | tee /opt/backup/logs/tree_mnt_move.txt
wait
#Log showing contents of /nzbget/completed
tree /mnt/nzbget/completed | tee /opt/backup/logs/tree_mnt_nzbget.txt
wait
#Log showing recent blocks by the UFW firewall
tail -n 500 /var/log/syslog | egrep --line-buffered 'UFW BLOCK' | tee /opt/backup/logs/syslog_ufw_blocks.txt
wait
#Log showing recent cron jobs
tail -n 500 /var/log/syslog | egrep --line-buffered 'CRON' | tee /opt/backup/logs/syslog_cronjobs.txt
wait
#Log showing tail end of ubuntu authorization log
tail -n 500 /var/log/auth.log | tee /opt/backup/logs/var_log_authlog.txt
wait
#Log showing tail end of fail2ban log
tail -n 500 /var/log/fail2ban.log | tee /opt/backup/logs/var_log_fail2ban.txt
wait
#Set ownership of the new log files to the logarr user
chown -R youruserhere:yourgrouphere /opt/backup/logs/
exit

The script is setup to run every minute via a cron job. It dumps any text output to null sudo crontab -e:
Code:
#Create Log Files for Logarr
* * * * * bash /opt/backup/scripts/createlogs.sh >/dev/null 2>&1

I then added those new log files to logarr config.php file:
Code:
        "rclone Status" => '/opt/backup/logs/rclone_log.txt',

        "Firewall Blocks" => '/opt/backup/logs/syslog_ufw_blocks.txt',

        "System AuthLogs" => '/opt/backup/logs/var_log_authlog.txt',

        "Fail2Ban" => '/opt/backup/logs/var_log_fail2ban.txt',

        "/mnt/move" => '/opt/backup/logs/tree_mnt_move.txt',

        "/mnt/nzbget/completed" => '/opt/backup/logs/tree_mnt_nzbget.txt',

        "Scheduled Cron Jobs" => '/opt/backup/logs/syslog_cronjobs.txt',
 
Last edited:
  • Like
Reactions: tonycfromit

Admin9705

Administrator
Project Manager
Local time
8:51 PM
Jan 17, 2018
4,760
1,809
Hey this is awesome information I haven't had time to play with it yet but this does really help when I get to this portion for 7.5 right up
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads


Maintenance Donations

Recommend NewsGroups

      Up To a 58% Discount!

Trending