Method: Common::Utils#get_vm_name
- Defined in:
- lib/fluent/plugin/common.rb
#get_vm_name(vm_name) ⇒ Object
-
Return the value if it is explicitly set in the config already.
-
If not, try to retrieve it locally.
195 196 197 198 199 200 |
# File 'lib/fluent/plugin/common.rb', line 195 def get_vm_name(vm_name) vm_name ||= Socket.gethostname vm_name rescue StandardError => e @log.error 'Failed to obtain vm name: ', error: e end |