Hostname not extracted when i run logstash as a service on rhel

Oh you're doing that! Well that's because when you start as the system service that environment variable is not set.

You should be getting the host.name as part of the event

What version?

Perhaps look at