syslog-ng.conf listen for remote serversRemote logging for multiple Apache virtual hosts using syslog-ngOpen Source syslog-ng RPM for SLESFilter out a facility in syslog-ngForwarding from rsyslog to syslog-ng over TCP not working (although packets are reaching server)Sending certain logs to a remote syslog-ng serverHow do I filter on tags in syslog-ng when they don't seem to be available by the time it processes it?Why does syslog-ng drop debug messages when logging remote?syslog-ng working as foreground process but not as daemonsyslog-ng doesn't parse messagesFreeradius not redirecting logs to syslog-ng
Why did C use the -> operator instead of reusing the . operator?
Why does nature favour the Laplacian?
Can I criticise the more senior developers around me for not writing clean code?
Was there a Viking Exchange as well as a Columbian one?
Providing evidence of Consent of Parents for Marriage by minor in England in early 1800s?
Philosophical question on logistic regression: why isn't the optimal threshold value trained?
How to not starve gigantic beasts
How to have a sharp product image?
If a planet has 3 moons, is it possible to have triple Full/New Moons at once?
How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?
Why does Mind Blank stop the Feeblemind spell?
A Paper Record is What I Hamper
What term is being referred to with "reflected-sound-of-underground-spirits"?
Rivers without rain
How does Captain America channel this power?
How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?
Should the Death Curse affect an undead PC in the Tomb of Annihilation adventure?
How exactly does Hawking radiation decrease the mass of black holes?
Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?
Can an Area of Effect spell cast outside a Prismatic Wall extend inside it?
How do I reattach a shelf to the wall when it ripped out of the wall?
Is the claim "Employers won't employ people with no 'social media presence'" realistic?
Function pointer with named arguments?
What's the name of these pliers?
syslog-ng.conf listen for remote servers
Remote logging for multiple Apache virtual hosts using syslog-ngOpen Source syslog-ng RPM for SLESFilter out a facility in syslog-ngForwarding from rsyslog to syslog-ng over TCP not working (although packets are reaching server)Sending certain logs to a remote syslog-ng serverHow do I filter on tags in syslog-ng when they don't seem to be available by the time it processes it?Why does syslog-ng drop debug messages when logging remote?syslog-ng working as foreground process but not as daemonsyslog-ng doesn't parse messagesFreeradius not redirecting logs to syslog-ng
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm configuring /etc/syslog-ng/syslog-ng.conf on version 3.5.6-2 to listen to remote hosts on port 514 by changing the configuration like
#source s_src
# system();
# internal();
#;
# If you wish to get logs from remote machine you should uncomment
# this and comment the above source line.
source s_net tcp(ip(127.0.0.1) port(514)); udp(); ;
but when I comment out s_src, as I think it suggests like:
#source s_src
# system();
# internal();
#;
syslog-ng won't start due to config errors. If I just comment out these:
source s_src
# system();
# internal();
;
it starts, but won't log standard syslog messages from localhost. Is there some other directive I need to add in source s_src
to get it to listen on port 514 for remote hosts?
(Other possibly relevant lines in config)
log source(s_src); filter(f_syslog3); destination(d_syslog); ;
filter f_syslog3 not facility(auth, authpriv, mail) and not filter(f_debug); ;
destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
syslog-ng
add a comment |
I'm configuring /etc/syslog-ng/syslog-ng.conf on version 3.5.6-2 to listen to remote hosts on port 514 by changing the configuration like
#source s_src
# system();
# internal();
#;
# If you wish to get logs from remote machine you should uncomment
# this and comment the above source line.
source s_net tcp(ip(127.0.0.1) port(514)); udp(); ;
but when I comment out s_src, as I think it suggests like:
#source s_src
# system();
# internal();
#;
syslog-ng won't start due to config errors. If I just comment out these:
source s_src
# system();
# internal();
;
it starts, but won't log standard syslog messages from localhost. Is there some other directive I need to add in source s_src
to get it to listen on port 514 for remote hosts?
(Other possibly relevant lines in config)
log source(s_src); filter(f_syslog3); destination(d_syslog); ;
filter f_syslog3 not facility(auth, authpriv, mail) and not filter(f_debug); ;
destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
syslog-ng
add a comment |
I'm configuring /etc/syslog-ng/syslog-ng.conf on version 3.5.6-2 to listen to remote hosts on port 514 by changing the configuration like
#source s_src
# system();
# internal();
#;
# If you wish to get logs from remote machine you should uncomment
# this and comment the above source line.
source s_net tcp(ip(127.0.0.1) port(514)); udp(); ;
but when I comment out s_src, as I think it suggests like:
#source s_src
# system();
# internal();
#;
syslog-ng won't start due to config errors. If I just comment out these:
source s_src
# system();
# internal();
;
it starts, but won't log standard syslog messages from localhost. Is there some other directive I need to add in source s_src
to get it to listen on port 514 for remote hosts?
(Other possibly relevant lines in config)
log source(s_src); filter(f_syslog3); destination(d_syslog); ;
filter f_syslog3 not facility(auth, authpriv, mail) and not filter(f_debug); ;
destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
syslog-ng
I'm configuring /etc/syslog-ng/syslog-ng.conf on version 3.5.6-2 to listen to remote hosts on port 514 by changing the configuration like
#source s_src
# system();
# internal();
#;
# If you wish to get logs from remote machine you should uncomment
# this and comment the above source line.
source s_net tcp(ip(127.0.0.1) port(514)); udp(); ;
but when I comment out s_src, as I think it suggests like:
#source s_src
# system();
# internal();
#;
syslog-ng won't start due to config errors. If I just comment out these:
source s_src
# system();
# internal();
;
it starts, but won't log standard syslog messages from localhost. Is there some other directive I need to add in source s_src
to get it to listen on port 514 for remote hosts?
(Other possibly relevant lines in config)
log source(s_src); filter(f_syslog3); destination(d_syslog); ;
filter f_syslog3 not facility(auth, authpriv, mail) and not filter(f_debug); ;
destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
syslog-ng
syslog-ng
edited Mar 25 at 19:04
batflaps
asked Mar 22 at 18:59
batflapsbatflaps
3918
3918
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Sources/destinations/etc. are object-like constructs in syslog-ng.
If you want to receive remote messages, you just have to create a source object that uses the tcp(), udp() plugins, exactly the way you did it:
source s_net tcp(ip(127.0.0.1) port(514)); udp(); ;
s_net
is the name of the source. s_net
won't work unless you add it to a log path. "Adding it to a log path" means that you link a source to other objects, for example, destinations; so a message coming from the source will go through the pipeline you created in a log path.
You can link a source to a destination using the log
block, for example:
destination d_syslog file("/var/log/$HOST/syslog"); ;
log
source(s_net);
destination(d_syslog);
;
s_src
is used somewhere in your config in a log
path, that's the reason why you can't comment it out. If you want to receive both remote and local messages, just do not comment out s_src
. Another example:
log
source(s_src);
source(s_net);
destination(d_syslog);
;
The instruction in your config is misleading.
Please note that syslog-ng v3.5 is pretty old. Consider upgrading to the current version, which is v3.20.
Okay, that helps, will look into it. Other relevant lines:log source(s_src); filter(f_syslog3); destination(d_syslog); ;
anddestination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
. The comments in the OP are the defaults in the config file. The version is the latest for Debian Jessie from repositories, though I may be able to upgrade distro to Stretch if needed.
– batflaps
Mar 25 at 18:58
add a comment |
Okay, in my version of syslog-ng 3.5.6-2 (from standard Debian Jessie vanilla package), you have to do a couple things. First, leave this uncommented:
source s_src
system();
internal();
;
Then change the s_net line to read:
source s_net tcp(ip(0.0.0.0) port(514) max-connections (5000)); udp(); ;
Now you have to modify a line to put remote host syslog logs in a certain place delineated by hostname so you can figure out which host syslog is which like:
destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
Or if you want them all in the same file to analyze a single file just do:
destination d_syslog file("/var/log/remotelogs/syslog"); ;
Then put it all together like:
#log source(s_src); filter(f_syslog3); destination(d_syslog); ;
log source(s_net); filter(f_syslog3); destination(d_syslog); ;
Note the log entry for syslog now referenced S_NET as a source, rather than S_SRC. Now you can restart syslog-ng and see if it's listening like:
/etc/init.d/syslog-ng restart
netstat -plunt | grep syslog-ng
tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 26853/syslog-ng
udp 0 0 0.0.0.0:514 0.0.0.0:* 26853/syslog-n
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f959554%2fsyslog-ng-conf-listen-for-remote-servers%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sources/destinations/etc. are object-like constructs in syslog-ng.
If you want to receive remote messages, you just have to create a source object that uses the tcp(), udp() plugins, exactly the way you did it:
source s_net tcp(ip(127.0.0.1) port(514)); udp(); ;
s_net
is the name of the source. s_net
won't work unless you add it to a log path. "Adding it to a log path" means that you link a source to other objects, for example, destinations; so a message coming from the source will go through the pipeline you created in a log path.
You can link a source to a destination using the log
block, for example:
destination d_syslog file("/var/log/$HOST/syslog"); ;
log
source(s_net);
destination(d_syslog);
;
s_src
is used somewhere in your config in a log
path, that's the reason why you can't comment it out. If you want to receive both remote and local messages, just do not comment out s_src
. Another example:
log
source(s_src);
source(s_net);
destination(d_syslog);
;
The instruction in your config is misleading.
Please note that syslog-ng v3.5 is pretty old. Consider upgrading to the current version, which is v3.20.
Okay, that helps, will look into it. Other relevant lines:log source(s_src); filter(f_syslog3); destination(d_syslog); ;
anddestination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
. The comments in the OP are the defaults in the config file. The version is the latest for Debian Jessie from repositories, though I may be able to upgrade distro to Stretch if needed.
– batflaps
Mar 25 at 18:58
add a comment |
Sources/destinations/etc. are object-like constructs in syslog-ng.
If you want to receive remote messages, you just have to create a source object that uses the tcp(), udp() plugins, exactly the way you did it:
source s_net tcp(ip(127.0.0.1) port(514)); udp(); ;
s_net
is the name of the source. s_net
won't work unless you add it to a log path. "Adding it to a log path" means that you link a source to other objects, for example, destinations; so a message coming from the source will go through the pipeline you created in a log path.
You can link a source to a destination using the log
block, for example:
destination d_syslog file("/var/log/$HOST/syslog"); ;
log
source(s_net);
destination(d_syslog);
;
s_src
is used somewhere in your config in a log
path, that's the reason why you can't comment it out. If you want to receive both remote and local messages, just do not comment out s_src
. Another example:
log
source(s_src);
source(s_net);
destination(d_syslog);
;
The instruction in your config is misleading.
Please note that syslog-ng v3.5 is pretty old. Consider upgrading to the current version, which is v3.20.
Okay, that helps, will look into it. Other relevant lines:log source(s_src); filter(f_syslog3); destination(d_syslog); ;
anddestination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
. The comments in the OP are the defaults in the config file. The version is the latest for Debian Jessie from repositories, though I may be able to upgrade distro to Stretch if needed.
– batflaps
Mar 25 at 18:58
add a comment |
Sources/destinations/etc. are object-like constructs in syslog-ng.
If you want to receive remote messages, you just have to create a source object that uses the tcp(), udp() plugins, exactly the way you did it:
source s_net tcp(ip(127.0.0.1) port(514)); udp(); ;
s_net
is the name of the source. s_net
won't work unless you add it to a log path. "Adding it to a log path" means that you link a source to other objects, for example, destinations; so a message coming from the source will go through the pipeline you created in a log path.
You can link a source to a destination using the log
block, for example:
destination d_syslog file("/var/log/$HOST/syslog"); ;
log
source(s_net);
destination(d_syslog);
;
s_src
is used somewhere in your config in a log
path, that's the reason why you can't comment it out. If you want to receive both remote and local messages, just do not comment out s_src
. Another example:
log
source(s_src);
source(s_net);
destination(d_syslog);
;
The instruction in your config is misleading.
Please note that syslog-ng v3.5 is pretty old. Consider upgrading to the current version, which is v3.20.
Sources/destinations/etc. are object-like constructs in syslog-ng.
If you want to receive remote messages, you just have to create a source object that uses the tcp(), udp() plugins, exactly the way you did it:
source s_net tcp(ip(127.0.0.1) port(514)); udp(); ;
s_net
is the name of the source. s_net
won't work unless you add it to a log path. "Adding it to a log path" means that you link a source to other objects, for example, destinations; so a message coming from the source will go through the pipeline you created in a log path.
You can link a source to a destination using the log
block, for example:
destination d_syslog file("/var/log/$HOST/syslog"); ;
log
source(s_net);
destination(d_syslog);
;
s_src
is used somewhere in your config in a log
path, that's the reason why you can't comment it out. If you want to receive both remote and local messages, just do not comment out s_src
. Another example:
log
source(s_src);
source(s_net);
destination(d_syslog);
;
The instruction in your config is misleading.
Please note that syslog-ng v3.5 is pretty old. Consider upgrading to the current version, which is v3.20.
edited Mar 25 at 22:09
answered Mar 22 at 19:35
MrAnnoMrAnno
12
12
Okay, that helps, will look into it. Other relevant lines:log source(s_src); filter(f_syslog3); destination(d_syslog); ;
anddestination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
. The comments in the OP are the defaults in the config file. The version is the latest for Debian Jessie from repositories, though I may be able to upgrade distro to Stretch if needed.
– batflaps
Mar 25 at 18:58
add a comment |
Okay, that helps, will look into it. Other relevant lines:log source(s_src); filter(f_syslog3); destination(d_syslog); ;
anddestination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
. The comments in the OP are the defaults in the config file. The version is the latest for Debian Jessie from repositories, though I may be able to upgrade distro to Stretch if needed.
– batflaps
Mar 25 at 18:58
Okay, that helps, will look into it. Other relevant lines:
log source(s_src); filter(f_syslog3); destination(d_syslog); ;
and destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
. The comments in the OP are the defaults in the config file. The version is the latest for Debian Jessie from repositories, though I may be able to upgrade distro to Stretch if needed.– batflaps
Mar 25 at 18:58
Okay, that helps, will look into it. Other relevant lines:
log source(s_src); filter(f_syslog3); destination(d_syslog); ;
and destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
. The comments in the OP are the defaults in the config file. The version is the latest for Debian Jessie from repositories, though I may be able to upgrade distro to Stretch if needed.– batflaps
Mar 25 at 18:58
add a comment |
Okay, in my version of syslog-ng 3.5.6-2 (from standard Debian Jessie vanilla package), you have to do a couple things. First, leave this uncommented:
source s_src
system();
internal();
;
Then change the s_net line to read:
source s_net tcp(ip(0.0.0.0) port(514) max-connections (5000)); udp(); ;
Now you have to modify a line to put remote host syslog logs in a certain place delineated by hostname so you can figure out which host syslog is which like:
destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
Or if you want them all in the same file to analyze a single file just do:
destination d_syslog file("/var/log/remotelogs/syslog"); ;
Then put it all together like:
#log source(s_src); filter(f_syslog3); destination(d_syslog); ;
log source(s_net); filter(f_syslog3); destination(d_syslog); ;
Note the log entry for syslog now referenced S_NET as a source, rather than S_SRC. Now you can restart syslog-ng and see if it's listening like:
/etc/init.d/syslog-ng restart
netstat -plunt | grep syslog-ng
tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 26853/syslog-ng
udp 0 0 0.0.0.0:514 0.0.0.0:* 26853/syslog-n
add a comment |
Okay, in my version of syslog-ng 3.5.6-2 (from standard Debian Jessie vanilla package), you have to do a couple things. First, leave this uncommented:
source s_src
system();
internal();
;
Then change the s_net line to read:
source s_net tcp(ip(0.0.0.0) port(514) max-connections (5000)); udp(); ;
Now you have to modify a line to put remote host syslog logs in a certain place delineated by hostname so you can figure out which host syslog is which like:
destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
Or if you want them all in the same file to analyze a single file just do:
destination d_syslog file("/var/log/remotelogs/syslog"); ;
Then put it all together like:
#log source(s_src); filter(f_syslog3); destination(d_syslog); ;
log source(s_net); filter(f_syslog3); destination(d_syslog); ;
Note the log entry for syslog now referenced S_NET as a source, rather than S_SRC. Now you can restart syslog-ng and see if it's listening like:
/etc/init.d/syslog-ng restart
netstat -plunt | grep syslog-ng
tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 26853/syslog-ng
udp 0 0 0.0.0.0:514 0.0.0.0:* 26853/syslog-n
add a comment |
Okay, in my version of syslog-ng 3.5.6-2 (from standard Debian Jessie vanilla package), you have to do a couple things. First, leave this uncommented:
source s_src
system();
internal();
;
Then change the s_net line to read:
source s_net tcp(ip(0.0.0.0) port(514) max-connections (5000)); udp(); ;
Now you have to modify a line to put remote host syslog logs in a certain place delineated by hostname so you can figure out which host syslog is which like:
destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
Or if you want them all in the same file to analyze a single file just do:
destination d_syslog file("/var/log/remotelogs/syslog"); ;
Then put it all together like:
#log source(s_src); filter(f_syslog3); destination(d_syslog); ;
log source(s_net); filter(f_syslog3); destination(d_syslog); ;
Note the log entry for syslog now referenced S_NET as a source, rather than S_SRC. Now you can restart syslog-ng and see if it's listening like:
/etc/init.d/syslog-ng restart
netstat -plunt | grep syslog-ng
tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 26853/syslog-ng
udp 0 0 0.0.0.0:514 0.0.0.0:* 26853/syslog-n
Okay, in my version of syslog-ng 3.5.6-2 (from standard Debian Jessie vanilla package), you have to do a couple things. First, leave this uncommented:
source s_src
system();
internal();
;
Then change the s_net line to read:
source s_net tcp(ip(0.0.0.0) port(514) max-connections (5000)); udp(); ;
Now you have to modify a line to put remote host syslog logs in a certain place delineated by hostname so you can figure out which host syslog is which like:
destination d_syslog file("/var/log/remotelogs/$HOST/syslog"); ;
Or if you want them all in the same file to analyze a single file just do:
destination d_syslog file("/var/log/remotelogs/syslog"); ;
Then put it all together like:
#log source(s_src); filter(f_syslog3); destination(d_syslog); ;
log source(s_net); filter(f_syslog3); destination(d_syslog); ;
Note the log entry for syslog now referenced S_NET as a source, rather than S_SRC. Now you can restart syslog-ng and see if it's listening like:
/etc/init.d/syslog-ng restart
netstat -plunt | grep syslog-ng
tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 26853/syslog-ng
udp 0 0 0.0.0.0:514 0.0.0.0:* 26853/syslog-n
answered Apr 19 at 17:16
batflapsbatflaps
3918
3918
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f959554%2fsyslog-ng-conf-listen-for-remote-servers%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown