Discussion:
[Nagios-users] Escaping Exclamation Points
Christopher Falk
2008-06-27 01:35:32 UTC
Permalink
Hello all,

Never posted here before, but it's been helpful to follow along with the various threads.

My issue is with checking NT services with exclamation points in their names. The following check command is sent to NSClient++:

check_nt_service!'Act! Scheduler'

and fails with a No Output! error in Nagios. I've tried \!, $!, double quotes, and to no avail.

Has anybody had success escaping an exclamation point when it's part of a service name sent to NSClient++?

Thanks in advance,

Chris
--
_________________________________________________________
A Message From... Christopher Falk

Reliable Networks of Maine, LLC

"Uptime. All the time."

477 Congress Street
Portland, ME 04101
Tel: (207) 772-5678
Web: http://www.reliablenetworks.com

This email was sent from Reliable Networks of Maine LLC.
It may contain information that is privileged and confidential.
If you suspect that you were not intended to receive it, please
delete it and notify us as soon as possible. Thank you.
Lars Jørgensen
2008-06-27 08:52:37 UTC
Permalink
Hi Chris,
Post by Christopher Falk
check_nt_service!'Act! Scheduler'
and fails with a No Output! error in Nagios. I've tried \!,
$!, double quotes, and to no avail.
Have you tried double exclamation marks (!!)? If you want to escape $ it's done by $$ so maybe ! works the same way?

That sentence is almost unreadable due to punctuation but I hope you get the drift :-)


--
Lars
Cristiano Ness
2008-06-27 11:02:20 UTC
Permalink
Remove ' or complete, for example
check_nt_service!Act! Scheduler or check_nt_service!'Act'! 'Scheduler'
Put here commands.cfg for check_nt_service




[]Žs
---
Cristiano Ness ***@opservices.com.br
OpServices www.opservices.com.br
Tel: 51-3275-3588 Cel: 51-8151-8214
Post by Christopher Falk
Hello all,
Never posted here before, but it's been helpful to follow along with the various threads.
check_nt_service!'Act! Scheduler'
and fails with a No Output! error in Nagios. I've tried \!, $!, double quotes, and to no avail.
Has anybody had success escaping an exclamation point when it's part of a service name sent to NSClient++?
Thanks in advance,
Chris
--
_________________________________________________________
A Message From... Christopher Falk
Reliable Networks of Maine, LLC
"Uptime. All the time."
477 Congress Street
Portland, ME 04101
Tel: (207) 772-5678
Web: http://www.reliablenetworks.com
This email was sent from Reliable Networks of Maine LLC.
It may contain information that is privileged and confidential.
If you suspect that you were not intended to receive it, please
delete it and notify us as soon as possible. Thank you.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nagios-users mailing list
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
Christopher Falk
2008-06-27 11:25:25 UTC
Permalink
Unquoting it all gives me "Act: Unknown" instead of no response at all.

check_nt_service is:

define command{
command_name check_nt_service
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v SERVICESTATE -l $ARG1$
}

Thanks,

Chris

----- Original Message -----
From: "Cristiano Ness" <***@opservices.com.br>
To: "Christopher Falk" <***@reliablenetworks.com>
Cc: nagios-***@lists.sourceforge.net
Sent: Friday, June 27, 2008 7:02:20 AM GMT -05:00 US/Canada Eastern
Subject: Re: [Nagios-users] Escaping Exclamation Points


Remove ' or complete, for example
check_nt_service!Act! Scheduler or check_nt_service!'Act'! 'Scheduler'
Put here commands.cfg for check_nt_service




[]ÂŽs
---
Cristiano Ness ***@opservices.com.br
OpServices www.opservices.com.br
Tel: 51-3275-3588 Cel: 51-8151-8214
Post by Christopher Falk
Hello all,
Never posted here before, but it's been helpful to follow along with the various threads.
check_nt_service!'Act! Scheduler'
and fails with a No Output! error in Nagios. I've tried \!, $!, double quotes, and to no avail.
Has anybody had success escaping an exclamation point when it's part of a service name sent to NSClient++?
Thanks in advance,
Chris
--
_________________________________________________________
A Message From... Christopher Falk
Reliable Networks of Maine, LLC
"Uptime. All the time."
477 Congress Street
Portland, ME 04101
Tel: (207) 772-5678
Web: http://www.reliablenetworks.com
This email was sent from Reliable Networks of Maine LLC.
It may contain information that is privileged and confidential.
If you suspect that you were not intended to receive it, please
delete it and notify us as soon as possible. Thank you.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nagios-users mailing list
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
--
_________________________________________________________
A Message From... Christopher Falk

Reliable Networks of Maine, LLC

"Uptime. All the time."

477 Congress Street
Portland, ME 04101
Tel: (207) 772-5678
Web: http://www.reliablenetworks.com

This email was sent from Reliable Networks of Maine LLC.
It may contain information that is privileged and confidential.
If you suspect that you were not intended to receive it, please
delete it and notify us as soon as possible. Thank you.
Christopher Falk
2008-06-27 11:42:56 UTC
Permalink
Problem resolved.

What I just ended up doing is creating a new command, check_act_scheduler identical to the check_nt_service command definition, and hard-coding 'Act! Scheduler' instead of $ARG1$. That took care of it.

c
----- Original Message -----
From: "Cristiano Ness" <***@opservices.com.br>
To: "Christopher Falk" <***@reliablenetworks.com>
Cc: nagios-***@lists.sourceforge.net
Sent: Friday, June 27, 2008 7:02:20 AM GMT -05:00 US/Canada Eastern
Subject: Re: [Nagios-users] Escaping Exclamation Points


Remove ' or complete, for example
check_nt_service!Act! Scheduler or check_nt_service!'Act'! 'Scheduler'
Put here commands.cfg for check_nt_service




[]ÂŽs
---
Cristiano Ness ***@opservices.com.br
OpServices www.opservices.com.br
Tel: 51-3275-3588 Cel: 51-8151-8214
Post by Christopher Falk
Hello all,
Never posted here before, but it's been helpful to follow along with the various threads.
check_nt_service!'Act! Scheduler'
and fails with a No Output! error in Nagios. I've tried \!, $!, double quotes, and to no avail.
Has anybody had success escaping an exclamation point when it's part of a service name sent to NSClient++?
Thanks in advance,
Chris
--
_________________________________________________________
A Message From... Christopher Falk
Reliable Networks of Maine, LLC
"Uptime. All the time."
477 Congress Street
Portland, ME 04101
Tel: (207) 772-5678
Web: http://www.reliablenetworks.com
This email was sent from Reliable Networks of Maine LLC.
It may contain information that is privileged and confidential.
If you suspect that you were not intended to receive it, please
delete it and notify us as soon as possible. Thank you.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nagios-users mailing list
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
--
_________________________________________________________
A Message From... Christopher Falk

Reliable Networks of Maine, LLC

"Uptime. All the time."

477 Congress Street
Portland, ME 04101
Tel: (207) 772-5678
Web: http://www.reliablenetworks.com

This email was sent from Reliable Networks of Maine LLC.
It may contain information that is privileged and confidential.
If you suspect that you were not intended to receive it, please
delete it and notify us as soon as possible. Thank you.
Marc Powell
2008-06-27 12:24:55 UTC
Permalink
Post by Christopher Falk
Problem resolved.
What I just ended up doing is creating a new command,
check_act_scheduler identical to the check_nt_service command
definition, and hard-coding 'Act! Scheduler' instead of $ARG1$. That
took care of it.
New feature in 3.x --

http://nagios.sourceforge.net/docs/3_0/whatsnew.html

Escaped command arguments - You can now pass bang (!) characters in
your command arguments by escaping them with a backslash (\). If you
need to include backslashes in your command arguments, they should
also be escaped with a backslash.

--
Marc
Anthony Montibello
2008-06-27 23:07:18 UTC
Permalink
I actually define the following Service configs to help deal with these
issues.

define command{

command_name check_nt_l

command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v $ARG1$ -l "$ARG2$"

}

THen I use the following for the service definition.

check_nt_l!SERVICESTATE !Act\! Scheduler



I have not tested in NSClinet++, but have tested this configuration through
NC_NEt.

The primary problem was the ! in the service definition was Tokenizing the
parameter into differerent $ARGX$

All nagios plugins would have this same issue,Another common issue is the
$ where using $$ usually works.



TOny (Author of NC_NEt)
Post by Marc Powell
Post by Christopher Falk
Problem resolved.
What I just ended up doing is creating a new command,
check_act_scheduler identical to the check_nt_service command
definition, and hard-coding 'Act! Scheduler' instead of $ARG1$. That
took care of it.
New feature in 3.x --
http://nagios.sourceforge.net/docs/3_0/whatsnew.html
Escaped command arguments - You can now pass bang (!) characters in
your command arguments by escaping them with a backslash (\). If you
need to include backslashes in your command arguments, they should
also be escaped with a backslash.
--
Marc
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nagios-users mailing list
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
Loading...