[ZBX-10344] Document the recommendation to set UTF-8 locale for the agent Created: 2016 Feb 03  Updated: 2024 Apr 10  Resolved: 2017 Oct 06

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D)
Affects Version/s: None
Fix Version/s: 4.0 (plan)

Type: Documentation task Priority: Trivial
Reporter: Glebs Ivanovskis (Inactive) Assignee: Martins Valkovskis
Resolution: Fixed Votes: 0
Labels: agent, encoding
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

UNIX


Attachments: HTML File zabbix_agentd    
Team: Team C
Sprint: Sprint 17, Sprint 18
Story Points: 0.25

 Description   

It is a common situation on Windows when agent collects text data in non-Unicode character set and explicitly converts it to UTF-8 before sending to server.

Luckily, most modern UNIX systems use UTF-8 by default and such conversion is not needed in UNIX agent.

However, there are few deviant platforms on which agent seems to receive text information from the system in non-Unicode encoding if it is run using non-UTF-8 locale. This may influence interpretation of system.hostname, system.uname and other text-based items if they contain non-ASCII characters.

Recommendation to set UTF-8 locale for agent will help in such cases.



 Comments   
Comment by Thomas Pellegatta [ 2016 Feb 03 ]

To complete, on HP-UX systems, agent log file reports that :

cannot get host metadata using "system.uname" item specified by "HostMetadataItem" configuration parameter: returned value is not an UTF-8 string

Moreover this command :

 zabbix_agentd -t system.uname 

Displays some strange characters :

system.uname                                  [s|HP-UX   G@ @ ]

Unfortunately, setting locale to *.utf8 doesn't change this behavior.

Comment by Glebs Ivanovskis (Inactive) [ 2016 Feb 03 ]

What is expected? Can you add uname command output.

Comment by Thomas Pellegatta [ 2016 Feb 03 ]
uname : HP-UX
uname -a : HP-UX cerbere B.11.11 U 9000/800 108901508 unlimited-user license
Comment by Aleksandrs Saveljevs [ 2016 Feb 03 ]

Which Zabbix agent version are you using? Could this be related to ZBX-8969 or ZBX-8127 instead?

Comment by Thomas Pellegatta [ 2016 Feb 03 ]

Zabbix agent : 2.2.9 HP-UX 11.31 RISC
Zabbix server : 2.2.10 compiled from sources on a Linux host

Comment by Aleksandrs Saveljevs [ 2016 Feb 03 ]

ZBX-8969 was fixed in Zabbix 2.2.10. Could you please try the latest Zabbix 2.2 agent on HP-UX?

Comment by Thomas Pellegatta [ 2016 Feb 03 ]

According to http://www.zabbix.com/download.php. I have the latest Zabbix 2.2 agent on HP-UX (2.2.9 HP-UX 11.31 risc)

Comment by Aleksandrs Saveljevs [ 2016 Feb 03 ]

Thomas, please try the attached "zabbix_agentd". This is a Zabbix 2.2.11 binary for HP-UX 11.31 PA-RISC.

Comment by Thomas Pellegatta [ 2016 Feb 03 ]

Despite the fact I chmod +x the file. I can't execute it :

ksh: ./zabbix_agentd: cannot execute

file zabbix_agentd : zabbix_agentd: PA-RISC2.0 shared executable dynamically linked

The host running the agent is HP-UX 11.11 and the agent is 11.31 isn'it problematic ?

Comment by Aleksandrs Saveljevs [ 2016 Feb 03 ]

Well, I prepared a binary for 11.31 based on your comment above:

Zabbix agent : 2.2.9 HP-UX 11.31 RISC
Zabbix server : 2.2.10 compiled from sources on a Linux host

Should have probably paid attention to your uname output and asked for clarification.

Comment by Thomas Pellegatta [ 2016 Feb 03 ]

I'm sorry for this misunderstanding.

In fact the agent is 2.2.9 HP-UX 11.31 RISC and is deployed on a HP-UX 11.11 host.
The server is 2.2.10 and is deployed on a Linux host.

Comment by Aleksandrs Saveljevs [ 2016 Feb 08 ]

Thomas, could you please let me know whether a precompiled 3.0.0rc1 agent (http://www.zabbix.com/download.php at the very bottom) works for you? If not, I shall try to compile on HP-UX 11.11.

Comment by Thomas Pellegatta [ 2016 Feb 08 ]

Hi Aleksandrs,
Unfortunately, I can't run the agent :

ksh: ./zabbix_agentd: cannot execute

sh: zabbix_agentd: Execute permission denied.

I think it's a permission-related issue so

chmod +x zabbix_agentd

But I already have rights to execute...

ls -l : -rwxr-x---   

I won't be able to execute the file as I'm not root and system admin won't do it for me neither.
I'm afraid we won't be able to fix it.

file zabbix_agentd : zabbix_agentd: ELF-64 executable object file

Comment by Thomas Pellegatta [ 2016 Feb 08 ]

According to : HP

ELF-64 executable object
That file format is not executable on HP-UX 11.11, which is a PA-RISC only release.

Generated at Tue Apr 23 13:29:38 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.