Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
spbhuvan Absent Member.
Absent Member.
177 views

Flex Connectors: Is there any way to get the hostname of the servers where my logs are stored?

Hello Experts,

The application is in cluster mode and writes logs into server1 if server2 goes down and vice versa. So, I'm using a multi folder file flex connector to read the logs from 2 different servers.  In this case, is there any way we can fetch the hostnames from where the logs are generated from?

Note: The log file does not contain the host IP address from which the logs are generated.

Thanks in advance.

Regards,

Bhuvan

Labels (2)
0 Likes
2 Replies
Highlighted
Rodion Super Contributor.
Super Contributor.

Re: Flex Connectors: Is there any way to get the hostname of the servers where my logs are stored?

I think, here can be used agents[x].extractsource - it can extract servername from full path to file: for example "\\server1\logs\log1.txt"-> "server1" .

0 Likes
Honored Contributor.. yurlov.a Honored Contributor..
Honored Contributor..

Re: Flex Connectors: Is there any way to get the hostname of the servers where my logs are stored?

Hi all.

You may add additional mapping in two different sdkfilereader.properties files too. For example, event.deviceHostName=__stringConstant("server1HN") in server1.sdkfilereader.properties, event.deviceHostName=__stringConstant("server2HN") in server2.sdkfilereader.properties.

Select appropriate sdkfilereader.properties file for every path with logs.

Regards,

Alexander

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.