check_load weird behavior in French config [solution]
Serveur-Faucon Surveillance
SrvFaucon at cslaval.qc.ca
Wed Mar 30 21:12:05 CEST 2005
After some research, here is the solution.
The problem : nrpe will load but gives some weird result on the nagios console. For example : a load of 0 is critical.
Caracteristics : You have installed in French or some parts of Linux is in French (or other language)
Add this...
In the start up script.
#!/bin/sh
#
[...]
# See how we were called.
case "$1" in
start)
# Start daemons
# Modification du code de la langue pour NRPE
LANG=fr_CA
LC_CTYPE=fr_CA
LC_NUMERIC=fr_CA
LC_TIME=fr_CA
LC_COLLATE=fr_CA
LC_MONETARY=fr_CA
LC_MESSAGES=fr_CA
LC_PAPER=fr_CA
LC_NAME=fr_CA
LC_ADDRESS=fr_CA
LC_TELEPHONE=fr_CA
LC_MEASUREMENT=fr_CA
LC_IDENTIFICATION=fr_CA
LC_ALL=fr_CA
export LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL
[...]
____________________
And now it is working!
Thanks to Andreas Ericsson to put me on the right road for this :)
---------------------------------------------------
Alexandre Racine - www.gardienvirtuel.com
Montréal, Québec, Canada
>>> Andreas Ericsson <ae at op5.se> 2005-02-18 17:00:54 >>>
Serveur-Faucon Surveillance wrote:
> I know about the ". or ," issue, and I have compensate with " " " and
> it does work great.
>
> root]# /usr/local/nagios/libexec/check_load -w "20,0","15,0","10,0"
> -c "35,0","30,0","25,0" OK - load average: 0,00,
> 0,00,0,00|load1=0;20;35;0 load5=0;15;30;0 load15=0;10;25;0
>
> But since, I made more tests, when starting in the startup
> (chkconfig) the error occurs. When I log in and restart the service,
> the error disapear. If I start the service later (with at) in the
> service startup, the error occurs.
>
> So I would somehow conclude that there is a difference between
> starting a service in the chkconfig and at the console.
>
> Can you think of another way to bypass this situation? :) Mabe I
> could log in the nagios user and make him execute nrpe?
>
locale > locale.save
LC_ALL=POSIX
start nrpe
eval `cat locale.save`
or put nrpe last in startup sequence so as to emulate the re-start
environment as close as possible.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/Info/Sentarus/hamr30
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list