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.files.filename='/mnt/cifs/dhcpServer1/dhcp/DhcpSrvLog-'EEE'.log' agents.files.filename='/mnt/cifs/dhcpServer2/dhcp/DhcpSrvLog-'EEE'.log' ...
For obtaining hostname i has configured following parameters:
... agents.extractfieldnames=deviceHostName agents.extractregex=/mnt/cifs/(\\w+).*?.log agents.extractsource=File Path ... agents.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.extractregex for this.
... agents.files.filename='\\FQDN\DHCPLog$\DhcpSrvLog-'EEE'.log ...