I have been working on a plugin for nagios that does a system level call. The problem I am having is that through the plugin on a local system I get the expected response code "0", but when I check it using check_nrpe from my core server, I get "256" which made me suspect that it is not utf-8 encoded.
So I had the plugin spit out the $ENV{LANG} variable and got different results:
From the local system where I was running the plugin I got "en_US.UTF-8", when running from the core server using check_nrpe I got "en_US". So my suspicions appear correct.
I have tried using "use utf8" and "utf8::encode($variable)" and it still does not get it.
Does any one have an idea of what I can do?
Nagios Core: 3.5.0
check_nrpe: 2.12
OS: CentOS 6.4
check_nrpe not getting utf-8?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_nrpe not getting utf-8?
Can you attach a copy of the plugin as well as details on what the target system you were testing against was? Thanks a lot!