<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
There is a ${FILE_NAME} macro:<br>
<a href="https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.36/administration-guide/75#macro-filename">https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.36/administration-guide/75#macro-filename</a><br>
<br>
Or you could add a tag() to the source statement with a string literal, so only messages from that source will have that string.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Gabor</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> syslog-ng <syslog-ng-bounces@lists.balabit.hu> on behalf of Fabien Wernli <wernli@in2p3.fr><br>
<b>Sent:</b> Friday, March 25, 2022 8:49<br>
<b>To:</b> Faine, Mark R. (MSFC-IS40)[NICS] <mark.faine@nasa.gov><br>
<b>Cc:</b> Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu><br>
<b>Subject:</b> Re: [syslog-ng] [EXTERNAL] Re: Help with embedded log paths</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">CAUTION: This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.<br>
<br>
<br>
Hi Mark,<br>
<br>
Good to hear the if/else model suits you!<br>
<br>
On Thu, Mar 24, 2022 at 07:36:58PM +0000, Faine, Mark R. (MSFC-IS40)[NICS] wrote:<br>
> I need some sort of unique identifier that I can put on the file name in a destination that is static and not tied to the message or anything else that changes. It should be created when the file is created and not changed.<br>
><br>
> I've looked over the macros but I don't see anything, does something like this exist?<br>
<br>
All the macros are tied to each and every message, and that's by design:<br>
routing is done per message. If you want something tied to a destination,<br>
all I can suggest is to set it as close as possible to that destination.<br>
For instance, you can set it *in* the destination as follows:<br>
<br>
destination d_foo {<br>
channel {<br>
rewrite {<br>
set("my_static_vaule", value("MY_STATIC_MACRO")};<br>
};<br>
destination {<br>
file("/path/to/dest" ...};<br>
};<br>
};<br>
};<br>
<br>
______________________________________________________________________________<br>
Member info: <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.balabit.hu%2Fmailman%2Flistinfo%2Fsyslog-ng&data=04%7C01%7Cgabor.nagy%40oneidentity.com%7C281263658a24442eda3f08da0e3400b7%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637837913805954664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=JwlArTRL1rTCbUHyADaEBOYtBhKkcJ1fQh%2FcU9qyANg%3D&reserved=0">
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.balabit.hu%2Fmailman%2Flistinfo%2Fsyslog-ng&data=04%7C01%7Cgabor.nagy%40oneidentity.com%7C281263658a24442eda3f08da0e3400b7%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637837913805954664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=JwlArTRL1rTCbUHyADaEBOYtBhKkcJ1fQh%2FcU9qyANg%3D&reserved=0</a><br>
Documentation: <a href="https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fsupport%2Fdocumentation%2F%3Fproduct%3Dsyslog-ng&data=04%7C01%7Cgabor.nagy%40oneidentity.com%7C281263658a24442eda3f08da0e3400b7%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637837913805954664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4lHfSUwrKwRGMGgQLWxNRNphYddMPfJrusHuZZ5BHME%3D&reserved=0">
https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fsupport%2Fdocumentation%2F%3Fproduct%3Dsyslog-ng&data=04%7C01%7Cgabor.nagy%40oneidentity.com%7C281263658a24442eda3f08da0e3400b7%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637837913805954664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4lHfSUwrKwRGMGgQLWxNRNphYddMPfJrusHuZZ5BHME%3D&reserved=0</a><br>
FAQ: <a href="https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fwiki%2Fsyslog-ng-faq&data=04%7C01%7Cgabor.nagy%40oneidentity.com%7C281263658a24442eda3f08da0e3400b7%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637837913805954664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=s94ztS49SqoXTnM4MhPFaThvHSGFJQu94yOx8DkMwW4%3D&reserved=0">
https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fwiki%2Fsyslog-ng-faq&data=04%7C01%7Cgabor.nagy%40oneidentity.com%7C281263658a24442eda3f08da0e3400b7%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637837913805954664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=s94ztS49SqoXTnM4MhPFaThvHSGFJQu94yOx8DkMwW4%3D&reserved=0</a><br>
<br>
</div>
</span></font></div>
</body>
</html>