I distribute a common agent configuration file and use 'hostnameitem=system.hostname' to set agent.hostname on each system. Our hosts (5000+) are imported and populated via configuration management but unfortunately the character casing does not always match the configuration on the servers.
To fix this, I convert all hostnames to lower case in config management and attempted to do the same in the agent config. Unfortunately, any item key used in 'hostnameitem' must not use an external script and must use a natively support key. I have not found any in-built option for case conversion.
Can you please consider adding a key parameter/option for case conversion?