shinken-monitoring / mod-livestatus

Shinken module for presenting data with a MK/Livestatus comptabile interface
GNU Affero General Public License v3.0
15 stars 20 forks source link

Send external commands with accented comments #30

Closed h4wkmoon closed 10 years ago

h4wkmoon commented 10 years ago

I'm not really sure why, but commenting this line allowed us to send comments with accents.

naparuba commented 10 years ago

not lear, this was to allow it. What is your server LANG?

naparuba commented 10 years ago

lear=clear

h4wkmoon commented 10 years ago

Server is fr_FR.UTF-8 I tried with shinken in en_US and fr_FR

I've set http in fr_FR as well.

Nothing works. Whatever the combinaision, messages are ignored. except when I comment the line in livestatus_command_query.py self.extcmd = self.extcmd.decode('utf8', 'replace')

Let me know what the configuration should be.

naparuba commented 10 years ago

Shinken will force LANG=en_US.UTF8 at start, but if the en_US local is installed it should not be a problem (if not it will switch to C, and there there will be problems :) ).

and so even with apache in en_us it fail?

On Wed, Jul 9, 2014 at 10:33 AM, Frédéric Pégé notifications@github.com wrote:

Server is fr_FR.UTF-8 I tried with shinken in en_US and fr_FR

I've set http in fr_FR as well.

Nothing works. Whatever the combinaision, messages are ignored. except when I comment the line in livestatus_command_query.py self.extcmd = self.extcmd.decode('utf8', 'replace')

Let me know what the configuration should be.

— Reply to this email directly or view it on GitHub https://github.com/shinken-monitoring/mod-livestatus/pull/30#issuecomment-48443280 .

h4wkmoon commented 10 years ago

Yes.

naparuba commented 10 years ago

python 2.6 or 2.7?

On Wed, Jul 9, 2014 at 10:51 AM, Frédéric Pégé notifications@github.com wrote:

Yes.

— Reply to this email directly or view it on GitHub https://github.com/shinken-monitoring/mod-livestatus/pull/30#issuecomment-48444866 .

h4wkmoon commented 10 years ago

Tested on ubuntu 14.04 with python 2.7 and Centos 6.5 with python 2.6.6 same behavior. (ko with the line I'm talking about, ok without it)

naparuba commented 10 years ago

hum...

I'll apply your patch but I open a ticket to do a full test about it, I don't know why we put this one (maybe too much protection?).

On Thu, Jul 10, 2014 at 7:24 AM, Frédéric Pégé notifications@github.com wrote:

Tested on ubuntu 14.04 with python 2.7 and Centos 6.5 with python 2.6.6 same behavior. (ko with the line I'm talking about, ok without it)

— Reply to this email directly or view it on GitHub https://github.com/shinken-monitoring/mod-livestatus/pull/30#issuecomment-48566506 .