[Nagiosplug-help] "!" in SNMP Community?
Thomas Guyot-Sionnest
dermoth at aei.ca
Sat Jan 20 06:06:24 CET 2007
On 19/01/07 04:16 PM, Jiann-Ming Su wrote:
> My SNMP community string has a bang (!) in it. How do I properly pass
> the community string with the check_snmp module? I've tried using %21
> as suggested by FAQ ID F0157
> (http://www.nagios.org/faqs/viewfaq.php?faq_id=157), but that doesn't
> work. I've tried escaping it with \, but then the service doesn't
> even execute. I've tried putting the entire community string in
> quotes (""), but that doesn't work either. Thanks for any tips.
When you say that with escaping (\) it wouldn't execute, that make be
believe it actually ran, but bash was interpreting the bang.
Try using single quotes around the community string. You can also try
the quotes directly acound the bang. You may need to escape them or use
USERn variables.
So I guess you tried this (The arrow indicate my guess at what it end-up
as):
commu\!nity => commu!nity
"commu\!nity" => "commu!nity"
Those two wouldn't work because the band would get interpreted by the
shell. Try to get this instead:
'commu\!nity' => 'commu!nity'
or??
\'commu\!nity\' => 'commu!nity'
commu'\!'nity => commu'!'nity
or??
commu\'\!\'nity => commu'!'nity
commu\\\!nity => commu\!nity
Thomas
More information about the Help
mailing list