Highlighted
Respected Contributor.
Respected Contributor.
152 views

How To obtain deviceHostName when using SmartConnector for Microsoft DHCP File

I have using one connector on Centos7 and logs from two DHCP servers are joined via CIFS to sepatate folders on connector server.

In agent.properties i have someting like this:

...
agents[0].files[0].filename='/mnt/cifs/dhcpServer1/dhcp/DhcpSrvLog-'EEE'.log'
agents[0].files[1].filename='/mnt/cifs/dhcpServer2/dhcp/DhcpSrvLog-'EEE'.log'
...

For obtaining hostname i has configured following parameters:

...
agents[0].extractfieldnames=deviceHostName
agents[0].extractregex=/mnt/cifs/(\\w+).*?.log
agents[0].extractsource=File Path
...
agents[0].usefieldextractor=true
...

Now i have in deviceHostName dhcpServer1 or dhcpServer2.
Yes. I dont obtaining deviceHostName from any DHCP server log but from the "table parameters" set for this connector.


If you using connector on Win server you can use directly \\FQDN\DHCPLog$\DhcpSrvLog-'EEE'.log in configuration of connector and change agents[0].extractregex for this.

...
agents[0].files[0].filename='\\FQDN\DHCPLog$\DhcpSrvLog-'EEE'.log
...

 

0 Likes
0 Replies
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.