Logwatch - Environment Variables
-
Hi,
Just wondering, do/shoulod environment variables work in a Logwatch parser definition?
I tried using %PROGRAMDATA% and the result was that the NetXMS Agent service would not start anymore. The moment I replaced that with C:\ProgramData everything just worked. As different Windows versions use different paths, using an environment variable would be preferable to creating a number of parsers (one for each possible file location)?Cheers
-
Hi,
you can use time formats, environment variables, and shell commands for file name expansion in parsers. To insert environment variable, use macro ${name}. To insert result of shell command use form `command`. Time formats are the same as supported by strftime (http://www.cplusplus.com/reference/ctime/strftime/).
Best regards,
Victor
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login