Using ! in check_command - part 2

Michael Eck meck at chilitech.net
Fri Jun 18 15:05:12 CEST 2004


Interestingly enough, I can't seem to make my $USERn$ macros work at 
all - although I assume $USER1$ is working as my libexec path.  Even 
with the !, I can't get a check to return OK when using my macro as the 
community string

I've got
resource.cfg:
$USER2$=public

services.cfg:
check_command	check_plugin!$USER2$!75!85

All is well when $USER2$ is replaced with "public"


On Jun 17, 2004, at 6:34 PM, Cook, Garry wrote:

> 
> SNMP checks work for me with a '!' in the community string. Now, I 
> don't remember if I needed to escape it or not, and I can't get to the 
> box to check it right now, so you may need to try it both ways. 
> However, I did NOT put the community string in the services.cfg or 
> checkcommands.cfg. I wanted to be a little bit more safe, so I 
> assigned it to one of the user variables in resource.cfg. I then added 
> this variable (ie. $USER9$) to my check command as an argument.
>   
> Whether or not this should really be considered 'safe' might be 
> disputed by some. It's never been compromised and it works in my check 
> commands, so I'm happy.
>  
> HTH.
> -g
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net on behalf of Michael Eck
>  Sent: Thu 6/17/2004 12:20 PM
> To: nagios-users
>  Cc:
> Subject: [Nagios-users] Using ! in check_command - part 2
>
> Original Post:
> Greetings,
> Is there a trick than anybody knows of the use a ! as a character in a
> password for a check_command?
> The obvious problem is that it's also the field delimiter.
>
>
> Ok, I got lots of replies suggesting that I try to escape my !.  I
> didn't mention it in my first post but I did indeed try that.  I tried
> quotes of several varieties with no luck as well.
>
> Has anybody actually gotten this to work or does anybody know that this
> will work or were they just shots in the dark?  Of course I can change
> the community strings but that's just a cop-out.
>
> Any ideas?
>
>
>
>
> ----
> Michael Eck
>
----
Michael Eck
Chilitech Internet Solutions
Network Operations Center
570-323-2166
http://www.chilitech.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2560 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040618/292a27cf/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2365 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040618/292a27cf/attachment-0001.bin>


More information about the Users mailing list