NSClient seems to be ignoring allow_nasty_meta_chars setting

nagiosnrpensclient++

I am trying to detect an eventlog entry on a server, so am trying to use the CheckEventLog command:

./check_nrpe -H hostname -c CheckEventLog -a MaxWarn=1 MaxCrit=1 "filter=generated gt -3d AND id=23 AND source='mpio'" truncate=800 unique "syntax=%severity%: %source%: %id%: %message% (%count%)"

But, I always get an error back from the client:

Exception processing request: Request command contained illegal metachars!

I have set the option to allow nasty meta chars, but that doesn't seem to help.

[/settings/NRPE/server]
allow arguments = true
allow_nasty_meta_chars = 1

If I take out the source part of the filter, it works, but of course event id's are not unique in themselves.

Best Answer

The nsclient.ini file is not the same as the old nsc.ini so keys and values have changed not just sections.

The key name for "nasty chars" is:

[/settings/NRPE/server]
allow nasty characters=true

[/settings/external scripts]
allow nasty characters=true

http://docs.nsclient.org/faq/index.html#nasty-metacharacters