salt and syslog logging

515 views
Skip to first unread message

Kevin Taylor

unread,
Jun 18, 2014, 10:24:16 AM6/18/14
to salt-...@googlegroups.com
I need to keep my minion logs for some requirements, and I'd like to have them work with my log collection utility. Leaving out the details of what that is, I'll jump past that and say that the software I'm using isn't rotating the log well. Not salt's fault, but it's why I'm looking at the other options available.

One thing I notice with salt 2014-1.3 on CentOS 5, and 2014-1.0 on CentOS6 is that when I send salt-minion a SIGHUP, the process dies. Is that supposed to happen? The goal would be for it to HUP and reload its config, re-create the logfile, other normal things.

Secondly, I tried sending the salt-minion logs to syslog via the file:///dev/log directive in the config file.

On CentOS5, I get some extra characters before the service log message, and I see that this is caused by the older python version on CentOS 5, so I won't worry about that either.

I'd like to send the salt logs to a syslog 'local' facility, so I tried this format in /etc/salt/minion

file:///dev/log/LOG_LOCAL3

However, in my syslog config when I configure:

local3.*                               /var/log/testlog

and restart syslogd, nothing ever gets stored there, and the salt messages remain in /var/log/messages.

On CentOS6 (using rsyslogd), this wasn't a problem. On CentOS 5 I tried installing the rsyslog5 package and trying that, but it did the same thing.

Any of that making sense? Is there something I can do, or am doing wrong to make that work?

Kevin Taylor

unread,
Jun 18, 2014, 10:43:32 AM6/18/14
to salt-...@googlegroups.com

I added -S -S to the startup of syslogd and see that the salt messages show up as 'user.notice' messages. Even though I have the salt-minion configured to log at 'info' level (is that info level for salt, or syslog info level), and it's not sending to local3 like I asked.

This is the CentOS 5 system.



From: grouch...@hotmail.com
To: salt-...@googlegroups.com
Subject: [salt-users] salt and syslog logging
Date: Wed, 18 Jun 2014 10:24:13 -0400
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kevin Taylor

unread,
Jun 18, 2014, 11:39:30 AM6/18/14
to salt-...@googlegroups.com

And if I'm reading this correctly on my CentOS6 test machine, the logs are coming in as kern.emerg.



Subject: RE: [salt-users] salt and syslog logging
Date: Wed, 18 Jun 2014 10:43:30 -0400

Colton Myers

unread,
Jun 20, 2014, 5:31:28 PM6/20/14
to salt-...@googlegroups.com
For the SIGHUP issue, there's already an open issue:  https://github.com/saltstack/salt/issues/570

Salt was not originally designed with config reloads in mind, and we just haven't had the bandwidth to add it.

As far as the rest of the logging issues, let me get Pedro to look at this, since he set up most of our logging system.  Bump this thread if you don't hear from him in the next day or two.

--
Colton Myers

Pedro Algarvio

unread,
Jun 22, 2014, 9:56:42 AM6/22/14
to salt-...@googlegroups.com, grouch...@hotmail.com
I've done exactly as you on an ubuntu system and it worked as supposed.

The local3 messages were stored on the right file, however they also got stored on /var/log/syslog because I did not negate the same rule there(Ithink)...

So, on Salt's end it seems to work as supposed....

I'll see if I can get a Cent5 running and report back.

Cheers,
Pedro Algarvio.

Kevin Taylor

unread,
Jun 30, 2014, 10:46:57 AM6/30/14
to salt-...@googlegroups.com

I've been away for a bit and just saw the messages. Did you have any luck with Cent5?




Date: Sun, 22 Jun 2014 06:56:42 -0700
From: pe...@algarvio.me
To: salt-...@googlegroups.com
CC: grouch...@hotmail.com
Subject: [salt-users] Re: salt and syslog logging
Reply all
Reply to author
Forward
0 new messages