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
Super Contributor.. Per Bejder Super Contributor..
Super Contributor..
153 views

Extracting hostname from FQDN ihn logger search

Jump to solution

Hello guys 

In logger how do I create an report that 

1. extract the host name from deviceHostName, (Host name can be the hostname or FQDN) I only wants the hostname. eg. serverA < Like, serverA.mycomp.com < No like :-)  
2, Then use a lookup file to enrich the output data (The lookup file contains the hostname) 

Anyone tried that? 

Best regards

Per

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Knowledge Partner
Knowledge Partner

Re: Extracting hostname from FQDN ihn logger search

Jump to solution


It's not possible to use a lookup file when creating a report via a query. If your logger version 6.5 or above, you can create a saved search with lookup file and then use the saved search in the report query. There is an option for selecting the Connection for the query which is MySQLReportDB by default. you can change it to LoggerSearchQuery and use the saved search you created.

You can use the following search query to get only hostname part of destinationHostName:

<your search conditions here>  |rex field=destinationHostName "(?<hostname>\w+)\.?.*" | lookup lookupfile lookupfilefield as hostname

 

 

------------------------------------
Please use the Like button below, if you find this post useful or mark it as an accepted solution if it resolves your issue.
0 Likes
1 Reply
Highlighted
Knowledge Partner
Knowledge Partner

Re: Extracting hostname from FQDN ihn logger search

Jump to solution


It's not possible to use a lookup file when creating a report via a query. If your logger version 6.5 or above, you can create a saved search with lookup file and then use the saved search in the report query. There is an option for selecting the Connection for the query which is MySQLReportDB by default. you can change it to LoggerSearchQuery and use the saved search you created.

You can use the following search query to get only hostname part of destinationHostName:

<your search conditions here>  |rex field=destinationHostName "(?<hostname>\w+)\.?.*" | lookup lookupfile lookupfilefield as hostname

 

 

------------------------------------
Please use the Like button below, if you find this post useful or mark it as an accepted solution if it resolves your issue.
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.