Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Logging #68

Closed
max-b opened this issue Sep 14, 2015 · 3 comments
Closed

Remote Logging #68

max-b opened this issue Sep 14, 2015 · 3 comments

Comments

@max-b
Copy link
Member

max-b commented Sep 14, 2015

We need to get remote logging setup for 0.2 if we want to have useful feedback about the launch. I'll add it to the monitoring server. I believe that we'll want hostnames monitor.sudomesh.org instead of ip addresses, but I believe I have access to sudomesh dns so I can set that up for now.

@max-b
Copy link
Member Author

max-b commented Sep 14, 2015

This (or some variant) should work ok on nodes:

config system
       option hostname my.node
       option timezone PST8PDT,M3.2.0,M11.1.0
       option log_ip 100.64.0.10
       option log_size 500
       option log_file /var/log/messages
       option log_proto udp
       option log_port 514
       option log_prefix jake-tmphearth-tplink-wdr3500

For the monitoring server, I added the following file /etc/rsyslog.d/10-peoplesopen.conf with the following:

#This one is the template to generate the log filename dynamically, depending on the client's IP address.
$template RemoteHost,"/var/log/remote-ips/%fromhost-ip%-syslog.log"

$RuleSet remote
*.* ?RemoteHost

# provides UDP syslog reception
$ModLoad imudp
$InputUDPServerBindRuleset remote
$UDPServerRun 514

$RuleSet RSYSLOG_DefaultRuleset

Which will generate a new file for each ip that is remote logging.

Also need to remember to add a rule for rotating in /etc/logrotate.d/rsyslog:

/var/log/remote-ips/*.log
{
        size 2G
        rotate 36500
        daily
        missingok
        notifempty
        delaycompress
        compress
        postrotate
                reload rsyslog >/dev/null 2>&1 || true
        endscript
}

@max-b
Copy link
Member Author

max-b commented Sep 14, 2015

I'd like to incorporate this into #69 when I get to it.

@max-b
Copy link
Member Author

max-b commented Nov 20, 2015

The home nodes now have the appropriate /etc/config/system stanzas:
https://github.com/sudomesh/makenode/blob/master/configs/templates/files/etc/config/system

The server monitoring ops work can/should get pushed to a later milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant