Questions tagged [syslog]

Syslog is a standard for logging program messages.

Syslog is a standard for logging program messages.Wikipedia

1162 questions
10
votes
1 answer

Change the app-name sent by docker's syslog driver

I'm using Papertrail to collect my Docker container's logs. Do to that, I used the syslog driver when I created the container: sudo docker run --name my_container --log-driver=syslog ... ... and added the following line to my /etc/rsyslog.conf *.*…
vcarel
  • 1,787
  • 1
  • 16
  • 23
10
votes
2 answers

Python import syslog on windows

I have a python script that is normally run on a unix machine, I am trying to run it on windows. The one snag I have run into is the module syslog. Is there a way that anyone knows that I can get around this on a windows machine, is there an…
Sean Keane
  • 411
  • 1
  • 6
  • 19
10
votes
2 answers

Is there a way to redirect syslog messages to stdout?

I have an application that can run in two modes, either with a CLI, or as a daemon. I am using syslog() for logging. However, when run in CLI mode I'd like all the logging, except those marked LOG_DEBUG, messages to be sent to the console instead of…
Brandon Yates
  • 2,022
  • 3
  • 22
  • 33
10
votes
1 answer

Increase precision of apache log to include milliseconds

I have modified the configuration of rsyslogd to disable RSYSLOG_TraditionalFileFormat. But still the apache log /var/log/apache/error.log is displaying only second-precission. Is there something else that needs to be configured?
blueFast
  • 41,341
  • 63
  • 198
  • 344
10
votes
1 answer

Trying to debug issue with logback syslog appender not updating syslog

I am using logback to update syslog, this is how i configured my appender: localhost LOCAL0
RandomUser
  • 4,140
  • 17
  • 58
  • 94
9
votes
4 answers

How do I set the ident string when using logging.SysLogHandler in Python 2.6?

I have logging configured using logging.fileConfig(). I have a the root logger going to a handler that uses SysLogHandler('/dev/log', handlers.SysLogHandler.LOG_USER) This all works perfectly well, and I see my log entries in /var/log/user.log The…
Trey Stout
  • 6,231
  • 3
  • 24
  • 27
9
votes
1 answer

Getting a UDP socket program in Python to accept messages from a Syslog client?

I'm trying to write a Syslog listener and so far so good on getting it to accept incoming messages through TCP but I also want UDP to function. This is the UDP server code I'm using, which works using a python client app. I also have another app…
Elvar
  • 444
  • 1
  • 4
  • 13
8
votes
2 answers

Making a Perl daemon that runs 24/7 and reads from named pipes

I'm trying to make a log analyser using perl. The analyser would run 24/7 in the background on an AIX server and read from pipes that syslog directs logs to (from the entire network). Basically: logs from network ----> named pipe A --------> |…
user623990
8
votes
1 answer

How to handle log drains in one-off dynos?

We're aggregating our logs to papertrail using heroku's log drains. Everything works great, except, I'm not sure how to set up logging from one-off dynos, which we use to run scripts. I thought the drain configuration would apply to one-off dynos,…
Paul Sanwald
  • 10,899
  • 6
  • 44
  • 59
8
votes
2 answers

Rsyslog to direct log messages to local syslog host on port 5000 using TCP

I have configured the below filter for rsyslog to direct a few SSH messages to a specific TCP port 5000 on the local system, so that the service running on the 5000 will process the SSH messages further. if $fromhost-ip == '127.0.0.1' and ( ($msg…
Nikhil
  • 576
  • 1
  • 11
  • 31
8
votes
1 answer

Why do I get a spurious ']' character in syslog messages with Python's SysLogHandler on OS X?

With Python 3.5 on OS X 10.10.4, I get spurious ] characters in the output syslog messages. This can be seen with the following sample program: #!/usr/bin/env python3 import logging import logging.handlers logger =…
Andrew Ferrier
  • 16,664
  • 13
  • 47
  • 76
8
votes
4 answers

How to mimic "--log-driver=syslog" in Kubernetes

With docker, I can pass log-driver=syslog command line option to forward container logs to syslog. How do I pass these docker arguments via Kubernetes yaml/json descriptor?
Anil G
  • 187
  • 1
  • 3
  • 11
8
votes
1 answer

Ubuntu docker container with upstart and syslog

After searching around, I'm still confused whether you can have a docker container running Ubuntu with a working init system (upstart) and syslog, or not. I know docker containers are meant for running a single process and not a full OS, but my use…
Calin
  • 2,110
  • 1
  • 21
  • 36
8
votes
1 answer

Logback TCP syslog conforming RFC 5424

I'm trying, with logback, to send logging messages in a remote syslog, using TCP, and conforming to RFC 5424. As far as I understand, logback default's syslog appender only handles UDP. So far I've found a logback-syslog4j library on github which…
gturri
  • 13,807
  • 9
  • 40
  • 57
8
votes
2 answers

Logstash replace @timestamp with syslog date

I'm a bit confused. I'm trying to pull out the syslog date (backfilling the logstash) and replace the @timestamp with it. I've tried almost everything. This is my filter filter { if [type] == "syslog" { grok { match => { "message" =>…
user3070418
  • 81
  • 1
  • 2
  • 2