{"action":"created","issue":{"url":"https://api.github.com/repos/Graylog2/collector/issues/68","labels_url":"https://api.github.com/repos/Graylog2/collector/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/Graylog2/collector/issues/68/comments","events_url":"https://api.github.com/repos/Graylog2/collector/issues/68/events","html_url":"https://github.com/Graylog2/collector/issues/68","id":115900680,"number":68,"title":"Hostname form same Host not the same in Type=file and Type=windows-eventlog","user":{"login":"renapu","id":15243394,"avatar_url":"https://avatars.githubusercontent.com/u/15243394?v=3","gravatar_id":"","url":"https://api.github.com/users/renapu","html_url":"https://github.com/renapu","followers_url":"https://api.github.com/users/renapu/followers","following_url":"https://api.github.com/users/renapu/following{/other_user}","gists_url":"https://api.github.com/users/renapu/gists{/gist_id}","starred_url":"https://api.github.com/users/renapu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renapu/subscriptions","organizations_url":"https://api.github.com/users/renapu/orgs","repos_url":"https://api.github.com/users/renapu/repos","events_url":"https://api.github.com/users/renapu/events{/privacy}","received_events_url":"https://api.github.com/users/renapu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-09T15:32:12Z","updated_at":"2015-11-10T09:07:31Z","closed_at":null,"body":"Hi,\r\n\r\nIdk why, but on the same Host the Hostname is not the same in Graylog.\r\nThe collector runs on a Windows-Server 2k12 Machine.\r\nWe collect file based logs and Eventlog based logs.\r\n\r\nWith type=file => source:dc01\r\nWith type=windows-eventlog => source: dc01.domain.local\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Graylog2/collector/issues/comments/155363340","html_url":"https://github.com/Graylog2/collector/issues/68#issuecomment-155363340","issue_url":"https://api.github.com/repos/Graylog2/collector/issues/68","id":155363340,"user":{"login":"joschi","id":43951,"avatar_url":"https://avatars.githubusercontent.com/u/43951?v=3","gravatar_id":"","url":"https://api.github.com/users/joschi","html_url":"https://github.com/joschi","followers_url":"https://api.github.com/users/joschi/followers","following_url":"https://api.github.com/users/joschi/following{/other_user}","gists_url":"https://api.github.com/users/joschi/gists{/gist_id}","starred_url":"https://api.github.com/users/joschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joschi/subscriptions","organizations_url":"https://api.github.com/users/joschi/orgs","repos_url":"https://api.github.com/users/joschi/repos","events_url":"https://api.github.com/users/joschi/events{/privacy}","received_events_url":"https://api.github.com/users/joschi/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T09:07:31Z","updated_at":"2015-11-10T09:07:31Z","body":"The file input is using [`InetAddress#getHostName()`](https://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html#getHostName()) under the hood (via [`Utils#getHostname()`](https://github.com/Graylog2/collector/blob/0.4.1/src/main/java/org/graylog/collector/utils/Utils.java#L34) in [`FileInput#doStart()`](https://github.com/Graylog2/collector/blob/0.4.1/src/main/java/org/graylog/collector/inputs/file/FileInput.java#L71)) while the Windows EventLog input is using the provided computer name (in [`WindowsEventlogHandler#handleNotification()`](https://github.com/Graylog2/collector/blob/0.4.1/src/main/java/org/graylog/collector/inputs/eventlog/WindowsEventlogHandler.java#L53)).\r\n\r\n@bernd The simplest way to consolidate the source field would be to use [`InetAddress#getCanonicalHostName()`](https://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html#getCanonicalHostName()) in the `Utils` class to retrieve the FQDN instead of just the simple host name."}}