Page 1 of 2
DB.nagios alias is not DB.nagiosql's alias
Posted: Mon Jan 07, 2019 3:53 am
by yangzhiyao2653
Shown in nagiosql alias is Chinese simplified, but is shown in the nagios gibberish, who has encountered this problem, please?
Re: DB.nagios alias is not DB.nagiosql's alias
Posted: Mon Jan 07, 2019 12:20 pm
by cdienger
What are the character settings on the databases when you run:
SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = "nagios";
SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = "nagiosql";
?
Re: DB.nagios alias is not DB.nagiosql's alias
Posted: Mon Jan 07, 2019 10:33 pm
by yangzhiyao2653
Both is latin1.
I try to change the default character set and character collation but for the former data I want to know how to change?
Re: DB.nagios alias is not DB.nagiosql's alias
Posted: Tue Jan 08, 2019 1:39 pm
by npolovenko
@yangzhiyao2653, Consider changing the default character set to UTF-8. Let me know if the solution here works for you:
https://stackoverflow.com/questions/351 ... -in-my-cnf
Before you do anything please backup Nagios:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: DB.nagios alias is not DB.nagiosql's alias
Posted: Thu Jan 10, 2019 11:11 am
by yangzhiyao2653
I've put the nagios server, database, table, column configuration as utf8, then restart the database service and apply nagios CCM, found the database is shown as utf8.But instead of on the page with the unreadable code, in the home page and report, do you know about this situation?
Re: DB.nagios alias is not DB.nagiosql's alias
Posted: Thu Jan 10, 2019 5:46 pm
by ssax
Please go to Configure > Core Config Manager > Hosts:
- Edit VLXCNDSZ01BPMP1 through 9 and change the Alias to what it should be, Save, then apply configuration and see if it's proper now.
This is likely a result of the conversion to utf-8.
Let us know the results.
Re: DB.nagios alias is not DB.nagiosql's alias
Posted: Thu Jan 10, 2019 8:04 pm
by yangzhiyao2653
Is still can't display properly, I will want to is a question of PHP, but I for PHP is not understand, may need your help
Re: DB.nagios alias is not DB.nagiosql's alias
Posted: Fri Jan 11, 2019 5:00 pm
by cdienger
Are the databases showing correct characters now if you run initial query again?
Edit /etc/httpd/conf/httpd.conf and make sure the following is in there:
AddDefaultCharset utf-8
Also, check /etc/php.ini and uncomment this like:
;default_charset = "UTF-8"
Restart the apache service after making any changes to these files:
service httpd restart
Re: DB.nagios alias is not DB.nagiosql's alias
Posted: Mon Jan 14, 2019 10:38 am
by yangzhiyao2653
It still can't display properly,I will take a ticket with it .if you have any idea ,please tell me, thank you.
Re: DB.nagios alias is not DB.nagiosql's alias
Posted: Mon Jan 14, 2019 5:02 pm
by cdienger
I see a ticket has been opened. We'll continue troubleshooting though there.