I have correct result in console but Icinga got ‘’


(Rostyslav) #1


I have written bash script who checks if a file exists on dir and it works well in the console but transfers to Icinga looks like Unicode symbol ‘’

Locales on client and Icinga’s server UTF8 script saved in UTF8 too.

Could someone prompt me or give an idea, please?




are you able (and allowed) to share your script here for better investigation on this?

First of all make sure that the script uses the correct path and keep in mind that relative paths may not work if the script is called by Icinga.


(Rostyslav) #3

Yes of course
I have placed on gist.github

(Michael Friedrich) #4

Hm, there’s no error handling for the find call, it just pipes everything into wc. I would split this up for better analysis and identify the culprit if either one or the other renders garbage here.

(Rostyslav) #5

I forgot to tell about that I use Icinga Director. Perhaps PHP somewhere converts output?


You can query the Icinga API directly and have a look to last_check_result

$ curl -k -s -u root:icinga '!servicename' | python -m json.tool

                "last_check_result": {
                    "active": true,
                    "check_source": "metis",
                    "command": [
                    "execution_end": 1526324289.869285,
                    "execution_start": 1526324289.860517,
                    "exit_status": 1.0,
                    "output": "CRITICAL: 1 files with extension sql exists",


Replace root:icinga (username:password) with valid API credentials. Also change hostname!servicename to your matching host- and service name.

If the output here is also malformed start with implementing error handling as @dnsmichi said.

(Rostyslav) #7

The error was related to Icinga Director. I had reconfigured it in this way and script works well now.